LCM Calculator

Enter two or more whole numbers to find their least common multiple, the smallest number they all divide into. For example, the LCM of 12, 18 and 30 is 180.

  • Free
  • No sign-up
  • Shows the working
  • Works on phones

Separate with commas or spaces. Two to fifty positive whole numbers.

Least common multiple
LCM(12, 18, 30) = 180

Method 1: prime factorization

  1. Write each number as a product of primes:
    • 12 = 22 × 3
    • 18 = 2 × 32
    • 30 = 2 × 3 × 5
  2. Take the highest power of each prime that appears: 22 × 32 × 5.
  3. Multiply them: 22 × 32 × 5 = 180.

Method 2: two numbers at a time

  1. LCM(12, 18) = 36
  2. LCM(36, 30) = 180

How to find the least common multiple

  1. Write each number as a product of prime factors (for example 12 = 2² × 3).
  2. List every prime that appears in any of the numbers.
  3. For each prime, take the highest power that appears.
  4. Multiply those prime powers together. The result is the LCM.

What is the least common multiple?

The least common multiple (LCM) of a set of whole numbers is the smallest positive number that is a multiple of every number in the set. Multiples of 4 are 4, 8, 12, 16…, and multiples of 6 are 6, 12, 18…, so the LCM of 4 and 6 is 12. You will also see it called the lowest common multiple or the least common denominator when the numbers are denominators of fractions.

Three ways to find the LCM

1. List the multiples

Write out multiples of each number until one appears in every list. This works well for small numbers: multiples of 6 are 6, 12, 18, 24 and multiples of 8 are 8, 16, 24, so LCM(6, 8) = 24.

2. Prime factorization

Break each number into primes and multiply the highest power of each prime. For 12 = 2² × 3, 18 = 2 × 3² and 30 = 2 × 3 × 5, the highest powers are 2², 3² and 5, so the LCM is 4 × 9 × 5 = 180. This is the method the calculator shows first, and it works for any number of values.

3. Divide the product by the GCF

For two numbers, multiply them and divide by their greatest common factor:

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

For 12 and 18: 12 × 18 = 216 and GCF(12, 18) = 6, so the LCM is 216 ÷ 6 = 36. For three or more numbers, apply the formula two numbers at a time: LCM(a, b, c) = LCM(LCM(a, b), c).

Common LCM answers

NumbersLCMGCF
2, 361
4, 6122
6, 8242
8, 12244
9, 12363
10, 15305
12, 18366
15, 20605
2, 3, 4121
3, 4, 5601
4, 6, 8242
6, 10, 15301

Where the LCM is used

  • Adding and subtracting fractions: the LCM of the denominators is the least common denominator.
  • Timing problems: if one bus comes every 12 minutes and another every 18 minutes, they arrive together every LCM(12, 18) = 36 minutes.
  • Patterns and cycles: gears, repeating schedules and rotations line up again after the LCM of their cycle lengths.

Frequently asked questions

What is the LCM of two numbers?

The least common multiple (LCM) is the smallest positive number that every number in the set divides into evenly. For example, the LCM of 4 and 6 is 12, because 12 is the first number that appears in both lists of multiples (4, 8, 12 and 6, 12).

How do you find the LCM quickly?

Write each number as a product of primes, then multiply the highest power of every prime that appears. For 12 = 2² × 3 and 18 = 2 × 3², the LCM is 2² × 3² = 36. For two numbers you can also divide their product by the GCF: 12 × 18 ÷ 6 = 36.

What is the difference between LCM and GCF?

The LCM is the smallest number that all the numbers divide into, while the GCF is the largest number that divides into all of them. For 12 and 18 the LCM is 36 and the GCF is 6. Use the GCF calculator to find the greatest common factor with steps.

Can the LCM be smaller than the numbers?

No. The LCM is always at least as large as the biggest number in the set. It equals the biggest number when the other numbers divide into it, such as LCM(3, 6) = 6.

What is the LCM of two prime numbers?

The LCM of two different primes is their product, because they share no factors. For example, LCM(5, 7) = 35.

How is the LCM used with fractions?

The least common denominator of two fractions is the LCM of their denominators. To add 1/4 + 1/6, use LCM(4, 6) = 12 as the denominator: 3/12 + 2/12 = 5/12. The fraction calculator does this for you.

Last reviewed November 27, 2026 by the ChalkStation team.