Least Common Multiple (LCM) Calculator
List two or more whole numbers and get their least common multiple, the smallest positive number that every one of them divides evenly. The guide below shows three ways to find it by hand.
Related calculators
Created by the Reeliy Editorial Team. Last updated: Oct 19, 2026
What is the least common multiple?
A multiple of a number is what you get by multiplying it by 1, 2, 3 and so on. Two numbers usually have many multiples in common, and the smallest of those shared multiples is their least common multiple, written LCM. It is also called the lowest common multiple or the smallest common multiple.
The multiples of 4 start 4, 8, 12, 16, 20, 24 and those of 6 start 6, 12, 18, 24, 30. The numbers 12 and 24 appear in both lists, and the first one is 12, so the LCM of 4 and 6 is 12.
How to use the calculator
Type your numbers into the box, separated by commas, spaces, tabs or line breaks, and press Calculate. You can enter as many numbers as you like. Keep these points in mind:
- With two or more numbers, signs are ignored, so −4 and 6 give 12.
- If any number is 0 the answer is 0, since 0 is the only common multiple of 0 and anything else.
- A single number is returned unchanged.
- Whole numbers are the dependable case. Decimals only work when they are exact binary fractions such as 0.5, 1.5 or 0.125; see the limits section for a workaround.
Method 1: list the multiples
Write out the multiples of each number until one value turns up in every list. This is easy for small numbers, as in the 4 and 6 example above, but it gets long when the answer is large.
Method 2: prime factorization
Break each number into prime factors, then multiply together each prime raised to the highest power in which it appears in any of the numbers.
Example: find the LCM of 12, 18 and 30. First factor them: 12 = 22 × 3, 18 = 2 × 32, 30 = 2 × 3 × 5. The highest powers are 22, 32 and 5, so the LCM is 4 × 9 × 5 = 180.
Method 3: use the greatest common divisor
For two numbers, the product equals the GCD times the LCM, so the LCM can be found by dividing the product by the greatest common divisor:
lcm(a, b) = |a × b| ÷ gcd(a, b)
Example: gcd(12, 18) = 6, so lcm(12, 18) = 216 ÷ 6 = 36. For more than two numbers, apply the rule to the first two and then combine the answer with the next number: lcm(36, 30) = 1080 ÷ 6 = 180, matching the prime-factor result. The GCD calculator finds the divisor for you.
Where the LCM is useful
- Fractions. The LCM of the denominators is the least common denominator, which keeps sums and differences of fractions as small as possible. The LCD calculator does this directly, and the fractions calculator handles the full arithmetic.
- Schedules. Two buses leave a stop every 12 and every 18 minutes. They leave together again after lcm(12, 18) = 36 minutes.
- Gears and cycles. Meshed gears with 24 and 36 teeth return to their starting alignment after 72 teeth have passed: 3 turns of the small gear and 2 turns of the large one.
- Repeating patterns. The LCM tells you when two repeating events, such as maintenance every 15 and 20 days, next coincide.
Limits of this calculator
The search is capped at ten million steps. When the true LCM is more than ten million times larger than the smallest number you entered, the tool says that the least common multiple is too large to compute in reasonable time instead of guessing. Large coprime numbers such as 100000000 and 100000001 hit this cap, while pairs like 5000000 and 5000001 still work.
Decimals such as 2.4 or 0.3 cannot be stored exactly in binary, so the check for divisibility never lines up and the same message appears. The fix is to scale. To find the LCM of 2.4 and 3, multiply both by 10 to get 24 and 30, whose LCM is 120, then divide the result by 10 to get 12.
Frequently asked questions
What is the LCM of two prime numbers?
Their product. Primes share no factors other than 1, so lcm(7, 13) = 91.
How is the LCM related to the GCD?
For two numbers, gcd × lcm = the product of the numbers. For 12 and 18 that is 6 × 36 = 216 = 12 × 18.
Can the LCM be smaller than one of the numbers?
No. The LCM is a multiple of every input, so it is at least as large as the biggest one. When the largest number is itself a multiple of all the others, the LCM equals the largest number.
Why does the calculator return 0 when one of my numbers is 0?
Every multiple of 0 is 0, so the only common multiple is 0. By convention the least common multiple is then reported as 0.
Cite this calculator and page
If you use this page in your work, you can cite it as:
Reeliy Editorial Team. (2026). Least Common Multiple (LCM) Calculator. Reeliy. https://reeliy.com/calculators/lcm-calculator“Least Common Multiple (LCM) Calculator.” Reeliy, 2026, https://reeliy.com/calculators/lcm-calculator.