LCM calculator
Enter two or more whole numbers and see their least common multiple, the smallest number that all of them divide into, with the steps.
Whole numbers, separated by a semicolon, comma or space.
Fill in the fields; the answer appears here straight away.
How it's worked out
How it works
-
Enter the values
Type the numbers or the formula. Decimals may use a point or a comma. No idea? Click Fill in an example.
-
Instant answer
The answer appears as you type, with the most important intermediate values.
-
See the working
Under "How it's worked out" you see the steps, handy for checking your own calculation.
What is the LCM?
The least common multiple (LCM) is the smallest positive number that is a multiple of each of your numbers. The LCM of 4, 6 and 15 is 60: 60 is in the 4 times table, the 6 times table and the 15 times table, and no smaller number is.
How it is calculated
For two numbers, LCM(a, b) = a × b ÷ GCD(a, b). For more numbers, repeat it: LCM(4, 6) = 12, then LCM(12, 15) = 12 × 15 ÷ 3 = 60. Using the GCD keeps the numbers small, so it works for large inputs too.
Where you need it
When adding fractions with different denominators: for 1/4 + 1/6, the LCM 12 is the common denominator. It also tells you when repeating events line up, such as two buses leaving every 4 and 6 minutes, which leave together again after 12 minutes. See also add fractions.
The prime factor method
Write each number as a product of primes and take every prime to its highest power. 12 = 2² × 3 and 18 = 2 × 3², so the LCM is 2² × 3² = 36. Multiplying the two numbers would give 216, which is a common multiple but far from the smallest.
Coprime numbers
When two numbers share no factor, their LCM is just their product: 8 and 9 give 72. That is the largest value an LCM of two numbers can have.
Timing problems
Bus A leaves every 12 minutes and bus B every 18. They leave together again after LCM(12, 18) = 36 minutes. The same idea gives the day that two people on different rotas are both off, or the gear teeth that line up again. For the largest shared factor, see the GCD calculator.
Frequently asked questions
What is the difference between the LCM and the GCD?
The GCD is the largest number that divides all your numbers, the LCM the smallest number that all of them divide. For 12 and 18 the GCD is 6 and the LCM is 36.
Can the LCM be smaller than the biggest number?
No. The LCM is at least as large as the largest number, and equals it when every other number divides it, as with 3, 4 and 12.
How do I find the LCM of three numbers?
Find the LCM of the first two, then of that result and the third. For 4, 6 and 15, LCM(4, 6) = 12 and LCM(12, 15) = 60.
How do I use the LCM to add fractions?
It is the smallest common denominator. For 1/4 + 1/6 the LCM of 4 and 6 is 12, so you add 3/12 and 2/12 to get 5/12.