← All blog posts

GCD and LCM Calculator for beginners — start here

WhiteUI · A plain-English guide to the GCD and LCM Calculator

If GCD and LCM sound like alphabet soup, start with what the letters stand for — and with one small pair of numbers. The GCD and LCM Calculator does the arithmetic, but knowing what the answers mean is what makes them useful.

What GCD means

GCD stands for greatest common divisor: the largest whole number that divides both of your numbers exactly, with nothing left over. For 12 and 18, the numbers that divide both are 1, 2, 3 and 6 — so the GCD is 6.

What LCM means

LCM stands for least common multiple: the smallest number that both of your numbers divide into exactly. The multiples of 12 are 12, 24, 36, 48 and so on; the multiples of 18 are 18, 36, 54 and so on. The first number on both lists is 36, so the LCM is 36.

At a glance

Multiples of 12 and 18 meet at 36Multiples of 12122436Multiples of 18183636 is the first number on both lists — the LCM.
The multiples of 12 are 12, 24 and 36, and the multiples of 18 are 18 and 36 — 36 is the LCM.

Your first worked example

Take 12 and 18. Their GCD is 6 and their LCM is 36. Check it the quick way: 6 × 36 = 216, and 12 × 18 = 216. The check holds, so both answers are right.

GCD of 12 and 18 = 6
LCM of 12 and 18 = 36
Check: 6 × 36 = 216 = 12 × 18

The mistake to avoid

Assuming the GCD is the smaller number. The GCD of 12 and 18 is 6, not 12 — 12 does not divide 18 exactly. The GCD is always a divisor of both numbers, and it is usually smaller than both of them. The only time the GCD equals the smaller number is when the smaller number divides the larger one exactly, as 6 divides 12.

When do you need the GCD, and when the LCM?

The two answers solve opposite kinds of problem. The GCD is for splitting things up: it finds the largest size that divides both numbers exactly. If you have a 12-metre rope and an 18-metre rope and want the longest equal pieces you can cut from both, the GCD is 6 — so you cut 6-metre pieces, 2 from the first rope and 3 from the second. The LCM is for things happening together: it finds the first number both numbers divide into. If one bus leaves every 12 minutes and another every 18 minutes, they leave together again after 36 minutes, because 36 is the LCM.

A quick test tells you which one a question wants. If the question asks for the largest piece, the biggest group, or the longest length that fits both numbers exactly, it wants the GCD. If it asks when two repeating things meet again, or for a number both numbers divide into, it wants the LCM. “Largest that fits” is GCD; “first that both reach” is LCM.

What to check before you trust the answer

Three checks take ten seconds and catch nearly every slip. First, the product check: GCD × LCM must equal the product of your two numbers. For 12 and 18, 6 × 36 = 216, and 12 × 18 = 216, so the pair agrees. Second, the GCD must divide both numbers exactly: 12 ÷ 6 = 2 and 18 ÷ 6 = 3, with nothing left over. Third, the LCM must be a multiple of both numbers: 36 ÷ 12 = 3 and 36 ÷ 18 = 2.

If any check fails, the answers cannot both be right — re-enter the numbers and look again. And if the GCD comes out larger than the smaller of your two numbers, it is certainly wrong: the GCD can never be bigger than either number you started with.

Frequently asked questions

What does GCD stand for?

Greatest common divisor: the largest whole number that divides both numbers exactly.

What does LCM stand for?

Least common multiple: the smallest number that both numbers divide into exactly.

Which is bigger, the GCD or the LCM?

The LCM, except when one number is 1 or both numbers are equal. The GCD is never bigger than either number, and the LCM is never smaller than either number.

Where do I meet GCD and LCM in school?

In fractions: the GCD simplifies a fraction, and the LCM gives a common denominator for adding fractions.

More guides on the GCD and LCM Calculator

Try it yourself

Find the GCD and LCM of any two whole numbers — free, in your browser.

Open the GCD and LCM Calculator