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 is the smallest positive number that every input divides into evenly.
📊 Summary
🧮 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.
🌳 Method 2: prime factorization
Break each number into primes, then take the highest power of every prime that appears.
| Number | Prime factorization |
|---|---|
| 4 | 2^2 |
| 6 | 2 × 3 |
| 10 | 2 × 5 |
| LCM | 2^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:
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.
How to use this LCM calculator
You only need your numbers to get a complete, step-by-step answer:
- 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. - Read the headline result: the big number at the top is the least common multiple of everything you entered.
- Check the summary: alongside the LCM you also get the greatest common factor of the same set, plus the count and largest input.
- Follow Method 1: the GCF-formula card shows each pairwise step, so you can reproduce the math by hand or check homework.
- 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.
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 3 | 1 | 6 | Coprime → product |
| 4 and 6 | 2 | 12 | Share a factor of 2 |
| 3 and 9 | 3 | 9 | 3 divides 9 → larger |
| 6 and 8 | 2 | 24 | — |
| 5 and 7 | 1 | 35 | Two primes → product |
| 10 and 15 | 5 | 30 | Share a factor of 5 |
| 12 and 18 | 6 | 36 | — |
| 4 and 9 | 1 | 36 | Coprime → 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.
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.
💡 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.
❓ 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.
Related Calculators
Percentage Calculator
Solve any percentage problem - what is X% of Y and more
Fraction Calculator
Add, subtract, multiply and divide fractions
Scientific Calculator
A full scientific calculator with trig, logs and more
Average Calculator
Calculate the mean, median and mode of numbers
GPA Calculator
Calculate your grade point average (weighted or unweighted)
Ratio Calculator
Simplify, scale and solve ratios and proportions