Math and measurement tools
GCF and LCM Calculator
Find the greatest common factor and least common multiple of two or more whole numbers. Get exact integer results and a reduced ratio, with no sign-up.
Find another tool
This tool needs JavaScript. If the controls don’t appear, check your connection, enable JavaScript and reload this page.
How to use this tool
1. Enter 2–50 positive whole numbers separated by spaces or commas. Do not put commas inside a number.
2. Calculate to find the greatest common factor (GCF, HCF or GCD) and least common multiple (LCM).
3. Use the reduced ratio to check how the numbers relate after division by their shared factor. Copy or print the exact result.
How GCF and LCM are calculated
Euclid’s algorithm repeatedly takes remainders to find the GCF. For each pair of positive integers, LCM(a,b) = a ÷ GCF(a,b) × b. Applying these operations across the list gives the combined results using exact integer arithmetic.
Worked example
For 12, 18 and 30, the greatest common factor is 6 and the least common multiple is 180. Dividing every input by 6 gives the reduced ratio 2 : 3 : 5.
Questions and assumptions
Input limits
Accepts 2–50 positive integers, each at most 1,000,000,000,000. Zero, negative numbers, decimals and scientific notation are rejected. Spaces and commas separate list entries; they are never thousands separators.
What the results mean
The GCF is the largest positive integer dividing every entry with no remainder. The LCM is the smallest positive integer divisible by every entry. Large exact results may contain many digits; the calculator does not enumerate every factor or prime factorisation.
Sources and further reading
Built and maintained by Custom Logic. Page updated .