Home › Calculators › GCD & LCM
Calculators
GCD & LCM
Find the greatest common divisor and least common multiple of two whole numbers. Useful for simplifying fractions, scheduling cycles and number theory.
Try it now
💡 Good to know: Euclid's algorithm for the GCD is over 2,000 years old and still among the fastest known — computers run it essentially unchanged.
Worked example
GCD: 12 · LCM: 72
How it’s solved
Worked on the example above, step by step — follow along and you can do it on paper next time, no tool required.
- The GCD is the largest number dividing both; Euclid's method keeps replacing the pair with (smaller, remainder) until the remainder hits 0.
- Run Euclid's algorithm
36 = 24 × 1 + 12; 24 = 12 × 2 + 0 - The last divisor before the 0 remainder is the GCD
GCD = 12 - LCM = |a × b| ÷ GCD
|24 × 36| ÷ 12 = 72
Learn the method
Inputs
- A
24 - B
36
Frequently asked
What are the GCD and LCM of 24 and 36?
GCD 12 and LCM 72.
How is the LCM found?
It's the product of the two numbers divided by their GCD.