LCM Calculator
Least common multiple of any set of whole numbers, showing where their multiples first meet.
Updated
2 numbers found. Two or more whole numbers. Decimals are ignored.
Least common multiple
36
The smallest number all 2 divide into exactly.
- Greatest common factor
- 6
- 36 ÷ 12
- 3
- 36 ÷ 18
- 2
Where the multiples meet
12: 12, 24, 36
18: 18, 36
Every number here divides the least common multiple exactly, which is what makes it a common multiple; nothing smaller does, which is what makes it the least. That is why adding fractions with these denominators works cleanly at 36 and at no smaller number.
The shortcut for two numbers is LCM = a × b ÷ GCF: 12 × 18 ÷ 6 = 36. It holds for pairs only, so with three or more the safe route is to fold pairwise rather than multiply everything at once.
Advertisement
In short
How do you find the least common multiple?
Multiply the two numbers and divide by their greatest common factor. For 12 and 18 that is 216 divided by 6, giving 36. Listing multiples works too: 12, 24, 36 and 18, 36 first meet at 36.
The shortcut is a pair rule. With three or more numbers, fold them two at a time.
How to use the LCM calculator
The least common multiple of a set of whole numbers is the smallest number that every one of them divides into without remainder. It is the number you need when adding fractions, when working out when two repeating events coincide, and whenever several different cycle lengths have to line up. Three methods find it and they suit different situations.
Listing multiples is the slowest and the most convincing. Write out 12, 24, 36, 48 and 18, 36, 54, and the first number appearing in both lists is 36. It takes longer than the alternatives but it shows exactly what the answer means, which is why it is worth doing once before switching to something quicker.
36
LCM of 12 and 18
where their multiples first meet
216 ÷ 6
The shortcut
product over the GCF
2,520
LCM of 1 through 10
and of 1 through 9 too
The shortcut is faster: multiply the two numbers and divide by their greatest common factor. Twelve times eighteen is 216, and dividing by their greatest common factor of 6 gives 36. This works because the product counts every shared factor twice, and dividing by the greatest common factor removes exactly one copy of each.
Advertisement
The prime factorisation method is the one that scales and explains. Break every number into primes, then take each prime that appears anywhere, raised to the highest power it reaches in any of them. Twelve is 2² × 3 and eighteen is 2 × 3²; the highest powers are 2² and 3², and 4 × 9 is 36.
- List the multiples
- slowest, and shows what it means
- Product ÷ GCF
- fastest for two numbers
- Highest power of each prime
- works for any count
- Pairwise fold
- what to use for three or more
- All four give
- the same number, always
This page folds pairwise, which keeps every intermediate value at or below the final answer. Multiplying a long list first and dividing afterwards can exceed the safe integer range before the division ever happens.
If the question is which is genuinely fastest by hand, the answer depends on the size of the numbers rather than on preference. Below about a hundred, product over GCF wins for two numbers because the GCF is usually visible at a glance. Above that, or for three or more values, prime factorisation wins because it never asks you to multiply two large numbers together at all.
Find the factor they share instead
The greatest common factor is the other half of the same computation, and knowing one gives you the other in a single division.
Open the GCF calculator →Least common multiples for pairs that come up often, with the greatest common factor alongside so the product identity can be checked.
| Numbers | LCM | GCF |
|---|---|---|
| 12 and 18 | 36 | 6 |
| 24 and 36 | 72 | 12 |
| 24 and 12 | 24 | 12 |
| 24 and 48 | 48 | 24 |
| 4 and 6 | 12 | 2 |
| 6 and 8 | 24 | 2 |
| 3 and 5 | 15 | 1 |
| 7 and 13 | 91 | 1 |
| 10 and 15 | 30 | 5 |
| 9 and 12 | 36 | 3 |
| 2 and 8 | 8 | 2 |
| 25 and 30 | 150 | 5 |
| 16 and 24 | 48 | 8 |
| 4, 6 and 10 | 60 | 2 |
| 45, 24 and 36 | 360 | 3 |
Common multiples are infinite; the LCM is one of them
Most of the demand here is phrased as a common multiple calculator rather than a least common multiple calculator, and the difference is worth taking seriously rather than treating as loose wording. A pair of numbers does not have a common multiple. It has infinitely many, and the least one is simply the first.
Six and eight share 24, and they also share 48, 72, 96 and every step of 24 after that forever. Once you have the least common multiple, you have all of them: every common multiple of a set is a whole-number multiple of their LCM, and nothing else is. There is no common multiple hiding between 24 and 48 for these two, and no rule to memorise beyond that one.
- LCM of 6 and 8
- 24
- So the common multiples are
- 24, 48, 72, 96, 120 …
- Written as a rule
- k x 24, for k = 1, 2, 3 …
- Is 60 a common multiple?
- no — 60 is not a multiple of 24
- One number answers all of it
- the least, then count upwards
That test is the practical value of the LCM. Checking whether some candidate is a common multiple of a whole set becomes a single division by their LCM, rather than a division by each number in turn.
The same reasoning explains why zero is excluded, and this page states the convention rather than assuming it. Zero is a multiple of every whole number, so without the word positive in the definition zero would win every time and the whole idea would collapse. The edge cases section below carries what this calculator does about it.
The job it does most often: common denominators
Adding fractions needs both to sit over the same denominator, and any common multiple of the two denominators will work. Using the least one keeps the numbers small and usually means no reducing afterwards. Multiplying the denominators together always works too and often leaves a fraction that still needs reducing.
- Multiply the denominators
- 6 × 8 = 48
- Least common multiple
- 24
- Over 48
- 8/48 + 6/48 = 14/48
- Over 24
- 4/24 + 3/24 = 7/24
- Both reduce to
- 7/24
The two routes agree, as they must. The difference is that 14/48 still needs reducing by 2 while 7/24 is already finished, and on messier denominators the gap between the two grows quickly.
The same reasoning covers anything cyclical. Two buses leaving every 12 and 18 minutes depart together every 36 minutes. Two gears with 12 and 18 teeth return to their starting alignment after 36 teeth have passed. The least common multiple is where repeating things resynchronise.
Zero, one, and numbers that share nothing
When two numbers are coprime — sharing no factor above one — their least common multiple is simply their product. Seven and thirteen have nothing in common, so the first number they both divide is 91. That is also the largest the least common multiple can ever be for a given pair.
Do
- Use the product-over-GCF shortcut for exactly two numbers
- Fold pairwise when there are three or more
- Take the highest power of each prime when factorising
- Expect the LCM of coprime numbers to be their product
Don't
- Extend the shortcut to three numbers
- Assume the LCM is always larger than every input
- Include zero in the list
- Multiply a long list together before dividing
Zero is the case worth stating. Under the definition taught in schools — the least POSITIVE common multiple — zero has no least common multiple with anything, because every multiple of zero is zero and zero is not positive. Some programming libraries adopt the convention that it returns zero instead. This page follows the school definition and declines the input rather than printing a number that means something different depending on who is reading.
Advertisement
The formula, worked line by line
One shortcut, one general method, and a rule about when the shortcut stops applying. The general method never fails, which is why it is worth knowing even though it is slower to write out.
“The product counts every shared factor twice. Dividing by the greatest common factor removes one copy of each, and what is left is the least common multiple.”
Seeing it that way also explains the failure with three numbers: the shared factors no longer appear a predictable number of times in the product, so there is no single quantity to divide out.
lcm(a, b) = a × b ÷ gcf(a, b)
lcm(a, b, c) = lcm(lcm(a, b), c)
lcm = product of each prime, raised to its highest power
coprime numbers: lcm(a, b) = a × b
if a divides b, then lcm(a, b) = b- 12 breaks into
- 2 × 2 × 3, or 2² × 3
- 18 breaks into
- 2 × 3 × 3, or 2 × 3²
- Highest power of 2
- 2² = 4
- Highest power of 3
- 3² = 9
- Multiply them
- 4 × 9 = 36
Compare this with the greatest common factor, which takes the LOWEST power of each shared prime instead: 2¹ × 3¹ = 6. The two operations are mirror images, which is exactly why one gives the other in a single division.
When the LCM is one of the inputs
If one number already divides another, the larger one is the answer. Two divides eight, so the least common multiple of 2 and 8 is 8, not 16. It surprises people who expect the answer to be bigger than everything they entered, and it is the reason the three-number shortcut fails on 2, 4 and 8.
A number worth recognising
- 1 to 5
- 60
- 1 to 6
- 60 — 6 adds nothing new
- 1 to 8
- 840
- 1 to 10
- 2,520
- 1 to 12
- 27,720
The second row shows the pattern: adding 6 changes nothing, because 6 is 2 × 3 and both are already present. Only a new prime, or a higher power of an existing one, moves the answer.
That is why 2,520 turns up so often in puzzles and in problems about coincidence — it is the smallest number divisible by everything from one to ten, and adding 9 to the list is what pushes it there rather than the 10.
Advertisement
Questions people ask
How do you find the least common multiple?
For two numbers, multiply them together and divide by their greatest common factor: 12 × 18 is 216, and dividing by 6 gives 36. You can also list the multiples of each and find the first one they share, or take the highest power of every prime that appears in either number.
How do you find the common multiples of two numbers?
Find the least common multiple, then count upwards in steps of it. Six and eight have an LCM of 24, so their common multiples are 24, 48, 72, 96 and so on without end. Every common multiple of a set is a whole-number multiple of their LCM, and no other number qualifies.
What is the fastest way to find the LCM?
For two smallish numbers, multiply them and divide by their greatest common factor: 24 and 36 give 864 divided by 12, which is 72. For larger numbers or for three or more values, use prime factorisation instead — take each prime that appears anywhere, raised to the highest power it reaches, which avoids multiplying large numbers together at all.
Does the product-over-GCF shortcut work for three numbers?
No. For 2, 4 and 8 the product is 64 and the greatest common factor is 2, which would suggest 32, but the real least common multiple is 8. The shortcut is a pair rule. With three or more numbers, take the LCM of the first two and then fold in the next.
Can the least common multiple be one of the numbers?
Yes, whenever one number divides another. The least common multiple of 2 and 8 is 8, because 8 is already a multiple of 2. The answer is never smaller than the largest input, but it is often equal to it, which surprises people expecting it to be bigger than everything entered.
What is the LCM used for?
Most often for finding a common denominator when adding fractions, since the least common multiple of the denominators keeps the numbers small. It also answers any question about repeating cycles coinciding — when two buses on 12 and 18 minute intervals leave together, or when gears with different tooth counts realign.
What is the least common multiple of a number and zero?
Under the usual school definition — the smallest POSITIVE common multiple — there is none, because every multiple of zero is zero and zero is not positive. Some programming libraries adopt the convention of returning zero. This calculator follows the school definition and declines the input rather than printing a number whose meaning depends on the convention.
Sources
Where the constants and formulas on this page come from. Each line names the figure it backs.
The least common multiple of two integers is the smallest positive integer divisible by both, and equals their product divided by their greatest common divisor.
Least Common Multiple — Wolfram MathWorld
Students find the least common multiple of two whole numbers less than or equal to twelve.
CCSS.Math.Content.6.NS.B.4 — Common Core State Standards Initiative
Every integer greater than one has a unique prime factorisation, which is what makes the highest-power method well defined.
Fundamental Theorem of Arithmetic — Wolfram MathWorld
Related guides
Math
Why the Quadratic Formula Loses Accuracy on One of Its Two Roots
Completing the square takes four lines and produces the formula. It also shows which of the two roots is safe to trust, and the calculator on this site was corrected to use the other route.
August 19, 2026 · 10 min read
Math
Geometry Backwards: Finding the Radius from the Area
Every geometry formula is printed in the direction you need least. Running it backwards is not the same operation reversed; it is a root, and roots can refuse.
August 17, 2026 · 10 min read
Math
When Cross Multiplication Gives You the Wrong Answer
Cross multiplication answers every question you put to it, including the ones it should refuse. The test is one line: if the input were zero, would the output be zero?
August 17, 2026 · 10 min read