GCD and LCM Calculator

Find the greatest common divisor and least common multiple of two numbers. Enter both.

GCD
Greatest common divisor.

Usage Tip

Once you know the GCD, the LCM is quick: divide one number by the GCD, then multiply by the other.

THE MATH
GCD by the Euclidean algorithm
LCM = a × b ÷ GCD
The GCD is the largest number dividing both; the LCM is the smallest both divide into.
They are linked: GCD times LCM equals the product of the two numbers.
Works on two positive whole numbers.
The product check (GCD times LCM = a times b) confirms the result.
For more than two numbers, use the GCF or LCM list calculators.
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.