How to use the LCM calculator
- Type two or more whole numbers, separated by commas, spaces or new lines. You can enter up to 30.
- The least common multiple appears at the top as you type.
- Compare the two methods in the working: prime factorization and using the GCF.
- The last table shows how many times each number goes into the LCM, which is what you multiply by when giving fractions a common denominator.
Zero is not allowed, because the only multiple of 0 is 0. Negative numbers are fine; their sign is ignored.
How the least common multiple is calculated
Method 1 works because a multiple of a number has to contain all of that number's prime factors. Taking every prime at the highest power that any of your numbers needs gives the smallest number that contains them all.
Method 2 uses the greatest common factor. Multiplying a and b counts their shared factors twice, and dividing by the GCF removes the extra copy. For a list, combine the numbers two at a time. The calculator divides before it multiplies, so the numbers stay small.
Worked example
The calculator starts with 4, 6 and 15.
Method 1, prime factorization:
- 4 = 2², 6 = 2 × 3, 15 = 3 × 5.
- The primes involved are 2, 3 and 5. Their highest powers are 2², 3¹ and 5¹.
- LCM = 2² × 3 × 5 = 4 × 3 × 5 = 60.
Method 2, using the GCF:
- LCM(4, 6) = 4 × 6 ÷ GCF 2 = 24 ÷ 2 = 12.
- LCM(12, 15) = 12 × 15 ÷ GCF 3 = 180 ÷ 3 = 60.
Check: 60 ÷ 4 = 15, 60 ÷ 6 = 10 and 60 ÷ 15 = 4, all whole numbers, and no smaller number works for all three.
Using the LCM to add fractions
To add 1/4 + 1/6 + 2/15, you need a common denominator, and the LCM of 4, 6 and 15 is the smallest one. Multiply each fraction's top and bottom by the number in the last table: 1/4 = 15/60, 1/6 = 10/60 and 2/15 = 8/60. The sum is 33/60, which reduces to 11/20. Using the plain product 4 × 6 × 15 = 360 also works, but it leaves bigger numbers to simplify at the end.
| Numbers | LCM | GCF | Note |
|---|---|---|---|
| 4 and 6 | 12 | 2 | 12 = 4 × 6 ÷ 2 |
| 12 and 18 | 36 | 6 | 36 = 12 × 18 ÷ 6 |
| 7 and 9 | 63 | 1 | Coprime numbers: the LCM is their product |
| 8 and 24 | 24 | 8 | When one divides the other, the LCM is the larger |
| 1 to 10 | 2,520 | 1 | The smallest number divisible by 1, 2, 3, … 10 |
Frequently asked questions
What is the difference between the LCM and the GCF?
The LCM is the smallest number that all your numbers divide into, so it is at least as big as the largest of them. The GCF is the biggest number that divides into all of them, so it is at most the smallest. For 12 and 18, the LCM is 36 and the GCF is 6. The GCF calculator shows the GCF with Euclid's algorithm.
Is the LCM always the product of the numbers?
Only when the numbers share no common factor. 7 × 9 = 63 is the LCM of 7 and 9, but 4 × 6 = 24 is twice the LCM of 4 and 6, because 4 and 6 share the factor 2.
Can I find the LCM of more than two numbers?
Yes. Either take the highest power of every prime across all the numbers, or find the LCM of the first two and then combine that with the next number, and so on. The calculator shows both ways for up to 30 numbers.
Where is the LCM used outside of fractions?
It answers "when do these line up again" questions. If one bus comes every 12 minutes and another every 18 minutes, and both leave at 9:00, they next leave together after the LCM, 36 minutes, at 9:36. Gear teeth, repeating schedules and musical rhythms work the same way.
Related calculators
- GCF Calculator — Greatest common factor of two or more whole numbers, with Euclid's algorithm and a prime factorization check.
- Prime Factorization Calculator — Break a number into prime factors with exponents, see the factor tree, check if it is prime and count its divisors.
- Fraction Calculator — Add, subtract, multiply and divide fractions and mixed numbers, simplify fractions and turn decimals into fractions.
- Common Factor Calculator — Every factor shared by two or more whole numbers, with the greatest common factor and each number's factor list.
Results are calculated in your browser. Double-check anything important before you rely on it. See our disclaimer.