Least Common Multiple (LCM) Calculator

Find the smallest number that every number in your list divides into, with prime-factor, GCF or listing steps.

Two or more whole numbers separated by commas or spaces.
Greatest common factor
6
LCM ÷ each number
15, 10, 6
LCM(12, 18, 30)180

Show the work

  1. 12 = 22 × 3
  2. 18 = 2 × 32
  3. 30 = 2 × 3 × 5
  4. Take every prime that appears, each with its largest exponent: 22 × 32 × 5
  5. Multiply: LCM = 180
Prime factorizations
NumberPrime factorization
1222 × 3
182 × 32
302 × 3 × 5

The least common multiple (LCM) of a set of whole numbers is the smallest positive number that each of them divides into evenly. It answers “when do these cycles line up again?” and “what’s the smallest common denominator?” This calculator finds the LCM of up to twenty numbers — with exact results even when the answer has dozens of digits — and shows the work by prime factorization, by the GCF formula or by listing multiples.

How to use the LCM calculator

  1. Enter two or more whole numbers separated by commas or spaces, for example 12, 18, 30.
  2. Pick the method you want to see. All three give the same LCM.
  3. The tape shows the LCM, the GCF and how many times each number goes into the LCM.

Three ways to find the LCM

1. Listing multiples

Write out each number’s multiples until a value appears in every list:

12: 12, 24, 36, 48, 60, 72, … , 168, 180

18: 18, 36, 54, 72, 90, 108, 126, 144, 162, 180

30: 30, 60, 90, 120, 150, 180

Simple, but slow when the LCM is large.

2. Prime factorization

LCM = product of every prime that appears, each raised to its largest exponent

12 = 2² × 3, 18 = 2 × 3², 30 = 2 × 3 × 5. The largest powers are 2², 3² and 5, so LCM = 4 × 9 × 5 = 180. Compare the GCF, which uses only shared primes with the smallest exponents (here 2 × 3 = 6).

3. Using the GCF

For two numbers:

LCM(a, b) = a × b ÷ GCF(a, b)

For longer lists, apply it repeatedly: LCM(12, 18) = 216 ÷ 6 = 36, then LCM(36, 30) = 1,080 ÷ 6 = 180. Because the GCF comes from the fast Euclidean algorithm, this is the method computers use. Find GCFs directly with the GCF calculator.

Worked example: syncing schedules

Three lighthouse beacons flash every 12, 18 and 30 seconds. They all flash together at midnight. When do they next flash together?

LCM(12, 18, 30) = 180 seconds

Answer: every 3 minutes — at 12:03, 12:06, 12:09 and so on

Check: 180 ÷ 12 = 15, 180 ÷ 18 = 10 and 180 ÷ 30 = 6, all whole numbers

LCM of common pairs

Numbers GCF LCM
4 and 6 2 12
6 and 8 2 24
8 and 12 4 24
9 and 12 3 36
10 and 15 5 30
12 and 18 6 36
7 and 11 1 77

Where the LCM shows up

  • Adding fractions: the least common denominator is the LCM of the denominators. 5/12 + 7/18 uses 36. The LCD calculator rewrites whole lists of fractions.
  • Repeating events: gear teeth meshing, traffic-light cycles, shift rotations, planetary alignments.
  • Packaging: hot dogs in packs of 10 and buns in packs of 8 — buy LCM(10, 8) = 40 of each to have none left over (4 packs of hot dogs, 5 packs of buns).

Things to remember

  • The LCM is never smaller than the largest number in the list.
  • If one number divides another, the LCM is the larger: LCM(6, 18) = 18.
  • If the numbers share no factors, the LCM is their product.
  • For two numbers, GCF × LCM = the product of the numbers, a handy check.

To see more multiples of any number, use the multiples calculator.

Frequently asked questions

What is the least common multiple?

The smallest positive number that is a multiple of every number in a set. The LCM of 12, 18 and 30 is 180 — it is the first number that appears in all three times tables.

How do I find the LCM with prime factorization?

Factor each number, then take every prime that appears in any of them, raised to its largest exponent, and multiply. For 12 = 2² × 3, 18 = 2 × 3² and 30 = 2 × 3 × 5, the LCM is 2² × 3² × 5 = 180.

What is the formula for the LCM of two numbers?

LCM(a, b) = a × b ÷ GCF(a, b). For 12 and 18, the GCF is 6, so the LCM is 216 ÷ 6 = 36.

What is the LCM of two prime numbers?

Their product, because they share no factors. LCM(7, 11) = 77. The same is true for any two numbers whose GCF is 1.

When do I use the LCM in real life?

Whenever repeating cycles need to line up: two buses leaving every 12 and 18 minutes next leave together after 36 minutes. It is also how you find the least common denominator when adding fractions.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.