Two running events repeat on different schedules, and you need to know when they line up again. Two fractions have different denominators, and you need one denominator that works for both. Two gears have different numbers of teeth, and you need the point where they sync up. Every one of these is the same math problem wearing a different costume: find the smallest number that two (or three) given numbers all divide into evenly.
This LCM calculator solves that problem instantly. Enter two or three whole numbers and it returns the least common multiple using the formula LCM(a, b) = |a × b| ÷ GCD(a, b), applied pair by pair when there are three inputs. It shows the method step by step so you can follow the logic, learn the technique, and check your homework with confidence — no signup needed.
LCM Calculator
Enter two or three whole numbers to get their least common multiple.
1. What Is the Least Common Multiple?
A multiple of a number is what you get when you multiply it by whole numbers: the multiples of 4 are 4, 8, 12, 16, 20, 24, and so on. The least common multiple of two numbers is simply the smallest multiple they share. For 4 and 6, list the multiples of each: 4 → 4, 8, 12, 16, 20, 24… and 6 → 6, 12, 18, 24…. The shared multiples are 12, 24, 36, and beyond — the smallest is 12, so LCM(4, 6) = 12.
Notice the difference from a factor problem. Factors divide into a number and shrink it; multiples multiply out and grow it. When a question asks for the LCM, the answer is always at least as big as the largest input number — that single check catches a lot of wrong answers before they happen.
The LCM shows up in surprisingly practical places. Adding or subtracting fractions requires a common denominator, and the LCM of the denominators is the smallest one that works — smaller denominators mean smaller numbers and less simplification at the end. Scheduling problems are LCM problems in disguise: if one bus leaves every 12 minutes and another every 18 minutes, they next leave together in LCM(12, 18) = 36 minutes. Repeating decimals, gear ratios, and calendar cycles all lean on the same idea.
You will also see the LCM paired with its sibling concept, the greatest common factor. Where the LCM goes upward to find a shared multiple, the GCF goes downward to find a shared divisor. They are two directions of the same relationship, and as section 4 explains, they are tied together by a neat formula.
2. How to Use This LCM Calculator
The calculator accepts two or three whole numbers and walks through the computation for you. Here is how to use it:
- Enter your numbers. Type two or three whole numbers into the input boxes. Decimals, fractions, and zero do not belong here — the LCM is defined for positive whole numbers.
- Press the calculate button. The result appears instantly, along with the intermediate steps so you can see how the answer was built.
- Read the LCM. The big result is the smallest number divisible by every input. Double-check that it is at least as large as your biggest input — it always should be.
- Follow the shown steps. The calculator displays the GCD computation and the division for each pair, which is exactly the working your teacher wants to see.
- For three numbers, watch the pairing. The calculator computes LCM(a, b) first, then combines that result with the third number: LCM(a, b, c) = LCM(LCM(a, b), c). The steps make this pairing visible.
Running examples back to back is a fast way to build intuition. Try (4, 6), then (4, 7), then (4, 8). Notice how the LCM jumps to 28 when one number is prime and drops to 8 when one number divides the other. Patterns like these are what make the concept stick.
3. The Formula Method, Worked Out Step by Step
The calculator uses this formula:
LCM(a, b) = |a × b| ÷ GCD(a, b)
In words: multiply the two numbers, then divide by their greatest common factor. This works because the product a × b double-counts the prime factors the two numbers share, and dividing by the GCF removes exactly that double-counting. If you would like the background on the shared-divisor half of this formula, our greatest common factor calculator explains the Euclidean algorithm that finds it in seconds.
Let us work through a complete example with real arithmetic: find LCM(12, 18).
Step 1 — Find the GCF of 12 and 18. The divisors of 12 are 1, 2, 3, 4, 6, 12. The divisors of 18 are 1, 2, 3, 6, 9, 18. The largest number on both lists is 6, so GCD(12, 18) = 6. (The Euclidean algorithm reaches the same answer faster: 18 ÷ 12 leaves remainder 6, and 12 ÷ 6 leaves remainder 0, so the last nonzero remainder — 6 — is the GCF.)
Step 2 — Multiply the two numbers. 12 × 18 = 216.
Step 3 — Divide by the GCF. 216 ÷ 6 = 36.
Answer: LCM(12, 18) = 36. Check it: 36 ÷ 12 = 3 and 36 ÷ 18 = 2, both exact — and nothing smaller than 36 works for both (24 is divisible by 12 but not 18; 30 is divisible by neither).
Now a second example, this time with three numbers: LCM(4, 6, 8). The calculator handles the third input by pairing:
Step 1 — LCM(4, 6). GCD(4, 6) = 2. Then (4 × 6) ÷ 2 = 24 ÷ 2 = 12.
Step 2 — Combine with the third number: LCM(12, 8). GCD(12, 8) = 4. Then (12 × 8) ÷ 4 = 96 ÷ 4 = 24.
Answer: LCM(4, 6, 8) = 24. Verify: 24 ÷ 4 = 6, 24 ÷ 6 = 4, 24 ÷ 8 = 3 — all exact. Notice that if you had paired differently, say LCM(4, 8) = 8 first and then LCM(8, 6) = 24, you would land on the same answer. Pairing order never changes the result.
There is also a prime-factorization route that is worth knowing for tests: break each number into primes, take the highest power of each prime that appears anywhere, and multiply. For 12 = 2² × 3 and 18 = 2 × 3², the highest powers are 2² and 3², giving 4 × 9 = 36 — the same answer. If you need the factorizations themselves, run the numbers through our factor calculator first.
4. How LCM and GCF Are Related
The LCM and GCF of two numbers are locked together by one of the neatest identities in basic arithmetic:
LCM(a, b) × GCF(a, b) = a × b
This says that the least common multiple times the greatest common factor always equals the product of the two numbers. It is worth proving to yourself once with our running example: LCM(12, 18) = 36 and GCF(12, 18) = 6, so 36 × 6 = 216 — and 12 × 18 = 216. It matches exactly.
Why does this work? Think in prime factors. For each prime, the two numbers contribute some exponent, and the GCF takes the smaller of the two exponents while the LCM takes the larger. Smaller + larger always equals the sum of the two exponents, which is exactly what multiplying the numbers does. So the product splits cleanly: the shared, overlapping part goes to the GCF and everything else — scaled up to the largest exponent — goes to the LCM.
This identity gives you two free problem-solving tricks. First, you can verify any LCM answer: compute or look up the GCF, multiply, and confirm you get a × b. Second, you can find the LCM directly from the GCF (which is what our calculator does) or the GCF from the LCM if a problem hands you that one instead. If a test gives you LCM(9, 12) = 36, you can recover GCF(9, 12) as (9 × 12) ÷ 36 = 108 ÷ 36 = 3.
The relationship also explains two special cases. When one number divides the other, the GCF is the smaller number and the LCM is the larger one: GCF(5, 15) = 5 and LCM(5, 15) = 15, and indeed 5 × 15 = 5 × 15. When the two numbers share no common factor besides 1 (they are coprime), the LCM is just their product: LCM(7, 9) = 63 because 7 × 9 = 63 and the GCF is 1. Our GCF calculator and this LCM calculator are built as companions for exactly this reason.
5. Tips for LCM Problems
- Check divisibility first. If the larger number is a multiple of the smaller, the LCM is simply the larger number. LCM(6, 24) = 24 — no formula needed. This shortcut handles a surprising share of homework problems.
- Check coprimality second. If the numbers share no factor besides 1 — like 8 and 9 — the LCM is just their product: 72. A quick check for small shared primes (2, 3, 5) is usually enough to tell.
- For fractions, the LCM is your common denominator. To add 5/12 + 7/18, compute LCM(12, 18) = 36, convert to 15/36 + 14/36 = 29/36. Using the least common denominator keeps the final simplification step small or unnecessary. Our fraction calculator can take it from there.
- Verify with the product identity. Multiply your LCM answer by the GCF and confirm you get a × b. It takes ten seconds and catches swapped or misremembered answers.
- Handle three numbers by pairing. Never try to juggle three numbers at once — compute LCM of the first two, then combine that result with the third. The calculator does exactly this, and you should too on paper.
- List multiples only for small numbers. The “list both multiples and find the match” method works for 4 and 6 but becomes painful for 48 and 72. Learn the formula method now; it scales to any size.
6. Common Mistakes Students Make
Answering with a number smaller than the inputs. The LCM can never be smaller than the largest input number. If your “LCM” of 9 and 12 comes out as 6, you computed something else — probably the GCF.
Forgetting to divide by the GCF in the formula. Students often compute a × b and stop there. For 12 and 18, 216 is a common multiple but not the least — dividing by GCF(12, 18) = 6 gives the correct 36. The division step is the whole point of the formula.
Multiplying everything for three numbers. Faced with LCM(4, 6, 8), some students multiply 4 × 6 × 8 = 192. That is a common multiple, but the least one is 24. Pair the numbers instead.
Using the LCM where the GCF belongs. Simplifying a fraction needs the greatest common factor (divide top and bottom by it), while adding fractions needs the least common multiple (as a shared denominator). Read the question twice: “simplify” points to GCF, “add/subtract” points to LCM.
Assuming the LCM is always the product. The product a × b is the LCM only when the numbers are coprime. For 6 and 8, the product is 48 but the LCM is 24 — because the shared factor 2 gets double-counted in the product. Divide it out with the GCF.
Leaving the answer unverified. A correct LCM must divide evenly into every input. If 36 does not divide 12 and 18 cleanly, it is not the LCM — but it does, so you are safe. Make this division check automatic.
7. LCM Examples at a Glance
The table below collects a few representative cases, including the special patterns worth memorizing. Run any row through the calculator to see the steps.
| Numbers | GCF | LCM | Why |
|---|---|---|---|
| 4, 6 | 2 | 12 | (4 × 6) ÷ 2 = 12 |
| 12, 18 | 6 | 36 | (12 × 18) ÷ 6 = 36 |
| 7, 9 | 1 | 63 | Coprime — LCM is the product |
| 5, 15 | 5 | 15 | 15 is a multiple of 5 |
| 4, 6, 8 | — | 24 | LCM(LCM(4,6),8) = LCM(12,8) = 24 |
| 9, 12 | 3 | 36 | (9 × 12) ÷ 3 = 36; check 36 × 3 = 108 = 9 × 12 |
8. Keep Going With Related Calculators
The LCM rarely travels alone. When a problem asks for the largest divisor two numbers share instead, the greatest common factor calculator finds it with the Euclidean algorithm. When you need the prime building blocks behind either computation, the factor calculator lists every factor and the full prime factorization. And when the whole point of the LCM is adding or subtracting fractions, the fraction calculator finishes the job. For the formal definition and properties, the Wikipedia article on the least common multiple is a reliable reference.