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.
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
| Step | Running lcm | Multiplied by |
|---|---|---|
| start with 12 | 12 | — |
| fold in 18 | 36 | × 3 |
WHAT IT MEANS
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.
Folded pairwise · exact for any size of input
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.
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.
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.
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.
| Rule | Formula | What it is for |
|---|---|---|
| Two numbers | lcm(a, b) = a × b ÷ gcd(a, b) | Exact for two. Divide before multiplying to keep the intermediate small. |
| Three or more | lcm(a, b, c) = lcm(lcm(a, b), c) | Fold pairwise. The order changes nothing about the result. |
| The common error | lcm(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 exponents | take the largest power of each prime | The mirror of gcd, which takes the smallest. Both read off the same table. |
| Coprime numbers | gcd = 1 ⟹ lcm = a × b | Nothing is shared, so nothing is saved. This is why lcm grows so fast. |
| One divides the other | a | b ⟹ lcm(a, b) = b | The larger already contains the smaller. gcd is then a. |
| With zero | lcm(a, 0) is undefined | The only multiple of zero is zero, which is not a multiple of a. |
| Repeating events | periods 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 denominator | LCD = lcm of the denominators | The same quantity under a different name, for adding fractions. |
| Scaling | lcm(ka, kb) = k · lcm(a, b) | A shared factor pulled out stays out. The same rule holds for gcd. |
| Product identity | gcd(a,b) × lcm(a,b) = a × b | For exactly two numbers. It does not extend to three unless pairwise coprime. |
| First n integers | lcm(1…20) = 232,792,560 | Grows roughly like eⁿ, driven by the prime powers below n. |
| Bound | lcm(a, b) ≤ a × b | With equality exactly when they are coprime. It is never larger. |
| Multiples | every common multiple is a multiple of the lcm | Which is what makes it least — the others are all built from it. |
24 Times Table
Calculate instantly →
Quadratic Equation Solver
Calculate instantly →
Logarithm Calculator
Calculate instantly →
Fraction Calculator
Calculate instantly →
Fraction Simplifier
Calculate instantly →
Linear Equation Solver
Calculate instantly →
25 Times Table
Calculate instantly →
26 Times Table
Calculate instantly →
27 Times Table
Calculate instantly →
Simultaneous Equations Solver (2×2)
Calculate instantly →
28 Times Table
Calculate instantly →
Exponent Calculator
Calculate instantly →
29 Times Table
Calculate instantly →
30 Times Table
Calculate instantly →
Times Tables Mega Calculator
Calculate instantly →
Square Root of 10
Calculate instantly →
Square Root of 1
Calculate instantly →
Square Root Mega
Calculate instantly →
Square Root of 2
Calculate instantly →
23 Times Table
Calculate instantly →
Last updated: August 4, 2026 · Folded pairwise, never abc ÷ gcd · Two numbers coincide for the first time at their lcm.