LCM Calculator

The least common multiple is the first number both lists of multiples share. Here's 12 and 18.

  • 2 to 20 numbers
  • Steps shown
  • Updated Nov 2, 2026
Find the LCM
Example scratch paper
  • Multiples of 1212, 24, 36
  • Multiples of 1818, 36
  • 12 × 18 ÷ GCF 636
LCM12 and 1836

Use this LCM calculator to find the least common multiple of two or more whole numbers. The LCM is the smallest positive number that every number in your list divides into evenly: the LCM of 12 and 18 is 36, because 36 is the first number in both lists of multiples. Enter your numbers to see the answer with steps.

Last updated November 2, 2026  How we calculate

Enter 2 to 20 whole numbers, separated by commas, spaces, or new lines (up to 1,000,000,000,000 each). A number like 1,071 is read as one number.

Least common multiple

–

How to Find the LCM

The least common multiple of two numbers is the smallest number that is a multiple of both (OpenStax Prealgebra 2e, 2.5). There are three common ways to find it, and the calculator shows each one.

Method 1: List the multiples

  1. List multiples of each number. Multiples of 12: 12, 24, 36, 48. Multiples of 18: 18, 36, 54.
  2. Find the first number that appears in every list. That's 36.

Listing works well for small numbers. For bigger ones, the lists get long fast.

Method 2: Use prime factorization

  1. Write each number as a product of primes: 12 = 2² × 3 and 18 = 2 × 3².
  2. Take every prime that appears, at the highest power it appears: 2² and 3².
  3. Multiply: 2² × 3² = 4 × 9 = 36.

Method 3: Use the GCF

For two numbers, the LCM equals their product divided by their greatest common factor:

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

The GCF of 12 and 18 is 6, so the LCM is 12 × 18 ÷ 6 = 216 ÷ 6 = 36. This is the fastest method for large numbers, and it's how the calculator works under the hood, using Euclid's algorithm for the GCF (see the GCF calculator). To list every factor of one number, use the factor calculator.

LCM of Three or More Numbers

Find the LCM of the first two numbers, then the LCM of that result and the next number, and so on. For 24, 36, and 60: LCM(24, 36) = 72, then LCM(72, 60) = 360. With prime factors, it's the same rule as before: 24 = 2³ × 3, 36 = 2² × 3², and 60 = 2² × 3 × 5, so the LCM is 2³ × 3² × 5 = 360.

Using the LCM to Add Fractions

The least common denominator of two fractions is the LCM of their denominators. To add 5/12 + 7/18, use LCM(12, 18) = 36: 5/12 = 15/36 and 7/18 = 14/36, so the sum is 29/36. Using the smallest common denominator keeps the numbers small and often saves a step of simplifying at the end. If the sum still needs reducing, the GCF calculator finds the number to divide by.

LCM vs. GCF

The LCM is the smallest number your numbers all divide into; 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. For two numbers, the LCM times the GCF always equals the product of the numbers: 36 × 6 = 12 × 18 = 216. Students usually meet both in 6th grade: the Common Core standard asks for the greatest common factor of two whole numbers up to 100 and the least common multiple of two whole numbers up to 12 (Common Core 6.NS.B.4). For practice, print our free GCF and LCM worksheets. For other homework tools, see the math calculators.

CompareLCMGCF
What it isSmallest number they all divide intoLargest number that divides all of them
12 and 18366
24, 36, 6036012
9 and 282521
Prime factor ruleHighest power of every primeLowest power of each shared prime
Used forCommon denominatorsSimplifying fractions

Frequently Asked Questions

What does LCM mean?

LCM stands for least common multiple: the smallest positive number that is a multiple of each of the given numbers. The LCM of 4 and 6 is 12.

What is the LCM of two prime numbers?

Their product. Primes share no factors except 1, so the LCM of 7 and 11 is 77. The same is true for any two numbers whose GCF is 1, such as 9 and 28 (LCM 252).

Can the LCM be one of the numbers?

Yes. If one number divides the other, the larger one is the LCM. The LCM of 6 and 18 is 18.

Why can't I use 0 or decimals?

The LCM is defined for positive whole numbers. Every number divides 0, so 0 doesn't give a useful answer, and decimals don't have multiples in the whole-number sense. Negative numbers work: the calculator uses their positive values.

Sources