GCD & LCM Calculator
Find the greatest common divisor and least common multiple of two positive whole numbers.
Your result
Review your calculated values below.
Ready when you are.
Choose Calculate to see your result.
How to use this calculator
- Enter your values in the labeled fields, keeping the displayed units.
- Choose Calculate or press Enter in a single-line field.
- Review the result and the assumptions below before using it.
Formula and method
GCD is found with the Euclidean algorithm. LCM = (a / GCD) × b.
Worked example
For 24 and 36, the GCD is 12 and the LCM is 72.
What the result assumes
Both numbers must be positive integers. Exact integer arithmetic is used for the final LCM.
Common question
When would I use the LCM?
It helps find a common denominator for fractions or the next shared occurrence of repeating cycles.