Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

LCM calculator

Enter two or more whole numbers to find their least common multiple (LCM), with the working shown three different ways.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Need the biggest shared factor instead? Use the GCF calculator. Adding fractions? The fraction calculator finds the common denominator for you.

How the LCM is calculated

The least common multiple is the smallest positive number that every number in the list divides into evenly. For two numbers, the fastest way uses the greatest common factor (GCF):

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

For three or more numbers, work in pairs: LCM(a, b, c) = LCM(LCM(a, b), c). The GCF comes from the Euclidean algorithm, which stays fast even for numbers with dozens of digits. That's why this calculator can handle numbers up to 100 digits long.

Worked example: 12, 18 and 30

  1. Using the GCF. GCF(12, 18) = 6, so LCM(12, 18) = 12 × 18 ÷ 6 = 36. Then GCF(36, 30) = 6, so LCM(36, 30) = 36 × 30 ÷ 6 = 180.
  2. Prime factorization. 12 = 2² × 3, 18 = 2 × 3², 30 = 2 × 3 × 5. Take each prime with its highest power: 2² × 3² × 5 = 180.
  3. Listing multiples. Multiples of 30 are 30, 60, 90, 120, 150, 180. The first one that 12 and 18 also divide is 180.

Where the LCM is used

  • Adding fractions. The least common denominator of 1/12 + 1/18 is LCM(12, 18) = 36. The fraction calculator does this for you.
  • Things that repeat. If one bus comes every 12 minutes and another every 18, they leave together every 36 minutes.
  • Buying in packs. Hot dogs come in 10s and buns in 8s; you need LCM(10, 8) = 40 of each to have none left over.

When this doesn't apply

  • The LCM is defined for whole numbers. For fractions, people often want the LCM of the denominators instead.
  • If the list contains 0, the LCM is 0 by convention, which is rarely useful. Leave the 0 out.
  • Negative signs are ignored; the LCM is always given as a positive number.
  • The prime-factor working is shown for numbers below 1019, and the listing method only when the lists are short.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • '1,000 2' is read as 1000 and 2: LCM 1,000 ✓
  • LCM of 12, 18 and 30 = 180 ✓
  • LCM of 4 and 6 by listing multiples: 4, 8, 12 ✓
  • LCM of 123456789012 and 987654321098, exactly ✓
  • A list with 0 has an LCM of 0 ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What is the LCM of 12 and 18?

36. The GCF of 12 and 18 is 6, and 12 × 18 ÷ 6 = 36.

What's the difference between LCM and GCF?

The LCM is the smallest number both numbers divide into; the GCF is the biggest number that divides both. For 12 and 18, the LCM is 36 and the GCF is 6. For two positive numbers, LCM × GCF = a × b.

How do I find the LCM of three numbers?

Find the LCM of the first two, then the LCM of that answer and the third number. LCM(4, 6, 10): LCM(4, 6) = 12, then LCM(12, 10) = 60.

Is the LCM of two prime numbers their product?

Yes. Two different primes share no factors, so their LCM is just the product: LCM(7, 11) = 77.

What is the least common denominator?

It's the LCM of the denominators. To add 1/4 + 1/6, the least common denominator is LCM(4, 6) = 12.

Related calculators