Loading calculator...
- The least common multiple (LCM), also called the lowest common multiple, is the smallest positive number that all of your numbers divide into evenly.
- Enter two to 20 whole numbers, separated by commas, spaces or new lines.
- You also get the prime factors, the GCD and the working, so you can check homework or show your steps.
- It is the number you need to add fractions with different denominators and to line up repeating schedules.
How to use the LCM calculator
Enter your numbers
Type two or more whole numbers into the box. Commas, spaces and new lines all work, so you can paste a list straight in.
Read the LCM
The answer appears at the top as soon as you type. Large results are shown exactly, with no rounding.
Check the working
Below the result you will see each number split into prime factors and how the highest power of every prime builds the LCM.
Change or reset
Edit the list to try other numbers, or press Reset to go back to the example.
The calculator accepts whole numbers from 1 up to 12 digits. Decimals, fractions and negative numbers do not have an LCM in the usual school sense, so they are not accepted.
How to find the LCM
There are four reliable methods. The calculator shows prime factorization and uses the GCD method to double-check it. Listing multiples and the division method (also called the ladder method) are the two you will most often meet in school. The LCM is also known as the lowest, smallest or minimum common multiple. All of these names mean the same number.
Method 1: prime factorization
Write each number as a product of prime numbers.
For every prime that appears, keep its highest power.
Multiply those highest powers together. The product is the LCM.
Example: 12 = 2² × 3 and 18 = 2 × 3², so the LCM is 2² × 3² = 36.
Method 2: using the GCD
LCM(a, b) = (a × b) ÷ GCD(a, b)
For three or more numbers, find the LCM of the first two, then the LCM of that result and the next number, and so on.
If two numbers share no factor other than 1, their GCD is 1 and the LCM is simply their product.
Method 3: listing multiples
Write out the multiples of each number: the number times 1, times 2, times 3 and so on.
Find the first value that appears in every list. That value is the LCM.
This is quick for small numbers, but the lists get long when the numbers are large.
Example: the multiples of 4 are 4, 8, 12, 16, 20 and the multiples of 6 are 6, 12, 18, 24. The first number in both lists is 12, so the LCM of 4 and 6 is 12.
Method 4: the division (ladder) method
Write your numbers in a row. Divide them by a prime number that goes into at least one of them and write the results underneath. A number that does not divide stays as it is.
Keep going, always with a prime, until every number in the row is 1.
Multiply all the divisors you used. That product is the LCM.
Example: for 12, 18 and 24 the rows are 12, 18, 24 then 6, 9, 12 then 3, 9, 6 then 1, 3, 2 then 1, 3, 1 then 1, 1, 1. The divisors were 2, 2, 3, 2 and 3, and 2 × 2 × 3 × 2 × 3 = 72, so the LCM is 72.
Worked example: LCM of 12, 18 and 24
Using prime factors
Break each number into primes, then take the highest power of each one.
So 72 is the smallest number that 12, 18 and 24 all divide into: 72 ÷ 12 = 6, 72 ÷ 18 = 4 and 72 ÷ 24 = 3.
LCM of common pairs of numbers
Quick answers for the pairs people look up most. The last column shows the GCD of each pair: the LCM times the GCD always equals the two numbers multiplied together.
| Numbers | LCM | GCD |
|---|---|---|
| LCM of 2 and 3 | 6 | 1 |
| LCM of 3 and 4 | 12 | 1 |
| LCM of 4 and 6 | 12 | 2 |
| LCM of 5 and 10 | 10 | 5 |
| LCM of 6 and 8 | 24 | 2 |
| LCM of 7 and 9 | 63 | 1 |
| LCM of 8 and 12 | 24 | 4 |
| LCM of 9 and 12 | 36 | 3 |
| LCM of 10 and 15 | 30 | 5 |
| LCM of 12 and 15 | 60 | 3 |
| LCM of 12 and 18 | 36 | 6 |
| LCM of 14 and 21 | 42 | 7 |
| LCM of 15 and 20 | 60 | 5 |
| LCM of 16 and 24 | 48 | 8 |
| LCM of 18 and 24 | 72 | 6 |
| LCM of 20 and 30 | 60 | 10 |
LCM word problems with solutions
Look for clues such as “at the same time”, “together again”, “every” or “the smallest number that fits both”. They usually signal an LCM question. Here are four worked examples, and you can check each one in the calculator above.
Problem 1: two lighthouses
One lighthouse flashes every 15 seconds and another every 20 seconds. They flash together now. After how many seconds will they flash together again?
15 = 3 × 5 and 20 = 2² × 5. Take the highest power of each prime: 2² × 3 × 5 = 60. The lighthouses flash together again after 60 seconds.
Problem 2: pencils and erasers
Pencils are sold in boxes of 6 and erasers in packs of 8. What is the smallest number of each you can buy so that you have the same number of pencils and erasers?
The LCM of 6 and 8 is 24. That is 24 ÷ 6 = 4 boxes of pencils and 24 ÷ 8 = 3 packs of erasers, giving 24 of each.
Problem 3: three runners
Three runners take 4, 6 and 9 minutes to finish one lap of a track. They start together. When will they next cross the start line together?
4 = 2², 6 = 2 × 3 and 9 = 3². The LCM is 2² × 3² = 36, so they meet again after 36 minutes, when the runners have done 9, 6 and 4 laps.
Problem 4: adding fractions
Work out 5/12 + 7/18.
The common denominator is the LCM of 12 and 18, which is 36. Then 5/12 = 15/36 and 7/18 = 14/36, so the sum is 29/36.
When you need the LCM
Adding fractions
To add 1/12 and 1/18 you need a common denominator. The LCM, 36, is the smallest one, which keeps the numbers small.
Repeating schedules
If one bus leaves every 12 minutes and another every 18, they leave together again every 36 minutes.
Gears and cycles
Two meshing gears with 12 and 18 teeth are back in their starting position together after 36 teeth have passed.
Buying in packs
Hot dogs come in packs of 10 and buns in packs of 8. The LCM, 40, is the smallest number of each that matches up.
LCM and GCD: how they connect
The LCM is always at least as large as your biggest number. The greatest common divisor (GCD) is never larger than your smallest. For any two numbers, LCM × GCD = the two numbers multiplied together. Need the other one? Try the GCD calculator.
The GCD is also called the greatest common factor (GCF) or highest common factor (HCF), so you may see this pair written as LCM and GCF, or HCF and LCM.
More math calculators
Working on the same kind of problem? Try the GCD calculator for the greatest common divisor, the average calculator, the square root calculator or the percentage calculator. You can also browse all calculators.
LCM calculator FAQ
What is the LCM of two numbers?
It is the smallest positive number that both numbers divide into with no remainder. The LCM of 4 and 6 is 12, because 12 is the first number that appears in both lists of multiples.
How do I find the LCM of three or more numbers?
Find the LCM of the first two, then the LCM of that answer and the third number, and keep going. Or use prime factors: take the highest power of every prime that appears in any of the numbers and multiply them. This calculator handles up to 20 numbers.
What is the LCM of two prime numbers?
Their product. Primes share no factor other than 1, so the LCM of 7 and 11 is 77.
Can the LCM be smaller than one of the numbers?
No. The LCM is always at least as big as the largest number. It equals the largest number when all the others divide into it, as with 3, 6 and 12.
What is the LCM of a number and 1?
The number itself. Every whole number divides into itself, and 1 divides into everything.
How large can the numbers be?
Each number can have up to 12 digits, and you can enter up to 20 of them. Results are calculated exactly, so even very large LCMs show every digit.
Are the lowest common multiple and the least common multiple the same?
Yes. Least, lowest, smallest and minimum common multiple all describe the same number, usually written LCM. The calculator gives the same answer whichever name you use.
What is the difference between LCM and GCF?
The LCM is the smallest number that all of your numbers divide into, so it is at least as large as the biggest number. The GCF (also called the GCD or HCF) is the largest number that divides into all of them, so it is never larger than the smallest. For 12 and 18 the LCM is 36 and the GCF is 6.
How do I find the LCM of fractions?
To add or subtract fractions, use the LCM of the denominators as the common denominator. To find the LCM of the fractions themselves, with each in lowest terms, divide the LCM of the numerators by the GCD of the denominators. For 2/3 and 4/9 that is LCM(2, 4) ÷ GCD(3, 9) = 4/3.
Can the LCM of two numbers equal their product?
Yes, when the two numbers share no factor other than 1, as with 8 and 9, whose LCM is 72. If they do share a factor, the LCM is smaller than their product.