LCM Calculator

Find the least common multiple of two numbers. You get both prime factorizations and the formula working, so you can check your homework.

Examples:24, 3648, 18084, 12617, 31

LCM(48, 180) = 720

Prime factorizations

48 = 243

180 = 22325

LCM formula

(48 × 180) ÷ 12 = 8,640 ÷ 12 = 720

Check: 720 ÷ 48 = 15 and 720 ÷ 180 = 4, both whole numbers.

What Is the Least Common Multiple (LCM)?

The least common multiple of two numbers is the smallest number that both of them divide into exactly. Take 4 and 6. The multiples of 4 are 4, 8, 12, 16 and so on. The multiples of 6 are 6, 12, 18 and so on. The first number that shows up in both lists is 12, so LCM(4, 6) = 12.

Do not mix it up with the GCF. The GCF is a factor, so it is small. The LCM is a multiple, so it is big. The LCM is never smaller than the larger of your two numbers.

How to Use This LCM Calculator

  1. Type your two numbers into the First number and Second number boxes.
  2. Press Calculate, or hit Enter.
  3. You get the LCM together with the GCF, both prime factorizations and the working, so you can copy the steps into your homework.

The example pairs under the box are a quick way to see a finished answer before you try your own numbers.

Method 1: Find the LCM by Listing Multiples

Write out the multiples of each number until one of them appears in both lists. That first match is the LCM. Here is 6 and 8:

Handwritten lists of multiples of 6 (6, 12, 18, 24, 30, 36) and multiples of 8 (8, 16, 24, 32, 40) with 24 circled as the first match, so LCM(6, 8) = 24
Multiples of 6 and 8. The first number in both lists is 24.

This works well for small numbers and it is easy to check by eye. The trouble starts when the LCM is big. For 18 and 24 you would need to write multiples all the way up to 72, and that is where the next methods save time.

Method 2: Find the LCM with Prime Factorization

Break each number into primes. Then take every prime that appears in either number, at its highest power, and multiply them together. Here is 12 and 18:

Handwritten work: 12 = 2 squared times 3 and 18 = 2 times 3 squared, take the highest power of each prime, LCM = 2 squared times 3 squared = 4 times 9 = 36, checked by 36 divided by 12 = 3 and 36 divided by 18 = 2
12 = 2² × 3 and 18 = 2 × 3². Highest powers: 2² × 3² = 36.

The prime 2 is 2² in 12 and 2¹ in 18, so you take 2². The prime 3 is 3¹ in 12 and 3² in 18, so you take 3². Multiply them and you get 4 × 9 = 36. A fast check at the bottom of the page: 36 ÷ 12 = 3 and 36 ÷ 18 = 2, both whole numbers.

Notice the difference from the GCF. For the GCF you take only the primes that are in both numbers, at the lowest power. For the LCM you take every prime, at the highest power.

Method 3: Find the LCM from the GCF

If you already know the GCF, the LCM is one line of arithmetic:

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

For 12 and 18 the GCF is 6, so the LCM is 12 × 18 ÷ 6 = 216 ÷ 6 = 36. The same answer as the prime method, with less writing. A tip: divide first, then multiply. 12 ÷ 6 = 2, then 2 × 18 = 36, and you never handle the bigger number 216.

This formula only works for two numbers at a time. Do not use it on three numbers.

Method 4: The Ladder Method for Three or More Numbers

The ladder (or cake) method is the neatest way to find the LCM of three numbers or more. Write the numbers in a row, then keep dividing the row by a prime that goes into at least two of them. Numbers that do not divide just drop down unchanged. Stop when no prime divides two numbers in the row any more.

Handwritten ladder method for the LCM of 12, 18 and 30: divide by 2 to get 6, 9, 15, divide by 3 to get 2, 3, 5, then multiply 2 × 3 × 2 × 3 × 5 = 180
Ladder for 12, 18 and 30. Multiply the divisors and the bottom row: 2 × 3 × 2 × 3 × 5 = 180.

The answer is every number on the left side multiplied by every number left in the bottom row. Here that is 2 × 3 × 2 × 3 × 5 = 180. You can confirm it with primes: 12 = 2² × 3, 18 = 2 × 3² and 30 = 2 × 3 × 5, so the highest powers give 2² × 3² × 5 = 180. And 180 ÷ 12 = 15, 180 ÷ 18 = 10 and 180 ÷ 30 = 6, all whole numbers.

Use the LCM to Add and Subtract Fractions

This is the most common reason students need an LCM. To add fractions with different denominators, rewrite them over the least common denominator, which is just the LCM of the two bottom numbers. For 1/6 + 1/8:

Handwritten work adding 1 over 6 plus 1 over 8: LCM(6, 8) = 24, so 1 over 6 = 4 over 24 and 1 over 8 = 3 over 24, giving 7 over 24
LCM(6, 8) = 24, so 1/6 + 1/8 = 4/24 + 3/24 = 7/24.

You could use any common multiple, such as 48, but the least one keeps the numbers small, and the answer is already in simplest form most of the time.

LCM Word Problems

Whenever two things repeat on different schedules, ask when they line up again. That is an LCM question.

Two buses

One bus leaves a stop every 12 minutes and another every 15 minutes. They leave together at 8:00. When do they leave together again? LCM(12, 15) = 60, so after 60 minutes, at 9:00.

Blinking lights

A red light blinks every 8 seconds and a blue light every 20 seconds. LCM(8, 20) = 40, so they blink together every 40 seconds. In one minute they blink together once after the start, at second 40.

Buying in packs

Hot dogs come in packs of 10 and buns in packs of 8. To have none left over you need LCM(10, 8) = 40 of each. That means 4 packs of hot dogs and 5 packs of buns.

LCM Shortcuts Worth Remembering

Common LCM Mistakes to Avoid

Type the same numbers into the calculator at the top to check your working.

LCM Calculator: FAQs

What does LCM stand for?

LCM stands for least common multiple. It is the smallest positive number that two or more numbers all divide into exactly. For 4 and 6 the common multiples are 12, 24, 36 and so on, so the LCM is 12.

How do you find the LCM of two numbers?

There are three common ways. List the multiples of each number until one appears in both lists. Or write both numbers as prime factorizations and multiply every prime at its highest power. Or use the formula LCM = (a × b) ÷ GCF.

What is the LCM of 12 and 18?

It is 36. In primes, 12 = 2² × 3 and 18 = 2 × 3². The highest powers are 2² and 3², and 2² × 3² = 4 × 9 = 36. You can check it: 36 ÷ 12 = 3 and 36 ÷ 18 = 2.

What is the LCM of two coprime numbers?

It is their product. Coprime numbers share no factor other than 1, so their GCF is 1 and the formula gives LCM = a × b. For example LCM(4, 9) = 36 and LCM(8, 9) = 72.

What is the difference between the LCM and the GCF?

The GCF is the biggest number that divides both numbers, so it is never larger than the smaller one. The LCM is the smallest number that both numbers divide into, so it is never smaller than the larger one. For two numbers, GCF × LCM = a × b.

How do you find the LCM of three numbers?

Use the ladder method or prime factorization. With primes, take every prime that appears in any of the numbers at its highest power. For 4, 6 and 10: 4 = 2², 6 = 2 × 3 and 10 = 2 × 5, so LCM = 2² × 3 × 5 = 60. The product formula only works for two numbers.

Why do you need the LCM to add fractions?

Fractions can only be added when they have the same denominator. The LCM of the two denominators is the smallest number you can use, which keeps the working short. For 1/6 + 1/8 the LCM of 6 and 8 is 24, so the sum is 4/24 + 3/24 = 7/24.

Can the LCM be smaller than one of the numbers?

No. The LCM is a multiple of both numbers, so it is at least as big as the larger one. If one number divides the other, the LCM is the larger number, such as LCM(7, 21) = 21.