Skip to content

LCM Calculator

Find the least common multiple (LCM) of two or more whole numbers. It is the smallest positive number that every number in your list divides into evenly.

Two to twenty whole numbers from 1 to 1,000,000,000,000, separated by commas.

Least common multiple

72

Combine the numbers two at a time: lcm(12, 18) = 36, then lcm(36, 24) = 72.

Count
3
Largest number
24
Greatest common factor
6
Product of all numbers
5,184

How to use this calculator

  1. 1 Type two to twenty whole numbers, separated by commas or spaces.
  2. 2 Use whole numbers from 1 up to 1,000,000,000,000. Decimals and zero are not accepted.
  3. 3 Read the least common multiple. Very large results are shown in full, so you can copy them exactly.

What is a least common multiple?

A multiple of a number is what you get when you multiply it by a whole number. The multiples of 4 are 4, 8, 12, 16, 20, 24 and so on. The multiples of 6 are 6, 12, 18, 24, 30 and so on.

Some multiples appear in both lists. These are common multiples. The smallest one is the least common multiple. For 4 and 6, that is 12.

The LCM is useful whenever two repeating things need to line up. It tells you when they will happen at the same time again.

Finding the LCM of 4 and 6 by listing multiples
NumberFirst multiplesFirst shared multiple
44, 8, 12, 16, 20, 2412
66, 12, 18, 24, 30, 3612

Using the GCF to find the LCM

For two numbers, there is a faster method. Multiply the numbers, then divide by their greatest common factor. This is written lcm(a, b) = a × b ÷ gcf(a, b).

For 4 and 6, the GCF is 2. So 4 × 6 = 24, and 24 ÷ 2 = 12. For 12 and 18, the GCF is 6, so 12 × 18 = 216, and 216 ÷ 6 = 36.

Dividing by the GCF first keeps the numbers smaller. The GCF calculator finds that factor for you.

More than two numbers

For three or more numbers, find the LCM two at a time. Take the LCM of the first two numbers, then find the LCM of that answer and the next number. Keep going until you reach the end of the list.

For 12, 18 and 24, the LCM of 12 and 18 is 36. Then the LCM of 36 and 24 is 72. So the LCM of all three is 72.

Where the LCM is used

Suppose one bus leaves every 12 minutes, and another leaves every 18 minutes. Both leave at the same time at the start. They leave together again after the LCM of 12 and 18, which is 36 minutes.

The LCM is also used for fractions. To add 1/4 and 1/6, you need a common denominator, and the LCM of 4 and 6 is 12. Then 1/4 = 3/12 and 1/6 = 2/12, which add to 5/12. The fraction calculator does this for you.

Clock cycles, repeating patterns and shift timetables all use the same idea.

When the LCM is very large

If two numbers share no factor except 1, their LCM is simply their product. For example, 8 and 9 have a GCF of 1, so their LCM is 8 × 9 = 72.

That is why a list of big, unrelated numbers can give a very large LCM. Check the list first. If numbers share factors, the LCM is much smaller than the product.

To see the prime building blocks of a number, use the prime factorization calculator. The LCM takes the highest power of each prime that appears.

The formula

Two numbers

lcm(a, b) = a × b ÷ gcf(a, b)

a, b
the two numbers
gcf(a, b)
their greatest common factor. Dividing by it first avoids a larger product than needed

More than two numbers

lcm(a, b, c) = lcm(lcm(a, b), c)

lcm(a, b)
the result of the previous pair, which then pairs with the next number

Worked example

LCM of 4 and 6

  1. 1.The greatest common factor of 4 and 6 is 2.
  2. 2.Multiply the numbers: 4 × 6 = 24.
  3. 3.Divide by the GCF: 24 ÷ 2 = 12.
  4. 4.Check: 12 ÷ 4 = 3 and 12 ÷ 6 = 2, both whole numbers.

The least common multiple of 4 and 6 is 12.

Frequently asked questions

How is the LCM used in fractions?

The least common denominator of fractions is the LCM of their denominators. For 1/4 and 1/6, the LCM of 4 and 6 is 12, so you rewrite them as 3/12 and 2/12.

What is the difference between LCM and GCF?

The LCM is the smallest number that all the inputs divide into. The GCF is the largest number that divides all the inputs. The LCM is always at least as large as each input, and the GCF is never larger than the smallest input.

Why is the LCM sometimes very large?

Numbers that share few factors multiply to a large product. The LCM of two coprime numbers equals their product, so a list of big, unrelated numbers gives a very large LCM.

What is the LCM of two equal numbers?

It is the number itself. For example, the LCM of 7 and 7 is 7, because 7 is the smallest positive number that both 7s divide into.

Sources

Last reviewed by the GridCalculators team.