Skip to calculator
lcmcalculator.co

Number Theory & Fraction Arithmetic

LCM Calculator: Least Common Multiple with Steps

Type two or more whole numbers below to find their Least Common Multiple and Greatest Common Factor right as you type. Unlike basic tools that only hand you a final number, this page writes out the complete working for your exact numbers in four classroom methods.

2 to 10 integers • up to 18 digits each
Parsed:121824
Least Common Multiple Calculator Result
LCM(12, 18, 24) = 72
Greatest Common Factor: GCF(12, 18, 24) = 6
Check the answer (every division leaves a remainder of 0):
72 ÷ 12 = 672 ÷ 18 = 472 ÷ 24 = 3

Show the Working (Step-by-Step)

Switch method in one click:

Step 1: Break each number down into its prime factors.

Write each input as a product of prime numbers, then group matching primes with exponents.

12 = 2 × 2 × 3
= 2² × 3
18 = 2 × 3 × 3
= 2 × 3²
24 = 2 × 2 × 2 × 3
= 2³ × 3

Step 2: For each prime, pick the highest exponent that appears in any single number.

PrimeIn 12In 18In 24Highest Power
22²2¹2³2³ = 8
33¹3²3¹3² = 9

Step 3: Multiply those highest prime powers together to get the LCM.

LCM = 2³ × 3² = 8 × 9 = 72

What Is the Least Common Multiple (LCM)?

A multiple of a number is what you get when you multiply that number by a positive whole number (1, 2, 3, 4, and so on). For instance, the multiples of 4 are 4, 8, 12, 16, 20, 24, and they keep going forever. A common multiple is any number that shows up in the multiplication tables of two or more numbers at the same time.

The Least Common Multiple (LCM) is simply the smallest positive whole number that all of your starting numbers divide into evenly with zero remainder. You will also see textbooks call it the Lowest Common Multiple or write it in function notation as lcm(a, b).

An Everyday Picture: The Hot Dog and Bun Problem

Suppose hot dogs are sold in packs of 8, and hot dog buns are sold in bags of 10. If you want to buy the exact same number of hot dogs and buns with nothing left over, what is the smallest number you can buy?

If you buy 1, 2, 3, 4, or 5 packs of hot dogs, you get 8, 16, 24, 32, 40 hot dogs. If you buy 1, 2, 3, or 4 bags of buns, you get 10, 20, 30, 40 buns. The first number where both counts match up is 40 (5 packs of hot dogs and 4 bags of buns). That means LCM(8, 10) = 40.

Three Reliable Ways to Find the LCM by Hand

Every method below leads to the exact same answer, but each one shines in a different situation. Here is how each technique works on paper, step by step.

Method 1: Listing Multiples (Best for Small Numbers)

When you have two small numbers that you already know from your times tables, writing out the first few multiples of each is the most direct approach. Let's find the LCM of 6 and 8:

Multiples of 6: 6, 12, 18, 24, 30, 36, 42, 48…
Multiples of 8: 8, 16, 24, 32, 40, 48, 56…

Notice that both 24 and 48 appear in both lists (as do 72, 96, and every multiple of 24 after that). Because we want the least common multiple, we stop at the very first match: LCM(6, 8) = 24. Where does listing fall short? Try finding the LCM of 17 and 23 by listing—you would have to write out 17 multiples of 23 before hitting 391!

Method 2: Prime Factorization (The Classroom Gold Standard)

Every composite whole number is built from prime numbers multiplied together. If you break each number into primes, the LCM is just the product of the highest power of each prime involved. Let's work through 18 and 30:

  1. Factor 18 into primes: 18 = 2 × 3 × 3 = 2¹ × 3²
  2. Factor 30 into primes: 30 = 2 × 3 × 5 = 2¹ × 3¹ × 5¹
  3. Compare each prime across both numbers and keep the largest exponent:
    • For prime 2: highest power is 2¹ = 2
    • For prime 3: 18 has 3² and 30 has 3¹, so we keep 3² = 9
    • For prime 5: 30 has 5¹, so we keep 5¹ = 5
  4. Multiply those winning powers together: LCM(18, 30) = 2¹ × 3² × 5¹ = 2 × 9 × 5 = 90.

Why this works: For a number to be divisible by 18, its prime building blocks must contain at least one 2 and two 3s. To also be divisible by 30, it needs at least one 2, one 3, and one 5. Taking the maximum count of each prime guarantees both numbers fit inside cleanly without adding a single wasted factor.

Method 3: The GCF Formula (Fastest for Two Numbers)

When you multiply two numbers together (a × b), you automatically get a common multiple—but if the two numbers share any factors, those shared factors get counted twice. Dividing by their Greatest Common Factor (GCF) strips out that exact overlap:

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

Let's apply this to 24 and 36:

  • The largest number that divides both 24 and 36 is GCF(24, 36) = 12.
  • Instead of multiplying 24 × 36 = 864 first, divide one number by 12 right away to keep the arithmetic tiny: (24 ÷ 12) × 36 = 2 × 36 = 72.
  • So LCM(24, 36) = 72.

Finding the LCM of Two Numbers vs. Three (or More) Numbers

Students often learn the two-number GCF shortcut and then try to write LCM(a, b, c) = (a × b × c) ÷ GCF(a, b, c). Careful—that three-number formula does not work!

To see why, look at 4, 6, and 15 (). There is no factor greater than 1 that divides all three numbers at once, so GCF(4, 6, 15) = 1. Yet their product is 4 × 6 × 15 = 360, while the true LCM is only 60. Why? Because 4 and 6 share a factor of 2, and 6 and 15 share a factor of 3.

How to handle 3+ numbers with Primes

Prime factorization works identically whether you have 2 numbers or 10 numbers. For 4 = 2², 6 = 2 × 3, and 15 = 3 × 5, the highest powers are 2², 3¹, and 5¹, giving 4 × 3 × 5 = 60.

How to handle 3+ numbers with GCF

Chain the two-number formula one pair at a time. First find LCM(4, 6) = 12. Then take that result and pair it with the third number: LCM(12, 15) = (12 × 15) ÷ 3 = 60.

Want a dedicated layout for pairs or triples? Visit our LCM of Two Numbers Calculator or LCM of Three Numbers Calculator.

Where You Actually Use LCM in Real Life

Outside of math tests, Least Common Multiple shows up any time two different repeating cycles or measurements need to line up at the exact same mark:

1. Adding & Comparing Fractions

You cannot directly add 5/12 + 7/18 because twelfths and eighteenths are different slice sizes. Finding LCM(12, 18) = 36 gives you the smallest common denominator (15/36 + 14/36 = 29/36) so you don't have to simplify huge numbers at the end.

2. Transit & Shift Schedules

If the Red Line train departs every 12 minutes and the Express bus leaves every 15 minutes from the same station at 8:00 AM, they will next depart together after LCM(12, 15) = 60 minutes (at 9:00 AM).

3. Gear Teeth & Rotating Machinery

When a 16-tooth gear meshes with a 24-tooth gear, a marked tooth on each wheel will meet again after LCM(16, 24) = 48 tooth clicks—meaning 3 full turns of the small gear and 2 full turns of the large gear.

4. Square Tiling & Packaging Grids

If you have rectangular tiles that measure 15 cm by 20 cm, the smallest perfect square you can build without cutting a tile is LCM(15, 20) = 60 cm on each side (4 rows of 15 cm by 3 columns of 20 cm).

See 10 worked story problems in our LCM Word Problems Guide.

Four Mistakes That Trip Students Up (And How to Catch Them)

1. Confusing LCM with GCF because of the word “Least”

Our brains see “Least” and expect a tiny number, or see “Greatest” in GCF and expect a huge number. Focus on the second word instead: Multiples are big (as big as or bigger than your numbers); Factors are small (pieces that fit inside your numbers).

2. Multiplying the numbers blindly every single time

For 6 and 8, many people write 6 × 8 = 48. While 48 is a common multiple, it is twice as big as necessary because 6 and 8 share a factor of 2. Always check whether your numbers can both be divided by 2, 3, or 5 first.

3. Adding exponents instead of taking the highest exponent

When factoring 12 = 2² × 3 and 18 = 2 × 3², don't multiply all the 2s together to get 2³. You only need enough 2s to cover the hungriest single number (2² from 12).

4. Stopping at a composite number in a factor tree

Writing 24 = 4 × 6 and treating 4 and 6 like primes will throw off your exponent table. Keep splitting branches until every leaf is prime (2, 3, 5, 7, 11, 13…).

Quick-Reference Table of Frequent LCMs

Click any pair to open its dedicated step-by-step worksheet, or load it into the calculator above.

Open full 1–20 LCM Chart →
NumbersGCFLCMWhy (Shortcut Rule)Worksheet
4 and 6212Share factor 2: (4 × 6) ÷ 2 = 12Steps →
6 and 8224Share factor 2: (6 × 8) ÷ 2 = 24Steps →
8 and 12424Share factor 4: (8 × 12) ÷ 4 = 24Steps →
9 and 12336Share factor 3: (9 × 12) ÷ 3 = 36Steps →
10 and 12260Share factor 2: (10 × 12) ÷ 2 = 60Steps →
12 and 15360Share factor 3: (12 × 15) ÷ 3 = 60Steps →
12 and 18636Share factor 6: (12 × 18) ÷ 6 = 36Steps →
15 and 20560Share factor 5: (15 × 20) ÷ 5 = 60Steps →
16 and 24848Share factor 8: (16 × 24) ÷ 8 = 48Steps →
18 and 24672Share factor 6: (18 × 24) ÷ 6 = 72Steps →
3, 4, and 5160Mutually coprime: 3 × 4 × 5 = 60Steps →
12, 18, and 24672Highest powers: 2³ × 3² = 72Steps →

Common Questions

Frequently Asked Questions About LCM

Is LCM the same as LCD (Least Common Denominator)?

Mathematically, yes—they use the exact same calculation. The only difference is where the numbers come from. When you find the LCM of the bottom numbers (denominators) of two or more fractions so you can add or compare them, teachers call that number the Least Common Denominator (LCD). For example, to add 1/6 and 3/8, you find LCM(6, 8) = 24, so 24 is your LCD.

Can the LCM ever be smaller than one of the starting numbers?

No, never. Every positive multiple of a whole number is at least as large as the number itself (since 1 × n = n). That means the Least Common Multiple of a set of positive integers is always greater than or equal to the largest number in your list. If you ever get a smaller answer, you likely found a common factor (like the GCF) instead of a common multiple.

What is the LCM of a prime number and another number?

If the other number is already a multiple of that prime—such as 7 and 28—then the larger number (28) is the LCM. In every other case, a prime shares no factors greater than 1 with the second number, so you simply multiply the two numbers together. For instance, LCM(7, 12) = 7 × 12 = 84.

What is the LCM of 0 and another number?

In school arithmetic and number theory, the Least Common Multiple is only defined for positive whole numbers (1, 2, 3, and so on) or leaves LCM(0, a) = 0 because 0 is the only multiple of 0. Because 0 cannot be used as a denominator or a repeating positive cycle length, our calculator requires positive integers starting at 1.

Does the order of the numbers matter when finding the LCM?

Not at all. Least Common Multiple is both commutative and associative. Typing 12, 18, 24 gives the exact same result (72) and the same prime factor breakdown as typing 24, 12, 18.

How does the LCM relate to the Greatest Common Factor (GCF)?

For any two positive integers a and b, the product of their LCM and GCF equals the product of the two numbers themselves: LCM(a, b) × GCF(a, b) = a × b. Rearranging that equation gives the fast two-number formula: LCM(a, b) = (a × b) ÷ GCF(a, b).

When can I just multiply the numbers together to get the LCM?

You can multiply the numbers directly if and only if they are mutually coprime—meaning no two numbers in your list share a factor greater than 1. Two consecutive whole numbers like 8 and 9 are always coprime, so LCM(8, 9) = 72. Watch out when you have three numbers, though: even if all three don't share a single factor, any pair that shares a factor will make the LCM smaller than the full product.

What is the LCM of 1 and any number n?

It is always n. Every whole number is already a multiple of 1 (since n = 1 × n), so the smallest multiple they share is n itself.

How do I find the LCM of decimals or fractions?

For fractions, use the rule LCM(a/b, c/d) = LCM(numerators) ÷ GCF(denominators) after simplifying each fraction. For decimals like 1.2 and 1.8, multiply both by 10 (or 100) to turn them into whole numbers (12 and 18), find LCM(12, 18) = 36, and then divide by 10 to get 3.6.