GCF & LCM Calculator
The GCF & LCM Calculator finds the greatest common factor (also called the greatest common divisor) and the least common multiple of any set of whole numbers.
100% in-browser ¡ no data sent
Enter two or more numbers to get both results instantly, along with the prime factorization of each number.
Embed This Tool
Add this tool to your website with customizable styling
How to Use
Enter your numbers
Type two or more whole numbers separated by commas, spaces or new lines â for example 12, 18, 24.
Read the GCF
The greatest common factor is the largest number that divides every value you entered without a remainder.
Read the LCM
The least common multiple is the smallest number that every value you entered divides into evenly.
Check the factorizations
See how each number breaks down into prime factors â the building blocks behind the GCF and LCM results.
Frequently Asked Questions
What is the difference between GCF and LCM?
The GCF (greatest common factor) is the largest number that divides all your values evenly, while the LCM (least common multiple) is the smallest number they all divide into. The GCF is always less than or equal to your smallest input; the LCM is always greater than or equal to your largest input.
Is GCF the same as GCD?
Yes. GCF (greatest common factor), GCD (greatest common divisor) and HCF (highest common factor) are three names for the same thing: the largest positive integer that divides every number in the set.
How are the GCF and LCM calculated?
Both are found with the Euclidean algorithm. The GCF of two numbers comes from repeated division with remainders, and the LCM is their product divided by the GCF. For more than two numbers the operation is applied across the whole list.
Can I use negative numbers or zero?
Negative numbers are handled by their absolute value, so the GCF of -12 and 8 is 4. Zero is allowed for the GCF but makes the LCM zero, since every number divides zero.