LCM Calculator

The least common multiple is the smallest number that every input divides exactly. For two numbers it is a × b ÷ gcd(a, b), and for more than two you fold: take the lcm of the first pair, then of that result with the next. The folding matters, because the natural-looking shortcut is wrong. Dividing...

For three or more numbers, abc ÷ gcd is not the lcm. The two-number rule tempts people into it, and it is wrong about 71% of the time. On 2, 3 and 4 it gives 24 where the answer is 12; on 6, 10 and 15 it gives 900 where the answer is 30. The way that works is to fold: take the lcm of the first two, then of that with the third.

THE NUMBERS

LCM OF 12, 18

36

Each number goes into it a whole number of times: 12 × 3, 18 × 2. Their gcd is 6, which is what stops the lcm being the full product of 216.

GCD

6

the shared part

PRODUCT OF ALL

216

6× the lcm

DIGITS IN THE LCM

2

lcm grows where gcd shrinks

NUMBERS GIVEN

2

each one matters

StepRunning lcmMultiplied by
start with 1212
fold in 1836× 3

WHAT IT MEANS

WHERE THE CYCLES MEETeach row ticks at its own interval — they align for the first time at the lcmnothing earlier is a multiple of them all — that is what makes it least

This is what an lcm is for. Two things repeating on different cycles coincide for the first time at the lcm of their periods, and then every lcm after that. Buses every 12 and 18 minutes leave together every 36. Gears with 12 and 18 teeth return to their starting alignment after 36 teeth pass. The same number answers both.

THE RUNNING LCM, IN THE ORDER YOU TYPED THEMbars are logarithmic — the value climbs faster than a linear axis can showevery number pushed the total higher, in this order at least
THE LCM TAKES THE LARGEST POWER OF EACH PRIMEthe gcd takes the smallest — same table, opposite endgreen is the lcm exponent, navy the gcd exponent inside it

Folded pairwise · exact for any size of input

Created with❤️byeaglecalculator.com

HOW TO USE

  1. 1

    Enter two or more whole numbers. Signs are ignored, since every multiple of −12 is also a multiple of 12 and the sign changes nothing about which numbers are common multiples.

  2. 2

    Watch the fold rather than just the answer. Each row shows the running lcm and what the next number multiplied it by — a factor of one means that number was already covered.

  3. 3

    Read the cycle diagram if the numbers are periods. The rows tick at their own intervals and meet for the first time at the lcm, which is what makes the answer useful rather than just correct.

  4. 4

    With three or more numbers, compare the answer with the shortcut the page shows. Dividing the product by the overall gcd is the common mistake, and seeing both figures side by side makes the gap obvious.

REFERENCE FORMULAS

RuleFormulaWhat it is for
Two numberslcm(a, b) = a × b ÷ gcd(a, b)Exact for two. Divide before multiplying to keep the intermediate small.
Three or morelcm(a, b, c) = lcm(lcm(a, b), c)Fold pairwise. The order changes nothing about the result.
The common errorlcm(a,b,c) ≠ abc ÷ gcd(a,b,c)Wrong about 71% of the time. On (2,3,4) it gives 24 instead of 12.
From prime exponentstake the largest power of each primeThe mirror of gcd, which takes the smallest. Both read off the same table.
Coprime numbersgcd = 1 ⟹ lcm = a × bNothing is shared, so nothing is saved. This is why lcm grows so fast.
One divides the othera | b ⟹ lcm(a, b) = bThe larger already contains the smaller. gcd is then a.
With zerolcm(a, 0) is undefinedThe only multiple of zero is zero, which is not a multiple of a.
Repeating eventsperiods a and b coincide every lcm(a, b)Buses every 12 and 18 minutes meet every 36. The first coincidence is the lcm.
Least common denominatorLCD = lcm of the denominatorsThe same quantity under a different name, for adding fractions.
Scalinglcm(ka, kb) = k · lcm(a, b)A shared factor pulled out stays out. The same rule holds for gcd.
Product identitygcd(a,b) × lcm(a,b) = a × bFor exactly two numbers. It does not extend to three unless pairwise coprime.
First n integerslcm(1…20) = 232,792,560Grows roughly like eⁿ, driven by the prime powers below n.
Boundlcm(a, b) ≤ a × bWith equality exactly when they are coprime. It is never larger.
Multiplesevery common multiple is a multiple of the lcmWhich is what makes it least — the others are all built from it.

FREQUENTLY ASKED QUESTIONS

RELATED CALCULATORS

MORE ALGEBRA CALCULATORS

Was this calculator helpful?

Last updated: August 4, 2026 · Folded pairwise, never abc ÷ gcd · Two numbers coincide for the first time at their lcm.