🇺🇸 USC
Math & Conversion
🔢

LCM Calculator

Find the least common multiple, step by step

🔢 Enter your numbers

Enter two or more positive integers. Separators can be commas or spaces.

Least common multiple

60
LCM of 4, 6, 10

60 is the smallest positive number that every input divides into evenly.

📊 Summary

LCM
60
GCF (greatest common factor)
2
Count of numbers
3
Largest input
10

🧮 Method 1: the GCF formula

Combine the numbers two at a time using LCM(a, b) = a × b ÷ GCF(a, b), carrying the result forward.

Step 1: LCM(4, 6)4 × 6 ÷ 2 = 12
Step 2: LCM(12, 10)12 × 10 ÷ 2 = 60

🌳 Method 2: prime factorization

Break each number into primes, then take the highest power of every prime that appears.

NumberPrime factorization
42^2
62 × 3
102 × 5
LCM2^2 × 3 × 5 = 60

The LCM uses the highest power of each prime (for example 2² rather than 2¹ if any number contains 2²).

Results use exact integer arithmetic. Very large inputs can exceed the safe integer range; keep each number at or below 100,000,000 for reliable results.

Last updated June 2026

Method: The least common multiple is computed with the standard identity LCM(a, b) = a × b ÷ GCF(a, b), extended across the whole list, and cross-checked with the prime factorization (highest-power) method.

Included: LCM of two or more integers, the greatest common factor, step-by-step pairwise calculation, and a prime factorization table for every input.

Not included: Non-integer (decimal) inputs and zero, which leave the LCM undefined. Negative numbers are handled by their absolute value.

LCM calculator: everything you need to know

The least common multiple (LCM) of a set of whole numbers is the smallest positive number that each of them divides into without a remainder. If you list the multiples of 4 (4, 8, 12, 16, 20, 24…) and the multiples of 6 (6, 12, 18, 24…), the first number that appears in both lists is 12 - that is the LCM of 4 and 6. This LCM calculator finds that number instantly for two or more values and shows you exactly how it got there using two classic methods.

The LCM formula

The quickest way to find the LCM of two numbers uses their greatest common factor (GCF):

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

where GCF(a, b) is the largest number that divides both a and b. The identity works because, for any two numbers, the product of their LCM and GCF equals the product of the numbers themselves: LCM × GCF = a × b. To extend it to a longer list, you fold the numbers in one at a time - take the LCM of the first two, then the LCM of that result with the third, and so on.

A worked example: LCM of 4, 6, and 10

Watch how the chain works for three numbers:

  • Step 1 - LCM(4, 6): the GCF of 4 and 6 is 2, so LCM = 4 × 6 ÷ 2 = 24 ÷ 2 = 12.
  • Step 2 - LCM(12, 10): the GCF of 12 and 10 is 2, so LCM = 12 × 10 ÷ 2 = 120 ÷ 2 = 60.

So the LCM of 4, 6, and 10 is 60 - the smallest number that all three divide into evenly (60 ÷ 4 = 15, 60 ÷ 6 = 10, 60 ÷ 10 = 6).

The prime factorization method

The second method is great for understanding why the LCM is what it is. Break each number into prime factors, then for every prime that appears, take the highest power of it across all the numbers, and multiply those together. For 12 and 18:

12 = 2 × 2 × 3 = 2² × 3
18 = 2 × 3 × 3 = 2 × 3²
LCM = 2² × 3² = 4 × 9 = 36

The LCM takes 2² (the most 2s in any single number) and 3² (the most 3s), giving 36. The calculator above shows this table automatically for whatever numbers you enter, and the dedicated Prime Factorization Calculator can break down any single value if you want to see its primes in isolation.

How to use this LCM calculator

You only need your numbers to get a complete, step-by-step answer:

  1. Enter your numbers: type two or more whole numbers into the box, separated by commas (for example 4, 6, 10). Spaces also work as separators.
  2. Read the headline result: the big number at the top is the least common multiple of everything you entered.
  3. Check the summary: alongside the LCM you also get the greatest common factor of the same set, plus the count and largest input.
  4. Follow Method 1: the GCF-formula card shows each pairwise step, so you can reproduce the math by hand or check homework.
  5. Study Method 2: the prime factorization table lists the primes for each number and how they combine into the LCM.

Everything updates as you type, so you can experiment with different sets of numbers and watch the LCM change.

Who this calculator is for

The LCM turns up far more often than most people expect, both in school and in everyday planning:

  • Students learning fractions, who need a least common denominator to add or subtract them.
  • Parents and tutors checking homework and wanting to see the steps, not just the answer.
  • Teachers creating worked examples and verifying problem sets quickly.
  • Programmers reasoning about repeating cycles, schedulers, and loop intervals.
  • Anyone scheduling events that repeat on different intervals and want to know when they coincide.

A real-world example: synced schedules

Suppose one bus leaves a stop every 12 minutes and another every 18 minutes, and they both just left together. When will they next leave at the same time? The answer is the LCM of 12 and 18, which is 36 minutes. The same logic applies to flashing lights, factory machines on different maintenance cycles, or two friends who visit the gym every 3rd and 4th day - they overlap every 12 days, the LCM of 3 and 4.

Another example: least common denominator

To compute 5/6 − 1/4, you need a common denominator. The LCM of 6 and 4 is 12, so you rewrite both fractions over 12: 5/6 becomes 10/12, and 1/4 becomes 3/12. Now the subtraction is easy: 10/12 − 3/12 = 7/12. Using the LCM (rather than just multiplying the denominators to get 24) keeps the numbers small and the answer already close to lowest terms. The Fraction Calculator applies this common-denominator step for you automatically.

Key terms explained

  • Multiple: a number you get by multiplying a value by a whole number (the multiples of 5 are 5, 10, 15, 20…).
  • Common multiple: a number that is a multiple of two or more values at once (24 is a common multiple of 4 and 6).
  • Least common multiple (LCM): the smallest of those common multiples (12 for 4 and 6).
  • Greatest common factor (GCF): the largest number that divides all the inputs evenly - the partner of the LCM.
  • Coprime: two numbers whose only common factor is 1; their LCM is just their product.
  • Least common denominator (LCD): the LCM of the denominators of a set of fractions.

Quick reference: LCM of common pairs

Here are the least common multiples of some pairs you will see often. Notice that when one number divides the other (like 3 and 9), the LCM is just the larger number, and when the two are coprime (like 4 and 9), the LCM is their product.

Numbers GCF LCM Note
2 and 316Coprime → product
4 and 6212Share a factor of 2
3 and 9393 divides 9 → larger
6 and 8224
5 and 7135Two primes → product
10 and 15530Share a factor of 5
12 and 18636
4 and 9136Coprime → product

Tips for finding the LCM faster

  • If one number divides another, the LCM is simply the larger number - no calculation needed.
  • If the numbers are coprime (no shared factor), just multiply them together.
  • Find the GCF first; dividing by it before multiplying keeps the numbers small and avoids overflow.
  • For long lists, sort or group numbers with shared factors so the running LCM grows slowly.

The division ("ladder") method

If you prefer not to factor each number separately, the ladder method finds the LCM and GCF together. Write your numbers in a row, then keep dividing the whole row by a prime that divides at least one of them, carrying down any number the prime does not divide. When only 1s and coprime leftovers remain, multiply every divisor on the left and every number across the bottom. For 12 and 18:

2 | 12  18
3 |  6   9
   |  2   3
LCM = 2 × 3 × 2 × 3 = 36

The left-hand divisors that divide every number (here just the 2 and 3 that hit both, giving 6) form the GCF, while multiplying the divisors by the bottom row gives the LCM. The ladder is a compact way to see why LCM × GCF = a × b: 36 × 6 = 216 = 12 × 18.

A larger worked example: LCM of 8, 9, and 21

Bigger numbers reward the prime-factorization method, because the GCF chain can be slow when the values share little in common. Factor each input first:

8  = 2 × 2 × 2 = 2³
9  = 3 × 3 = 3²
21 = 3 × 7
LCM = 2³ × 3² × 7 = 8 × 9 × 7 = 504

Take the highest power of each prime that appears anywhere - 2³ from the 8, 3² from the 9 (which beats the single 3 in 21), and 7 from the 21 - then multiply: 504. You can sanity-check it: 504 ÷ 8 = 63, 504 ÷ 9 = 56, and 504 ÷ 21 = 24, all whole numbers, and nothing smaller divides evenly by all three.

More places the LCM shows up

Beyond fractions and bus timetables, the least common multiple is the quiet engine behind a surprising range of problems:

  • Gears and pulleys: two meshing gears with 8 and 12 teeth return to their starting alignment after the LCM (24) of teeth have passed the contact point.
  • Tiling and packing: the smallest square you can tile with 6×8 rectangles has a side equal to the LCM of 6 and 8 - that is 24.
  • Calendars and rotations: staff who work 4-day and 6-day cycles share a day off every 12 days, the LCM of 4 and 6.
  • Music and rhythm: a 3-against-4 polyrhythm lines back up every 12 beats, the LCM of 3 and 4.
  • Programming: a task running every 15 and another every 20 ticks both fire together every 60 ticks, which is how schedulers reason about coincident events.

LCM vs GCF: a side-by-side comparison

The least common multiple and the greatest common factor are mirror images, and seeing them next to each other makes the difference stick:

  • What they find: the LCM is the smallest number the inputs all divide into; the GCF is the largest number that divides all the inputs.
  • Relative size: the LCM is always at least as big as your largest input; the GCF is always at most as big as your smallest input.
  • Coprime case: when the numbers share no factor, the GCF is 1 and the LCM is their full product - the two extremes meet.
  • The bridge: for any two numbers, LCM × GCF = a × b, so finding one instantly gives you the other.
  • Where you use them: the LCM gives the least common denominator for adding fractions; the GCF reduces a fraction to lowest terms.

If you need the factor side of that pair, the GCF Calculator shows the same step-by-step work for the greatest common factor.

Limitations and assumptions

This is a planning and homework tool, so keep a few boundaries in mind:

  • The LCM is defined only for non-zero integers. Decimals, fractions, and zero have no meaningful least common multiple here - for fractions, take the LCM of the denominators instead.
  • Negative inputs are read by their absolute value, because multiples are conventionally counted as positive numbers.
  • Very large inputs can produce an LCM that grows quickly, since coprime numbers multiply together; the result is exact but can be a big number.
  • The calculator returns the mathematical answer only - it does not, for example, decide which common denominator is most convenient for a particular fraction problem.

How it compares to related calculators

This page answers "what is the least common multiple of these numbers?" If your question is slightly different, a sister tool is the better fit:

Related concepts

The LCM sits in a small family of number-theory ideas. The GCF (greatest common factor) is its mirror image and the two are linked by the formula above. Prime factorization underpins both, since every integer breaks down into a unique product of primes. And the least common denominator used in fraction arithmetic is just the LCM of the denominators. If you are working with fractions, the Fraction Calculator applies these ideas automatically; for percentages and ratios, the Percentage and Ratio calculators handle the related proportional math.

Sources

  • Euclidean algorithm and the identity LCM(a, b) × GCF(a, b) = a × b - standard number theory (Euclid's Elements, Book VII).
  • Fundamental theorem of arithmetic - every integer greater than 1 has a unique prime factorization, which underpins the prime-factorization method.
  • U.S. Common Core State Standards for Mathematics (6.NS.B.4) - finding the least common multiple and greatest common factor of whole numbers.

💡 Good to know

LCM and GCF are two sides of the same coin

For any two numbers, LCM × GCF always equals the product of the numbers. So once you know the GCF, the LCM is a single division away - that is exactly the formula this calculator uses.

The LCM is never smaller than your biggest number

Because the LCM must be a multiple of every input, it is always at least as large as the largest value you enter. If one number divides another, the LCM is just that larger number.

Use the LCM for the least common denominator

When adding or subtracting fractions, the LCM of the denominators gives the smallest common denominator, which keeps your arithmetic tidy and your answer close to lowest terms.

⚠️ Common mistakes & edge cases

Confusing the LCM with the GCF

The LCM is the smallest common multiple (it is large), while the GCF is the largest common factor (it is small). For 4 and 6 the LCM is 12 but the GCF is only 2 - mixing them up is the most common error.

Multiplying the numbers when they share a factor

Just multiplying gives a common multiple, but not always the least one. For 4 and 6, 4 × 6 = 24 is a multiple of both, yet the LCM is 12. Only multiply directly when the numbers are coprime.

Trying to find the LCM with a zero

The least common multiple is undefined when any value is 0, because every number is a "multiple" of 0 and there is no smallest positive one. Use only non-zero integers.

Using decimals or fractions as inputs

The LCM is defined for whole numbers. If you have fractions, find the LCM of the denominators (the least common denominator) rather than the fractions themselves.

Note: This calculator works with whole numbers. Negative inputs are handled by their absolute value, since multiples are conventionally positive.
Disclaimer: This is a free educational and homework-checking tool that provides mathematical estimates for convenience. It is not professional or academic advice - always verify the result against your own working before relying on it for graded or important work.

❓ Frequently asked questions

What is the least common multiple (LCM)?

The least common multiple of two or more whole numbers is the smallest positive number that every one of them divides into evenly. For example, the LCM of 4 and 6 is 12, because 12 is the smallest number that is a multiple of both 4 (4, 8, 12...) and 6 (6, 12...).

How do you calculate the LCM of two numbers?

The fastest method uses the greatest common factor: LCM(a, b) = a × b ÷ GCF(a, b). For 4 and 6, the GCF is 2, so the LCM is 4 × 6 ÷ 2 = 24 ÷ 2 = 12. You can also use prime factorization: factor each number into primes and multiply the highest power of every prime that appears.

How do you find the LCM of three or more numbers?

Find the LCM of the first two numbers, then take that result and find its LCM with the next number, and so on. For 4, 6, and 10: LCM(4, 6) = 12, then LCM(12, 10) = 60. This calculator shows each pairwise step so you can follow the chain.

What is the difference between LCM and GCF?

The LCM is the smallest number that the inputs all divide into (a common multiple), while the GCF, or greatest common factor, is the largest number that divides into all of them (a common divisor). For any two numbers, LCM × GCF = the product of the two numbers, which is why the formula LCM(a, b) = a × b ÷ GCF(a, b) works.

How do you find the LCM using prime factorization?

Write each number as a product of primes, then for every prime that appears in any factorization, take its highest power, and multiply those together. For 12 = 2² × 3 and 18 = 2 × 3², the LCM uses 2² and 3², giving 2² × 3² = 4 × 9 = 36.

What is the LCM of two prime numbers?

When two numbers share no common factor other than 1 (they are coprime), their LCM is simply their product. Two different prime numbers are always coprime, so the LCM of 3 and 7 is 3 × 7 = 21, and the LCM of 5 and 11 is 55.

Can the LCM be smaller than the largest number?

No. The LCM is always greater than or equal to the largest input, because it must itself be a multiple of that number. If one number divides another evenly (like 4 and 12), the LCM equals the larger number - LCM(4, 12) = 12.

Why do I need the LCM to add fractions?

To add or subtract fractions with different denominators, you rewrite them over a common denominator. The least common multiple of the denominators is the least common denominator (LCD), the smallest one that keeps the arithmetic tidy. For 1/4 + 1/6, the LCM of 4 and 6 is 12, so you convert to 3/12 + 2/12 = 5/12.

Is the LCM the same as the lowest common multiple?

Yes. 'Least common multiple' and 'lowest common multiple' are two names for exactly the same thing, both abbreviated LCM. You may also see 'least common denominator' (LCD), which is the LCM applied specifically to the denominators of fractions.

What happens if I enter a zero or a negative number?

The LCM is only defined for non-zero integers, so entering a zero will prompt you to use non-zero values. Negative numbers are treated by their absolute value, since multiples are usually discussed as positive numbers - the LCM of -4 and 6 is the same as the LCM of 4 and 6, which is 12.

What is the LCM of a number and 1?

The LCM of any whole number and 1 is the number itself, because every integer is already a multiple of 1. For example, the LCM of 1 and 9 is 9, and the LCM of 1 and 50 is 50. By the same logic, the GCF of any number and 1 is always 1.

What is the ladder (division) method for finding the LCM?

Write the numbers in a row and repeatedly divide the whole row by a prime that divides at least one of them, carrying down any number it does not divide, until only coprime leftovers remain. Multiply all the divisors on the left by the numbers in the bottom row to get the LCM. The divisors that divide every number give the GCF, so the ladder finds both at once.

Does the order of the numbers change the LCM?

No. The least common multiple does not depend on the order you enter the numbers - LCM(4, 6, 10) is 60 no matter how you arrange them. For long lists it can be faster to group numbers that share factors so the running LCM grows slowly, but the final answer is always the same.

Related Calculators