LCM Calculator
Enter two or more whole numbers to find their least common multiple, the smallest number that every one of them divides into. The prime factorization of each number and the greatest common factor are shown too.
Last updated October 20, 2026
Separate numbers with commas or spaces.
Result
LCM = 60
GCF = 2
| 4 | 22 |
|---|---|
| 6 | 2 × 3 |
| 10 | 2 × 5 |
Show the work
Formula: LCM(a, b) = a / GCF(a, b) × b
- Numbers: 4, 6, 10
- LCM(4, 6): GCF is 2, so 4 / 2 × 6 = 12
- LCM(12, 10): GCF is 2, so 12 / 2 × 10 = 60
- Carry the running LCM through each next number, left to right.
Result: LCM = 60
How the least common multiple is found
LCM = product of every prime that appears, each to its highest power
Write each number as a product of primes. The LCM contains every prime that appears in any of the numbers, each taken to the largest exponent it has. This is the smallest number that all of them divide evenly.
For two numbers there is a shortcut: LCM(a, b) = a × b ÷ GCF(a, b). The LCM is the common denominator you need to add fractions with different denominators, and it tells you when repeating cycles line up again.
See how we calculate for the formulas, sources and review schedule behind every calculator.
Also useful alongside this calculator: Fraction Calculator, Exponent Calculator and Log Calculator.
Three ways to find the LCM
Listing multiples is the most direct method and works well for small numbers. Write the multiples of each number until one appears in every list. The multiples of 4 are 4, 8, 12, 16 and the multiples of 6 are 6, 12, 18, so the first shared multiple is 12. This gets slow once the numbers pass about 20, because the answer can be much larger than either number.
Prime factorization scales better and handles any number of inputs, which is what the calculator shows. The GCF shortcut is the quickest by hand for exactly two numbers: for 12 and 18 the GCF is 6, so the LCM is 12 × 18 ÷ 6 = 36. The shortcut does not extend directly to three numbers, since the product of three numbers divided by their GCF is usually not the LCM.
For three or more numbers you can also combine them in pairs, because LCM(a, b, c) = LCM(LCM(a, b), c). For 4, 6 and 10, LCM(4, 6) = 12 and LCM(12, 10) = 60, which matches the prime-factor result. The order you combine them in does not change the answer.
Where the LCM is used
Adding fractions: to add 1/4 + 1/6, use the LCM of the denominators, 12, as the common denominator. That gives 3/12 + 2/12 = 5/12. Any common multiple would work, but the LCM keeps the numbers smallest and usually saves a simplifying step.
Schedules: if one bus leaves every 12 minutes and another every 18 minutes, and both leave at 7:00, they next leave together after LCM(12, 18) = 36 minutes, at 7:36. The same idea applies to rotas, maintenance cycles and repeating lights.
Gears and patterns: a gear with 20 teeth meshed with a gear of 30 teeth returns to its starting position after 60 teeth have passed. The smaller gear has made 3 turns and the larger 2.
How to use the LCM Calculator
- Enter two or more whole numbers, up to 10 numbers.
- Read the LCM, the greatest common factor and the prime factorization of each number.
- Use Copy, Print or Share to keep the result.
Worked example
Find the LCM of 4, 6 and 10. In prime factors, 4 = 2², 6 = 2 × 3 and 10 = 2 × 5. The highest power of 2 is 2², of 3 is 3¹ and of 5 is 5¹. The LCM is 2² × 3 × 5 = 60, so 60 is the smallest number that 4, 6 and 10 all divide into. As a check, 60 ÷ 4 = 15, 60 ÷ 6 = 10 and 60 ÷ 10 = 6 all leave no remainder, and no smaller number does that for all three.
| Numbers | LCM | GCF |
|---|---|---|
| 4 and 6 | 12 | 2 |
| 6 and 8 | 24 | 2 |
| 8 and 12 | 24 | 4 |
| 12 and 18 | 36 | 6 |
| 9 and 15 | 45 | 3 |
| 10 and 25 | 50 | 5 |
| 5 and 7 | 35 | 1 |
Frequently asked questions
How do I find the LCM of two numbers?
Multiply the numbers and divide by their greatest common factor. For 12 and 18 that is 12 × 18 ÷ 6 = 36. This shortcut is for two numbers only. For three or more, use prime factors or combine them in pairs.
What is the LCM of two prime numbers?
Their product, because two different primes share no factor. The LCM of 5 and 7 is 35.
When do I need the LCM?
To add or subtract fractions with different denominators, and to find when repeating cycles, such as two schedules, line up again.
What is the LCM when one number divides the other?
It is the larger number. The LCM of 6 and 18 is 18, because 18 is already a multiple of 6. The same holds for any list: the LCM is never smaller than the largest number you enter.
What if the result is too large, and are my numbers stored?
The LCM can grow very fast: it is at most the product of the numbers. If it is too large to show exactly, the calculator says so and still shows the GCF. Your numbers stay in your browser and are never stored or uploaded.