LCM Calculator (Least Common Multiple)
Find the smallest number that every number in your list divides into.
Last updated 2026-11-26 · How we calculate this
Least Common Multiple
Enter at least two whole numbers to see their least common multiple.
The calculator takes whole numbers from 1 to 1,000,000 only, with no zeros, decimals or negative numbers, since the least common multiple is defined for positive whole numbers. Write large numbers without commas (1000, not 1,000). If the answer would be too large to show exactly, the calculator says so rather than rounding it.
Quick Answer
The least common multiple (LCM) is the smallest number that each of your numbers divides into exactly. Break each number into prime factors, take the highest power of every prime that appears, and multiply them. For 12, 18 and 30 that is 2² × 3² × 5 = 180.
How to Use This Calculator
Type or paste two or more whole numbers into the box, separated by commas, spaces or new lines. The calculator finds their least common multiple and shows the working the way it is taught in school: each number broken into prime factors, then the highest power of each prime multiplied together. It takes up to 20 numbers at once, which is handy for finding a common denominator for several fractions or lining up schedules that repeat.
- Type or paste your whole numbers into the box.
- Read the least common multiple.
- Check the prime factors of each number.
- Follow the highest powers to see how the answer was built.
The Formula
LCM = the highest power of every prime factor, multiplied together · For two numbers: LCM(a, b) = a × b ÷ GCF(a, b)
Every whole number above 1 can be written as a product of primes in exactly one way, so 12 is 2 × 2 × 3, or 2² × 3. Any multiple of 12 must contain at least two 2s and one 3. A number that is a multiple of every number in the list therefore needs the largest count of each prime found in any of them, and nothing more, which is why the highest powers multiplied together give the smallest such number. For two numbers there is a shortcut: multiply them and divide by their greatest common factor.
Worked Example
The opening list: 12 = 2² × 3, 18 = 2 × 3² and 30 = 2 × 3 × 5. The highest powers are 2², 3² and 5, and 4 × 9 × 5 = 180, so 180 is the smallest number all three divide into.
Hot dogs and buns: sausages come in packs of 10 and buns in packs of 8. The LCM of 10 and 8 is 40, so 4 packs of sausages and 5 packs of buns give 40 of each with none left over.
Adding 1/4 + 1/6: the LCM of 4 and 6 is 12, so 12 is the least common denominator, and the sum becomes 3/12 + 2/12 = 5/12.
6 and 12: because 12 is already a multiple of 6, the LCM is 12 itself.
Frequently Asked Questions
Sources: OpenStax, Prealgebra 2e, 2.5 Prime Factorization and the Least Common Multiple