LCM Calculator

The least common multiple (LCM) of two numbers is the smallest number that both divide into with no remainder. The LCM of 6 and 8 is 24: counting in sixes gives 6, 12, 18, 24 and counting in eights gives 8, 16, 24, and 24 is the first number both counts reach (see it drawn). Type two or more numbers for the LCM with steps, or switch to fractions for the least common denominator.

Find the least common multiple

Type two or more whole numbers, or paste a list such as 4, 6, 10. Results update as you type.

Examples:

How to Use This Calculator

  1. Type the numbers

    Put two numbers in a and b. Add up to eight more, or paste a list. For fractions, switch to Fractions (LCD).

  2. Read the LCM

    You also get the GCD, the next common multiples, and a picture of where the multiples meet.

  3. Pick a method

    List, prime factors, ladder or GCD formula: choose the one your class uses to see the steps.

What is the least common multiple?

A multiple of a number is what you get when you multiply it by 1, 2, 3 and so on. The multiples of 4 are 4, 8, 12, 16, 20 and onward; the multiples of 6 are 6, 12, 18, 24 and onward. Numbers that appear on both lists, such as 12 and 24, are common multiples. The least common multiple is the smallest of them, so LCM(4, 6) = 12.

It is also called the lowest common multiple, mostly in the UK, and it is the same thing as the least common denominator when the numbers are the bottoms of fractions. Every common multiple is a multiple of the LCM: after 12, the next common multiples of 4 and 6 are 24, 36 and 48.

How to find the LCM: four methods

All four give the same answer. They are listed in the same order as the calculator’s method buttons, so you can open the one your teacher uses for your own numbers.

List the multiples

Write the multiples of each number side by side and stop at the first one they share. For 6 and 9: 6, 12, 18 and 9, 18. The answer is 18. A quick shortcut is to list the multiples of the larger number only and test each one against the smaller: 9 no, 18 yes. Listing is easy for small numbers but slow when the LCM is large, because 7 and 11 already need eleven multiples of 7.

List the multiples of 6 and 9

Prime factorization

Split each number into primes. Take every prime that appears in any of them, at the highest power it has in any one number, and multiply. For 8 and 12:

8 = 2 × 2 × 2 = 2³
12 = 2 × 2 × 3 = 2² × 3
LCM = 2³ × 3 = 24

The highest power of 2 is 2³ (from 8) and the only 3 comes from 12, so the LCM is 8 × 3 = 24. Taking the lowest shared powers instead, 2² = 4, gives the greatest common factor. The calculator’s prime table shows both rows.

Show the prime table for 8 and 12

The ladder (division) method

Write the numbers in a row. Divide by a prime that goes into at least two of them, write the answers underneath, and copy any number it does not divide straight down. Repeat until no prime goes into two numbers in the bottom row. The LCM is everything on the left side times everything in the bottom row. For 8, 12 and 15 (the grey numbers were carried down):

Ladder for 8, 12 and 15
2 8 12 15
2 4 6 15
3 2 3 15
2 1 5

LCM(8, 12, 15) = 2 × 2 × 3 × 2 × 1 × 5 = 120. With two numbers the ladder only ever divides both, and then it also gives the GCF: the left side alone.

Show the ladder for 8, 12 and 15

The GCD formula

For two numbers, the LCM times the GCD equals the product of the numbers. So find the GCD first, with Euclid’s algorithm or our GCD calculator, then divide:

LCM(a, b) = a × b ÷ GCD(a, b)
LCM(12, 18) = 12 ÷ 6 × 18 = 2 × 18 = 36

Dividing before multiplying keeps the numbers small. This is the fastest method for large numbers and the one computers use, because Euclid’s algorithm never needs the prime factors.

Use the GCD formula for 12 and 18

LCM of three or more numbers

Go pair by pair: find the LCM of the first two, then the LCM of that and the next number. For 2, 3 and 4, LCM(2, 3) = 6 and LCM(6, 4) = 12. Multiplying all three gives 24, which is a common multiple but not the least one, because 2 and 4 share a factor. The product is the LCM only when no two of the numbers share a factor. The GCD formula does not work for three numbers at once; use it one pair at a time.

Show the LCM of 2, 3 and 4

LCM of common number pairs

These are the sets that come up most in homework. Each one opens in the calculator with its steps.

Least common multiple and greatest common factor of common number sets
Numbers LCM GCF LCM as a multiple
3 and 4 12 1 3 × 4 = 4 × 3
4 and 6 12 2 4 × 3 = 6 × 2
5 and 6 30 1 5 × 6 = 6 × 5
6 and 8 24 2 6 × 4 = 8 × 3
6 and 9 18 3 6 × 3 = 9 × 2
8 and 12 24 4 8 × 3 = 12 × 2
9 and 12 36 3 9 × 4 = 12 × 3
10 and 15 30 5 10 × 3 = 15 × 2
12 and 15 60 3 12 × 5 = 15 × 4
12 and 18 36 6 12 × 3 = 18 × 2
15 and 20 60 5 15 × 4 = 20 × 3
12 and 48 48 12 12 × 4 = 48 × 1
24 and 36 72 12 24 × 3 = 36 × 2
2, 3, 4 12 1 2 × 6 = 3 × 4 = 4 × 3
4, 6, 8 24 2 4 × 6 = 6 × 4 = 8 × 3
6, 8, 10 120 2 6 × 20 = 8 × 15 = 10 × 12

LCM of 1 to n

The LCM of all the numbers from 1 to 10 is 2,520, the smallest number that every one of them divides. The values grow fast, and they only change when n is a prime or a power of a prime: going from 9 to 10 adds nothing new, because 10 = 2 × 5 and both are already in.

Least common multiple of the numbers 1 to n, for n up to 20
Numbers LCM Numbers LCM
1 to 1 1
1 to 2 2
1 to 3 6
1 to 4 12
1 to 5 60
1 to 6 60
1 to 7 420
1 to 8 840
1 to 9 2,520
1 to 10 2,520
1 to 11 27,720
1 to 12 27,720
1 to 13 360,360
1 to 14 360,360
1 to 15 360,360
1 to 16 720,720
1 to 17 12,252,240
1 to 18 12,252,240
1 to 19 232,792,560
1 to 20 232,792,560
1 to 1 1 1 to 11 27,720
1 to 2 2 1 to 12 27,720
1 to 3 6 1 to 13 360,360
1 to 4 12 1 to 14 360,360
1 to 5 60 1 to 15 360,360
1 to 6 60 1 to 16 720,720
1 to 7 420 1 to 17 12,252,240
1 to 8 840 1 to 18 12,252,240
1 to 9 2,520 1 to 19 232,792,560
1 to 10 2,520 1 to 20 232,792,560

Show the LCM of 1 to 10 in primes

LCM and GCF

The LCM and the greatest common factor (GCF, also called the GCD) are opposites. The GCF is the largest number that goes into all your numbers; the LCM is the smallest number that all of them go into. For two numbers they are linked: LCM × GCF = a × b. For 12 and 18 that is 36 × 6 = 216 = 12 × 18.

In a word problem, ask what the answer is. If it is smaller than the numbers you were given, such as the largest equal group or the biggest tile that fits, you need the GCF. If it is larger, such as the next time two things happen together or the fewest packs to buy, you need the LCM.

LCM word problems

Two buses

One bus leaves the stop every 12 minutes and another every 15 minutes. Both leave at 8:00. When do they next leave together? The time must be a multiple of 12 and of 15, so it is LCM(12, 15) = 60 minutes later, at 9:00. The meeting line in the calculator shows the two timetables.

Draw the two bus timetables

Hot dogs and buns

Hot dogs come in packs of 10 and buns in packs of 8. What is the smallest number of each you can buy to have exactly one bun per hot dog? You need LCM(10, 8) = 40 of each: 4 packs of hot dogs and 5 packs of buns.

Check the hot dogs in the calculator

Gears

A gear with 12 teeth drives a gear with 18 teeth. After how many teeth do the same two teeth touch again? LCM(12, 18) = 36 teeth, which is 3 turns of the small gear and 2 turns of the large one.

Least common denominator (LCD)

To add or compare fractions, write them with the same bottom number. The smallest one that works is the least common denominator, and it is the LCM of the denominators. For 1/6 + 3/8, the LCD is LCM(6, 8) = 24. Multiply the top and bottom of each fraction by what its bottom needs to reach 24:

1/6 = (1 × 4)/(6 × 4) = 4/24
3/8 = (3 × 3)/(8 × 3) = 9/24
1/6 + 3/8 = 4/24 + 9/24 = 13/24

Any common denominator works, and 6 × 8 = 48 is the easy one to find, but then the answer comes out as 26/48 and has to be simplified. Using the LCD skips that step. Simplify each fraction first if you can: 2/4 and 1/6 have the LCD 12 as written, but 1/2 and 1/6 only need 6.

Find the LCD of 1/6 and 3/8

Some textbooks also ask for the LCM of fractions, the smallest fraction that each one goes into a whole number of times. For fractions in lowest terms it is the LCM of the tops divided by the GCD of the bottoms: for 2/3 and 4/9 that is LCM(2, 4)/GCD(3, 9) = 4/3, and 4/3 is 2 × 2/3 and 3 × 4/9. The calculator gives it in Fractions mode under the LCD.

Rules that save time

  • If one number divides the other, the LCM is the larger one: LCM(12, 48) = 48.
  • If two numbers share no factor (their GCF is 1), the LCM is their product: LCM(8, 9) = 72.
  • The LCM is never smaller than the largest number and never larger than the product.
  • Signs do not matter: LCM(−4, 6) = LCM(4, 6) = 12. Zero is left out, because its only multiple is 0.

Frequently Asked Questions

What is the LCM of 6 and 8?

The LCM of 6 and 8 is 24. The multiples of 6 are 6, 12, 18, 24, and the multiples of 8 are 8, 16, 24. 24 is the first number on both lists.

Show the LCM of 6 and 8

How do you find the LCM?

List the multiples of each number until one appears on every list, or split the numbers into primes and multiply each prime at its highest power. For two numbers you can also divide their product by their GCD: LCM(12, 18) = 12 × 18 ÷ 6 = 36.

What is the LCM of 12 and 18?

The LCM of 12 and 18 is 36. In primes, 12 = 2² × 3 and 18 = 2 × 3². Taking each prime at its highest power gives 2² × 3² = 4 × 9 = 36.

Show the primes for 12 and 18

What is the LCM of 1 to 10?

The LCM of the numbers 1 to 10 is 2,520. It is the smallest number that 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10 all divide into, and it equals 2³ × 3² × 5 × 7.

Show the LCM of 1 to 10

What is the difference between the LCM and the GCF?

The LCM is the smallest number that all your numbers divide into; the GCF is the largest number that divides all of them. For 12 and 18 the LCM is 36 and the GCF is 6. The LCM is never smaller than the largest number, and the GCF is never larger than the smallest.

How do you find the least common denominator?

The least common denominator (LCD) of some fractions is the LCM of their denominators. For 1/6 and 3/8 the LCD is LCM(6, 8) = 24, so 1/6 = 4/24 and 3/8 = 9/24, and now they can be added or compared.

Find the LCD of 1/6 and 3/8

What is the LCM of two prime numbers?

Their product. Two different primes share no factor, so LCM(5, 7) = 5 × 7 = 35. The same holds for any two numbers whose GCF is 1, such as 8 and 9, whose LCM is 72.