GCD & LCM Calculator
Enter two or more numbers, separated by commas, to find their GCD and LCM.
What GCD and LCM are for
GCD (greatest common divisor) is the largest number that divides all inputs evenly — useful for simplifying fractions. LCM (least common multiple) is the smallest number that all inputs divide into evenly — useful for finding a common denominator or a shared repeating cycle.
About the GCD & LCM Calculator
The GCD and LCM Calculator finds the greatest common divisor and least common multiple of two or more numbers. The GCD is the largest number that divides all of them exactly; the LCM is the smallest number that all of them divide into.
GCD is used to simplify fractions and to split items into equal groups, while LCM is used to add fractions with different denominators and to find when repeating events coincide. The tool uses the Euclidean algorithm for the GCD and the relationship LCM(a, b) = a × b / GCD(a, b) for the LCM, extending it across all the numbers you enter.
How to use it
- Enter the numbers, separated by commas or spaces.
- Press calculate.
- Read the GCD and LCM.
- Add more numbers to compare larger sets.
Tips and good to know
- If the GCD is 1 the numbers are coprime.
- The LCM can be very large for big inputs.
- Use whole positive numbers.
Frequently asked questions
What is the GCD of 12 and 18?
It is 6, and the LCM is 36.
Can I use decimals?
Convert them to whole numbers first.
Why is LCM useful for fractions?
It gives the smallest common denominator.