LCM Calculator
This LCM calculator finds the least common multiple of 2 to 20 whole numbers: the smallest positive number that every one of them divides into exactly. It builds a prime-power table showing which power of each prime was chosen, lists multiples side by side for small inputs, applies the a × b ÷ GCF formula pair by pair, and gives the GCF as a second result.
How to use the LCM calculator
- Enter two or more whole numbers, separated by commas or spaces. The calculator starts with
4, 6, 10. - Read the least common multiple at the top. For 4, 6 and 10 it is 60.
- Check the prime-power table. It lists every prime that appears in any of your numbers and marks the highest power of each:
2²from 4,3from 6,5from 10. - For small inputs, look at the listed multiples of each number, written out until the first one they all share.
- Follow the pairwise formula steps, and note the GCF shown underneath, which is 2 for this set.
You can enter up to 20 numbers. The multiples listing only appears when the numbers are small enough for it to be readable; the prime-power table and the formula work at any size. If you would rather see the greatest common factor worked in full, the GCF calculator takes the same list. For the hand methods compared side by side, read how to find the GCF and LCM.
What the least common multiple is
A multiple of a number is that number times 1, 2, 3 and so on: the multiples of 4 are 4, 8, 12, 16, 20 and onward. Multiples are the mirror image of factors, which divide into a number; the factor calculator lists those. A common multiple of several numbers appears in every one of their lists. The least common multiple is the smallest of those, leaving out 0.
Common multiples never run out. Once you have the LCM, every other common multiple is a multiple of it. The common multiples of 4, 6 and 10 are 60, 120, 180, 240 and so on, so finding the least one tells you all of them.
The LCM is always at least as big as the largest number in the set, and at most the product of all of them. It equals the largest number when that number is already a multiple of the others: the LCM of 3, 6 and 12 is 12. It equals the product when the numbers share no prime factor, as with 7 and 9, whose LCM is 63. The numbers do not have to be prime numbers themselves for that to happen; 9 is not prime.
Three ways to find the LCM
Listing multiples
Write out multiples of each number until one value appears in every list. This is what the calculator shows for small inputs, and it is the clearest way to see what the LCM means.
12 is common to 4 and 6, and 20 is common to 4 and 10, but neither is a multiple of all three. Listing gets slow once the LCM runs into the hundreds.
The prime-power table
Factor each number into primes (the prime factorization calculator shows this with a division ladder), then build a table with one column per prime.
| Number | Power of 2 | Power of 3 | Power of 5 |
|---|---|---|---|
| 4 | 2² | — | — |
| 6 | 2¹ | 3¹ | — |
| 10 | 2¹ | — | 5¹ |
| Highest | 2² | 3¹ | 5¹ |
Why the highest power? The LCM has to be divisible by 4, which needs two 2s. A number with only one 2 would be divisible by 6 and 10 but not by 4. Taking the largest exponent of each prime gives the smallest number that still contains each original number inside it.
The GCF formula, pair by pair
Multiplying a and b counts their shared factors twice; dividing by the GCF removes the duplicate. This route is fast for large numbers because the GCF comes from Euclid’s repeated division with no factoring needed.
Worked examples
Example: LCM of 6 and 8 by listing
The product 48 is a common multiple too, but not the least one, because 6 and 8 share a factor of 2.
Example: LCM of 12 and 18 by the formula
Check: 36 ÷ 12 = 3 and 36 ÷ 18 = 2, and the only smaller multiple of 18 is 18 itself, which 12 does not divide.
Example: LCM of 8, 12 and 15 by prime powers
The GCF of 8, 12 and 15 is 1, since no prime appears in all three, yet the LCM is 120 rather than 8 × 12 × 15 = 1,440. Sharing a prime between some of the numbers is enough to bring the LCM below the product.
Where the LCM comes up
Adding and subtracting fractions
The least common denominator of two fractions is the LCM of their denominators. To add 1/4 + 1/6, take lcm(4, 6) = 12, rewrite as 3/12 + 2/12, and get 5/12. Using the plain product 24 also works but leaves a fraction to reduce. The least common denominator calculator rewrites each fraction over the LCD for you, how to add fractions explains the method, and the fraction calculator finishes the arithmetic.
Repeating events
One bus leaves every 12 minutes and another every 18 minutes. If both leave together now, they next leave together in lcm(12, 18) = 36 minutes. The same logic answers questions about blinking lights, gears returning to the same position and rotating schedules.
Matching package sizes
Hot dogs come 10 to a pack and buns 8 to a pack. The smallest number of each you can buy with nothing left over is lcm(10, 8) = 40: 4 packs of hot dogs and 5 packs of buns. Any question asking for the smallest amount that works for both, or when next things line up, is an LCM question.
LCM of common number pairs
Every row satisfies LCM = product ÷ GCF. When the GCF is 1, the LCM is simply the product. Pairs that come up in times tables and fraction homework:
| Numbers | GCF | Product | LCM |
|---|---|---|---|
| 2 and 3 | 1 | 6 | 6 |
| 3 and 4 | 1 | 12 | 12 |
| 4 and 6 | 2 | 24 | 12 |
| 4 and 10 | 2 | 40 | 20 |
| 6 and 8 | 2 | 48 | 24 |
| 6 and 9 | 3 | 54 | 18 |
| 7 and 9 | 1 | 63 | 63 |
| 8 and 12 | 4 | 96 | 24 |
| 9 and 12 | 3 | 108 | 36 |
| 10 and 12 | 2 | 120 | 60 |
| 10 and 15 | 5 | 150 | 30 |
| 12 and 15 | 3 | 180 | 60 |
| 12 and 18 | 6 | 216 | 36 |
| 15 and 20 | 5 | 300 | 60 |
| 16 and 24 | 8 | 384 | 48 |
| 18 and 24 | 6 | 432 | 72 |
Reading down the LCM column against a multiplication chart is a good check: the LCM of two numbers is the first value that appears in both of their rows. Two larger results worth knowing: the LCM of every number from 1 to 10 is 2,520, and from 1 to 12 it is 27,720.
LCM of three or more numbers
The prime-power table extends to any number of inputs: add a row per number and still take the highest power in each column. The pairwise formula extends too, but only if you feed it a running result: find the LCM of the first two, then the LCM of that answer with the third, and so on.
4 × 6 × 10 ÷ 2 = 240 ÷ 2 = 120, which is a common multiple but twice the true LCM of 60. The product-over-GCF shortcut is only valid for exactly two numbers.Common mistakes
- Taking the lowest power of each prime. That gives the GCF. The LCM needs the highest power that appears anywhere.
- Dropping primes that appear in only one number. The 5 in 10 has to be in the LCM of 4, 6 and 10, even though 4 and 6 do not contain it.
- Assuming the LCM is the product. It is only the product when the numbers share no factor. lcm(6, 8) is 24, not 48.
- Answering 0. Zero is a multiple of everything, which is why it is excluded. The LCM is the smallest positive common multiple.
- Stopping at a value common to only some numbers. When listing for three numbers, 12 is common to 4 and 6 but not 10.
Frequently asked questions
What is the LCM of 4 and 6?
The LCM of 4 and 6 is 12. The multiples of 4 are 4, 8, 12, 16 and the multiples of 6 are 6, 12, 18, so 12 is the first value in both lists. By formula, 4 × 6 ÷ gcf(4, 6) = 24 ÷ 2 = 12. It is also the least common denominator for adding fourths and sixths.
What is the least common multiple of 8 and 12?
The least common multiple of 8 and 12 is 24. In prime form 8 = 2³ and 12 = 2² × 3; taking the highest power of each prime gives 2³ × 3 = 24. Check with the formula: 8 × 12 = 96, the GCF is 4, and 96 ÷ 4 = 24.
What is the LCM of 3, 4 and 5?
The LCM of 3, 4 and 5 is 60. The three numbers share no prime factor, since 4 = 2² while 3 and 5 are prime, so the LCM is their product: 3 × 4 × 5 = 60. That is why 60 divides evenly into thirds, quarters and fifths. If any two of them shared a factor, the LCM would be smaller than the product.
What is the difference between LCM and GCF?
The GCF is the largest number that divides into all of your numbers; the LCM is the smallest number they all divide into. For 12 and 18, the GCF is 6 and the LCM is 36. The GCF is never larger than the smallest input and the LCM is never smaller than the largest. For two numbers, GCF × LCM equals their product: 6 × 36 = 216 = 12 × 18.
Is the LCM always bigger than the numbers?
The LCM is always at least as big as the largest number, but it can be equal to it. When the largest number is already a multiple of all the others, it is the LCM. The LCM of 4 and 12 is 12, and the LCM of 2, 5 and 10 is 10. Otherwise the LCM is strictly larger than every input.
How is the LCM used with fractions?
The LCM of the denominators is the least common denominator, the smallest denominator both fractions can be rewritten over. For 5/6 + 3/8, the LCM of 6 and 8 is 24, so the sum becomes 20/24 + 9/24 = 29/24. Using the LCM instead of the plain product keeps the numbers small and usually avoids reducing at the end.
What is the LCM of two prime numbers?
The LCM of two different primes is their product, because they share no factor other than 1. The LCM of 7 and 11 is 77, and the LCM of 2 and 13 is 26. The same is true for any two coprime numbers, prime or not: 8 and 9 have a GCF of 1, so their LCM is 72.
Related calculators
Guides that use this calculator
Longer explanations of the method behind it, with worked examples.
Put this calculator on your own site (free)
Copy this into any page. The calculator stays up to date on its own, works on mobile, and carries a small credit link back here.
https://fourfunctioncalculator.com/lcm-calculator/