LCM Calculator
This LCM calculator finds the least common multiple of 2 to 10 whole numbers: the smallest positive number that every one of them divides into evenly. Use it to find the least common denominator before adding fractions, or to work out when repeating events line up again. The result comes with its prime factorization and a step table, and it stays exact even when the LCM runs to 30 digits.
Updated
Results
- LCM in scientific notationShown when the LCM has more than 15 digits
- Prime factorization of the LCMEvery prime with its highest exponent
- Prime factorization of each number
- Greatest common factor (GCF)For reference
- Digits in the LCM
| Step | GCD | Running LCM |
|---|
Results are estimates. See the methodology below.
How to use the calculator
- Enter 2 to 10 positive whole numbers, separated by commas or on separate lines, for example 12, 18, 30. Each can be as large as 1,000,000,000,000,000.
- Read the LCM and its number of digits. Results longer than 15 digits are also shown in scientific notation.
- Compare the factorizations. You see each number broken into primes, plus the factorization of the LCM.
- Follow the table to see how the LCM grows as each number is added.
How the LCM is calculated
Using the GCD
For two numbers, the LCM and the greatest common divisor are linked: lcm(a, b) = a × b ÷ gcd(a, b). For 8 and 12, gcd = 4, so lcm = 96 ÷ 4 = 24. For a longer list, the calculator folds the numbers in one at a time: lcm(a, b, c) = lcm(lcm(a, b), c). Each row of the table shows the pair, its gcd and the running LCM. The arithmetic uses exact big integers, so nothing is rounded or overflows.
Using prime factorization
Write every number as a product of primes and keep every prime that appears anywhere, each with its highest exponent. 12 = 2² × 3, 18 = 2 × 3² and 30 = 2 × 3 × 5, so the LCM is 2² × 3² × 5 = 180. This is the mirror image of the GCF, which keeps only the shared primes with their lowest exponents. The GCF is shown among the results so you can see both.
Worked examples
1. Three repeating schedules: 12, 18 and 30
| Step | GCD | Running LCM |
|---|---|---|
| lcm(12, 18) | 6 | 36 |
| lcm(36, 30) | 6 | 180 |
The LCM is 180. If one task repeats every 12 days, another every 18 days and a third every 30 days, and all three fall on the same day today, they next coincide in 180 days.
2. Least common denominator: 1/8 + 5/12
LCM(8, 12) = 24, so rewrite the fractions as 3/24 and 10/24 and add them: 13/24. A larger common denominator such as 96 also works, but you would have to simplify at the end. The fraction calculator does this addition for you.
3. Every number from 1 to 10
The smallest number divisible by 1, 2, 3 … 10 is 2,520 = 2³ × 3² × 5 × 7. The table shows that adding 6 and 10 doesn't change the running LCM, because 60 and 2,520 are already multiples of them.
Reading the result
The LCM is always at least as large as the biggest number you enter, and it equals that number when the others divide into it: LCM(12, 60) = 60. It equals the product of two numbers only when they are coprime: LCM(7, 9) = 63. LCMs grow quickly, since two 15-digit primes such as 999,999,999,999,989 and 999,999,999,999,947 have an LCM with 30 digits.
Frequently asked questions
What is the LCM used for?
The most common school use is the least common denominator: before adding or subtracting fractions such as 1/8 and 5/12, convert both to the LCM of the denominators, 24. It also answers "when will these line up again?" questions about cycles, rotations and repeating schedules.
How do you find the LCM of three or more numbers?
Take the LCM of the first two numbers, then the LCM of that result and the next number, and so on. For 12, 18 and 30: lcm(12, 18) = 36, then lcm(36, 30) = 180. The order of the numbers doesn't change the answer.
Is the LCM just the numbers multiplied together?
Only when the numbers share no common factor. 7 × 9 = 63 is the LCM of 7 and 9, but 4 × 6 = 24 is not the LCM of 4 and 6: they share the factor 2, so the LCM is 24 ÷ 2 = 12.
How is the LCM different from the GCF?
The LCM is the smallest number that all of your numbers divide into; the greatest common factor is the largest number that divides into all of them. For 12, 18 and 30 the LCM is 180 and the GCF is 6. To simplify a fraction or split items into equal groups, use the GCF calculator instead.
Why is the result also shown in scientific notation?
When the LCM has more than 15 digits, a short form is easier to read: LCM(123,456,789, 987,654,321) = 13,548,070,123,626,141 is also shown as 1.354807 × 10¹⁶. The full exact value always comes first, and the digit count tells you its size.
Can I enter zero, negative numbers or fractions?
No. Enter positive whole numbers from 1 up to 1,000,000,000,000,000. The least common multiple is defined here as a positive number, so zero and negatives aren't accepted, and LCMs of fractions or polynomials aren't supported.
Sources
This calculator is a learning aid. For graded work, show the method your teacher asks for.