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

Enter Your Numbers

Type or paste 2 to 20 whole numbers from 1 to 1,000,000, separated by commas, spaces or new lines. Write large numbers without commas (1000, not 1,000).

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.

  1. Type or paste your whole numbers into the box.
  2. Read the least common multiple.
  3. Check the prime factors of each number.
  4. 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

What is the least common multiple?

It is the smallest positive number that every number in a set divides into with nothing left over. The multiples of 4 are 4, 8, 12, 16 and so on, and the multiples of 6 are 6, 12, 18; the first one they share is 12. In the UK it is usually called the lowest common multiple, and the two names mean the same thing.

How do I find the LCM by listing multiples?

Write out the multiples of the largest number and stop at the first one the other numbers divide into. For 8 and 10, the multiples of 10 are 10, 20, 30 and 40, and 40 is the first that 8 divides into. This works well for small numbers, but prime factors are quicker once the numbers get bigger or there are more than two.

Is there a shortcut for two numbers?

Yes: multiply the two numbers and divide by their greatest common factor. For 12 and 18 the product is 216 and the greatest common factor is 6, so the LCM is 216 ÷ 6 = 36. The GCF Calculator (Greatest Common Factor) finds that factor if you need it. The shortcut only works for two numbers at a time.

Can the LCM be one of my numbers?

Yes, when the largest number is a multiple of all the others, as with 3, 6 and 12, whose LCM is 12. It can never be smaller than the largest number, because a number cannot divide into anything smaller than itself. At the other extreme, numbers that share no factors, such as 4, 5 and 7, have an LCM equal to their product, 140.

What is the least common denominator?

It is the LCM of the bottom numbers of two or more fractions. For 5/6 and 3/8 it is 24, the smallest bottom number both can be rewritten over (20/24 and 9/24). Using it, rather than simply multiplying the bottoms to get 48, keeps the numbers small and leaves less simplifying to do afterwards. The Fraction Calculator finds it for you when it adds or subtracts.

Where is the LCM used in real life?

Anywhere things repeat on different cycles. If one bus leaves every 12 minutes and another every 18, they leave together every 36 minutes. Gears, flashing lights, shift rotas and items sold in different pack sizes work the same way: the LCM tells you when, or how many, before the pattern lines up again.

Sources: OpenStax, Prealgebra 2e, 2.5 Prime Factorization and the Least Common Multiple