GCD & LCM Calculator
Find the greatest common divisor and least common multiple of two integers using the Euclidean algorithm.
- Greatest common divisor
- 6
- Least common multiple
- 36
How it works
The greatest common divisor (GCD) is found with the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is zero — whatever's left is the GCD. The least common multiple (LCM) then follows from the identity LCM(a, b) = |a × b| ÷ GCD(a, b).