Digital Solomon is not taking new clients at this time.

← All measures

GCD and LCM

Math · Greatest common divisor and least common multiple of two whole numbers by the Euclidean algorithm, with the steps.

gcd(a, b) = gcd(b, a mod b), lcm = abgcd

Result

Turn on JavaScript to calculate.

How it works

Euclid’s method replaces the pair with the smaller number and the remainder until the remainder is 0. The last non-zero number is the GCD. The LCM is the product divided by the GCD.

Results are estimates for learning and planning. Check anything you rely on with a qualified professional.