Math

Least Common Multiple Calculator

Units

Results

Enter values and calculate to see results.

Embed on your site

Any ezcalcs calculator can be embedded with one script tag. Copy the snippet below or use the homepage playground to preview and customize.

<!-- ezcalcs embed: least-common-multiple-calculator — paste anywhere in the body -->
<script
  async
  src="https://ezcalcs.net/embed.js"
  data-calc="least-common-multiple-calculator"
  data-theme="light"
  data-width="100%"
  data-height="640"
></script>

Enter your numbers above and get the LCM instantly. The least common multiple of two or more numbers is the smallest positive integer that each number divides into evenly. This free LCM calculator handles two, three, or more integers and shows step-by-step work so you can follow the math.

The LCM of 8 and 12, for example, is 24. That means 24 is the smallest number that both 8 and 12 divide into without a remainder.

Find the least common multiple

The least common multiple (LCM) is the smallest positive number that is divisible by every number in your set. You might also see it called the lowest common multiple.

A quick example: the multiples of 6 are 6, 12, 18, 24, 30… and the multiples of 8 are 8, 16, 24, 32… The first number that appears in both lists is 24, so the LCM of 6 and 8 is 24.

The LCM of two numbers can never be smaller than both numbers. It is always equal to or larger than the greatest number in the set. If one number is a multiple of the other, the LCM equals the larger number. For example, the LCM of 2 and 12 is simply 12.

What about zero? The least common multiple of 0 and any other number is 0 by mathematical convention, though many textbooks only define LCM for positive integers.

Can the LCM be negative? No. By definition, the LCM is the smallest positive integer that meets the criteria.

How to calculate the least common multiple

There are several ways to find the LCM. Each method works, but some are faster depending on the size and quantity of numbers involved. Pick the one that matches your comfort level, or let the calculator do the work and review the steps.

Find the LCM using prime factorization

Prime factorization involves breaking each number down into its product of prime factors, then combining them.

Follow these steps:

  1. Find the prime factorization of each number.
  2. Identify every prime factor that appears in any factorization.
  3. For each prime factor, take the highest power that appears.
  4. Multiply them together.

Example: LCM of 18 and 24

  • 18 = 2 × 3 × 3 = 2¹ × 3²
  • 24 = 2 × 2 × 2 × 3 = 2³ × 3¹

Take the highest power of each prime:

  • 2³ = 8
  • 3² = 9

LCM = 8 × 9 = 72

This method scales well for larger numbers because finding the prime factorization gives you everything you need in one pass.

Find the LCM using listing multiples

This is the most visual way to find the LCM, especially useful for smaller numbers.

  1. List the multiples of each number.
  2. Find the smallest number that appears in every list.

Example: LCM of 4 and 5

  • Multiples of 4: 4, 8, 12, 16, 20, 24…
  • Multiples of 5: 5, 10, 15, 20, 25…

The smallest shared multiple is 20.

Can you use listing multiples for more than two numbers? Yes. Just write out multiples of all three (or more) numbers and look for the first value common to every list. It gets tedious with larger numbers, which is why other methods often work better.

LCM using the ladder method

The ladder method arranges the numbers side by side and divides down by prime numbers.

  1. Write the numbers next to each other in a row.
  2. Divide all numbers by a prime number that divides at least one of them evenly. Write the quotients below.
  3. Repeat until every quotient is 1.
  4. Multiply all the prime divisors together to get the LCM.

Example: LCM of 12 and 16

Prime1216
268
234
232
231
311

LCM = 2 × 2 × 2 × 2 × 3 = 48

The ladder method is popular in classrooms because it keeps the work organized.

LCM using the division method

The division method is very similar to the ladder method. Some textbooks treat them as the same technique.

  1. Write all numbers in a row.
  2. Divide by the smallest prime number that evenly divides at least two of the numbers. Carry down any number that doesn't divide evenly.
  3. Continue until no two numbers share a common factor.
  4. Multiply every divisor and every remaining number in the final row.

Example: LCM of 8, 12, and 15

Prime81215
24615
22315
3215

Final row: 2, 1, 5

LCM = 2 × 2 × 3 × 2 × 1 × 5 = 120

This approach handles three numbers or more without extra complexity.

Using the cake method to find LCM

The cake method is a visual variation of the division method. The name comes from how the work looks like layers of a cake when you draw dividing lines around each step.

  1. Place all numbers inside a "layer."
  2. Divide by a prime number that goes into at least two of them. Write the results in the next layer.
  3. Stop when no pair shares a factor greater than 1.
  4. Multiply every number on the outside edges (the divisors) and every number in the bottom layer.

The math is identical to the division method. The only difference is how you organize it on paper. Some students find the visual layout easier to follow.

Find the LCM using a Venn diagram

Using Venn diagrams to find the LCM starts with prime factorization, then sorts the factors into overlapping circles.

  1. Find the prime factors of each number.
  2. Draw overlapping circles, one per number.
  3. Place shared prime factors in the overlapping region. Place unique factors in the non-overlapping parts.
  4. Multiply all the factors in the entire diagram together.

Example: LCM of 18 and 24

  • 18 = 2 × 3 × 3
  • 24 = 2 × 2 × 2 × 3

Shared factors: one 2 and one 3. Unique to 18: one extra 3. Unique to 24: two extra 2s.

Multiply everything: 3 × 2 × 3 × 2 × 2 = 72

Venn diagrams are helpful for visualizing the relationship between two numbers. They become cluttered with three or more numbers.

Prime exponent method to calculate the least common multiple

The prime exponent method is a more formal version of prime factorization. It is useful when you want a formula-style approach.

  1. Express each number as a product of prime factors using exponents.
  2. For each prime that appears, select the highest exponent.
  3. Multiply the results.

Example: LCM of 12, 16, and 21

  • 12 = 2² × 3¹
  • 16 = 2⁴
  • 21 = 3¹ × 7¹

Highest powers: 2⁴, 3¹, 7¹

LCM = 16 × 3 × 7 = 336

This method is essentially prime factorization with explicit exponent notation. It reduces errors when numbers share many prime factors.

LCM and GCF

The LCM and the GCF (greatest common factor) are closely related. For two integers a and b:

LCM(a, b) = |a × b| / GCF(a, b)

This formula means you can find the LCM using the greatest common divisor. If you already know the GCF, one division gives you the LCM.

Example: LCM of 24 and 36

  • GCF of 24 and 36 = 12
  • LCM = (24 × 36) / 12 = 864 / 12 = 72

This is often the fastest shortcut for two numbers, especially when the GCF is easy to spot. Many programmers use the Euclidean algorithm to find the GCF first, then apply this formula.

What if you wanted the GCF instead? Check out the Greatest Common Factor (GCF) Calculator on this site.

LCM calculator for multiple numbers

This calculator accepts two or more numbers at once. To find the LCM of a set of numbers larger than two:

  1. Find the LCM of the first two numbers.
  2. Take that result and find the LCM of it with the third number.
  3. Continue until you've included every number in the set.

Example: LCM of 4, 6, and 10

  • LCM(4, 6) = 12
  • LCM(12, 10) = 60

The LCM of 4, 6, and 10 is 60.

This chaining approach works with any method. The calculator handles it automatically, so just enter all the numbers you want to find the LCM for and let it run.

What is a multiple in math

A multiple of a number is the product you get when you multiply that number by any positive integer.

  • Multiples of 3: 3, 6, 9, 12, 15, 18…
  • Multiples of 7: 7, 14, 21, 28, 35…

Every number has an infinite list of multiples. A common multiple is a number that appears on the multiple lists of two or more numbers. The least common multiple is simply the smallest one.

What are prime factors? A prime number is an integer greater than 1 whose only divisors are 1 and itself (2, 3, 5, 7, 11…). Prime factors are the prime numbers that multiply together to equal a given number. For instance, the prime factors of 30 are 2, 3, and 5.

When to use a least common multiple calculator

The LCM shows up more often than most people expect:

  • Adding or subtracting fractions. You need a common denominator. The LCM of the denominators is the least common denominator.
  • Scheduling and repeating events. If one event repeats every 4 days and another every 6 days, they coincide every LCM(4, 6) = 12 days.
  • Synchronizing cycles. Gear ratios, rotating shifts, or any system with overlapping intervals.
  • Simplifying math problems. Many algebra and number theory exercises depend on identifying the LCM.

Use this calculator whenever you want a quick, accurate result. It works for smaller numbers you could solve by hand and for larger sets of numbers where manual methods get slow. The step-by-step breakdown helps you verify the answer or learn the process for homework and exams.