Find the LCM and GCD (HCF) of a set of integers.
Calculated locally in your browser.
Understanding your result
The GCD is the largest number dividing all inputs; the LCM is the smallest number they all divide into.
Formula and method
GCD is found with the Euclidean algorithm; LCM(a, b) = |a × b| ÷ GCD(a, b), extended across all numbers.
Worked example
For 12 and 18, the GCD is 6 and the LCM is 36.
How to use this tool
- Enter integers separated by commas or spaces.
- Read the LCM and GCD.
Common mistakes to avoid
- Including non-integers or zero.
About the LCM & GCD Calculator
Find the least common multiple (LCM) and greatest common divisor (GCD / HCF) of two or more integers.
Frequently asked questions
Is GCF the same as GCD?
Yes. GCF (greatest common factor) and HCF are other names for the GCD.