How this calculator works
Enter your numbers and the answer updates as you type. Two separate pieces of working are shown underneath, because the least common multiple is one of those quantities where the fast route and the explanatory route are different routes.
The factor table is the explanatory one: it takes every number apart into primes and shows which powers survive into the answer. The second card is the fast one, folding the list together a pair at a time using the greatest common divisor. They agree on every list, and seeing both is the quickest way to spot a slip in handwritten working.
LCM(a, b) = (a × b) ÷ GCD(a, b)
LCM(a, b, c) = LCM( LCM(a, b), c )
The middle line is worth a second look. Multiplying two numbers always produces a common multiple, just rarely the smallest one, because whatever they share has been counted twice. Dividing by the greatest common divisor removes exactly that double count, which is the whole trick.
What a common multiple is
Write out the times tables and the idea becomes concrete. Multiples of 12 run 12, 24, 36, 48, 60, 72. Multiples of 18 run 18, 36, 54, 72, 90. Numbers appearing in both lists — 36, 72, 108 and onward forever — are the common multiples, and the first of them, 36, is the least common multiple.
There are always infinitely many common multiples and they are all multiples of the smallest one. That is the mirror image of how factors behave, and it explains why the word least is doing real work in the name: without it the question has no single answer.
| Numbers | First few common multiples | LCM |
|---|---|---|
| 12 and 18 | 36, 72, 108 | 36 |
| 4 and 10 | 20, 40, 60 | 20 |
| 6 and 7 | 42, 84, 126 | 42 |
| 9 and 27 | 27, 54, 81 | 27 |
| 15 and 25 | 75, 150, 225 | 75 |
The highest-power rule
Break each number into primes and one rule settles everything: take every prime that shows up anywhere, and use the highest power any single number demands. Nothing may be left out, because the answer has to be divisible by each entry, and nothing extra may be added, because the answer must be the smallest such number.
The three numbers this page starts with make the rule visible:
18 = 2 × 3 × 3
30 = 2 × 3 × 5
LCM = 2² × 3² × 5 = 180
Two is needed twice because 12 asks for two of them. Three is needed twice because 18 asks for two. Five appears once in the whole list and is still compulsory, since without it the answer would not divide by 30. Note how this inverts the factor rule used for a greatest common factor, where the lowest power wins instead — the same factor table answers both questions, read in opposite directions.
The GCD shortcut, and when it breaks
For two numbers there is a one-line route that avoids factoring altogether. Multiply them, then divide by their greatest common divisor:
= 216 ÷ 6 = 36
Because the greatest common divisor can be found by repeated division in a handful of steps, this stays fast no matter how long the numbers get, and it is how the second card below does the work.
The trap is extending it to three numbers. Multiplying all three and dividing by the greatest common divisor of the three is simply wrong: for 4, 6 and 10 that gives 240 ÷ 2 = 120, while the true LCM is 60. The shortcut is a statement about pairs, so a longer list has to be folded a pair at a time — find the LCM of the first two, then the LCM of that result with the third. Our GCF calculator computes the divisor side of the same relationship if you need it on its own.
Why longer lists grow so fast
A longer list pushes the answer upward or leaves it exactly where it was; it never brings it down. An entry that already divides the running total contributes nothing. An entry carrying a prime none of the others has multiplies the total by that prime on the spot.
| List | LCM | What the new number did |
|---|---|---|
| 12, 18 | 36 | Starting pair |
| 12, 18, 30 | 180 | 30 brings a 5, so the answer is multiplied by 5 |
| 12, 18, 30, 45 | 180 | 45 already divides 180, so nothing moves |
| 12, 18, 30, 45, 7 | 1260 | 7 shares nothing, so the answer is multiplied by 7 |
That middle row is the one people second-guess. A larger number entering the list does not automatically mean a larger answer — what matters is whether it needs primes, or powers of primes, that the running total does not already carry.
Adding fractions: the LCM as a denominator
The most common reason anyone needs this at school is adding fractions. To add 5/12 and 7/18 the two denominators have to agree, and the least common denominator is nothing other than the least common multiple of 12 and 18.
5/12 = 15/36 7/18 = 14/36
15/36 + 14/36 = 29/36
Multiplying the denominators instead would have given 216, and the sum would come out as 174/216 — the right value in clumsy clothing, needing cancelling afterwards. Starting from the least common multiple means the answer arrives already in lowest terms, which is why the method is taught that way round.
Timetables, cycles and packaging
Away from fractions, the least common multiple answers the question when do these line up again? Two buses leaving the same stop every 12 and 18 minutes next depart together 36 minutes later. Lights blinking every 4 and 10 seconds coincide every 20 seconds. A shift pattern repeating every 6 days against a 14-day rota repeats as a combined pattern every 42 days.
The packaging version is just as common: hot dogs in packs of 10 and buns in packs of 8 come out even for the first time at 40 of each, which is 5 packs of buns and 4 of hot dogs. Gear teeth, engine timing, polling intervals in software and planetary orbits are all the same calculation wearing different units.
Edge cases and common mistakes
- Confusing it with the GCF. The least common multiple sits at or above your largest number; the greatest common factor sits at or below your smallest. An answer on the wrong side of that fence means the wrong tool.
- Multiplying everything together. That is always a common multiple and usually not the least one. It is only correct when the numbers share no factors at all.
- Repeating a number. Entering 12 twice changes nothing — the LCM of 12 and 12 is 12.
- A 1 in the list. One divides everything, so it never affects the answer.
- Zero. Every number divides into zero, so there is no smallest positive common multiple involving it. Zero is refused here, which is the same position the standard references take.
What this page does not do
Positive whole numbers only. Fractions, decimals and algebraic terms such as 6x³ are outside its scope, though the highest-power rule carries over to those cases unchanged. It does not reduce the fractions it helps you add either — our fraction calculator handles the whole operation, and the factor calculator lists every factor of a single number.
All the arithmetic happens on your own device and stays whole-number throughout, so a long answer is printed digit for digit instead of being rounded into scientific notation. Nothing is uploaded.
Frequently asked questions
What is the least common multiple?
It is the smallest number that every number on your list divides into exactly. For 12 and 18 that number is 36: it is the first value that appears in both the 12 times table and the 18 times table.
How do you find the LCM of three numbers?
Enter all three at once. The calculator takes every prime that appears anywhere in the list and raises it to the highest power any single number uses, then multiplies those together. Doing the first pair and then folding the third one in gives the same answer.
What is the difference between LCM and LCD?
None, arithmetically. The least common denominator of a set of fractions is just the least common multiple of their denominators, so this page answers an LCD question if you enter the bottom numbers of your fractions.
Is the LCM always the two numbers multiplied together?
Only when they share no factor. 7 and 9 have nothing in common, so their LCM is the full 63. 12 and 18 share a factor of 6, so their LCM is 36 rather than 216 — the shared part is counted once instead of twice.
Can the LCM be smaller than the largest number entered?
Never. Every multiple of a number is at least as big as the number itself, so the answer always sits at or above the largest entry. It equals that entry exactly when the largest number is already a multiple of all the others, as with 5, 10 and 40.
Why does my answer get so large with three or four numbers?
Each new number can introduce primes none of the others carry, and every one of those has to be multiplied in. Lists of unrelated numbers grow fastest, which is why 7, 11 and 13 jump straight to 1,001 while 4, 8 and 16 stay at 16.
How many digits can this handle?
Entries of up to 19 digits are accepted, and the answer is worked out in exact integer arithmetic, so a long LCM is printed in full rather than rounded off into scientific notation.
This calculator is offered for general educational and practical use. Every figure is produced in exact integer arithmetic and cross-checked against an independent reference implementation, though any number you rely on for coursework or production scheduling deserves a second look. Our about page explains how these tools are built and tested, and the privacy policy covers what is and is not collected.