← All tools/Calculators/Math/GCD and LCM Calculator
GCD and LCM Calculator
Greatest common divisor and least common multiple of two whole numbers, by Euclid’s method.
Greatest common divisor (GCD)
How it works
GCD by Euclid’s algorithm: replace the larger number by its remainder on division, and repeat until the remainder is zero LCM = (first × second) ÷ GCD
Worked example: for 48 and 180, Euclid’s algorithm gives a GCD of 12, so the LCM is 48 × 180 ÷ 12 = 720. The check holds: 12 × 720 = 8,640, which is 48 × 180.
Frequently asked questions
What is the GCD in plain words?
The largest whole number that divides both numbers exactly. 12 divides both 48 and 180, and no larger number does.
What is the LCM used for?
Adding fractions with different denominators, and any problem where two repeating cycles must line up again.
What if one number is zero?
The GCD is the other number, and the LCM is zero, because no positive multiple of zero exists apart from zero itself.
More tools
Tell us what you think
Loving this tool, or stuck on something? Tell us — it takes a minute.
We’ll only use your name and email to reply if needed. The tool and page are filled in for you.