Maths & numbers
GCD & LCM calculator
Find the greatest common divisor and least common multiple.
A clear answer. Here’s how.
Uses Euclid’s algorithm with exact integers. GCD(0,0) is shown as zero by convention; the LCM is zero if either number is zero. Negative inputs use their absolute values.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- First whole number
- 24
- Second whole number
- 36
Example result
- Greatest common divisor
- 12
- Least common multiple
- 72