GCF & LCM Calculator
Greatest common factor and least common multiple of two numbers.
What is a GCF & LCM calculator?
A GCF & LCM calculator finds the greatest common factor and the least common multiple of two numbers. The GCF is the largest number that divides both numbers exactly; the LCM is the smallest number that both numbers divide into exactly.
How to use the GCF & LCM calculator
Enter the first number and the second number, then click Calculate. The calculator shows the GCF and the LCM, with the working shown.
Formulas
GCF: use Euclid’s algorithm — repeatedly replace the larger number by the remainder of dividing it by the smaller, until the remainder is 0. LCM = (a × b) ÷ GCF.
Example
For 12 and 18: the GCF is 6, because 6 is the largest number that divides both 12 and 18. The LCM is (12 × 18) ÷ 6 = 216 ÷ 6 = 36.
Frequently Asked Questions
What is the GCF of 12 and 18?
The GCF of 12 and 18 is 6. Try it on the calculator above.
What is the LCM of 12 and 18?
The LCM of 12 and 18 is 36.
What is the difference between GCF and LCM?
The GCF is the largest number that divides both numbers; the LCM is the smallest number that both numbers divide into. For 12 and 18, the GCF is 6 and the LCM is 36.
Browse more calculators: Math Calculators · All Tools