Home » LCM Calculator

LCM Calculator

FREE ONLINE TOOL

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.

Quick answer: The least common multiple (LCM) is the smallest positive number that two or more numbers all divide into with no remainder. The LCM of 4 and 6 is 12, because 12 is the smallest number divisible by both. The fastest way to compute it is LCM(a, b) = |a × b| ÷ GCD(a, b) — for 4 and 6, that is (4 × 6) ÷ 2 = 12.

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:

  1. 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.
  2. Press the calculate button. The result appears instantly, along with the intermediate steps so you can see how the answer was built.
  3. 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.
  4. 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.
  5. 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.

NumbersGCFLCMWhy
4, 6212(4 × 6) ÷ 2 = 12
12, 18636(12 × 18) ÷ 6 = 36
7, 9163Coprime — LCM is the product
5, 1551515 is a multiple of 5
4, 6, 8—24LCM(LCM(4,6),8) = LCM(12,8) = 24
9, 12336(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.

Frequently Asked Questions

What does LCM mean in math?
LCM stands for least common multiple — the smallest positive number that two or more numbers all divide into evenly. The LCM of 4 and 6 is 12, because 12 is the smallest number divisible by both. It is the number you need whenever things on different cycles have to line up.
How do you find the LCM of two numbers?
The fastest method is the formula LCM(a, b) = (a × b) ÷ GCF(a, b). For 12 and 18: the GCF is 6, the product is 216, and 216 ÷ 6 = 36, so the LCM is 36. This calculator shows every step. For small numbers you can also list multiples of each and pick the smallest match.
How do you find the LCM of three numbers?
Pair them up: compute the LCM of the first two numbers, then compute the LCM of that result with the third number. For 4, 6, and 8: LCM(4, 6) = 12, then LCM(12, 8) = 24. The pairing order does not matter — you always get the same answer.
What is the relationship between LCM and GCF?
They are tied together by the identity LCM(a, b) × GCF(a, b) = a × b. For 12 and 18: 36 × 6 = 216, which equals 12 × 18. This gives you a free way to check any LCM answer — multiply it by the GCF and confirm you get the product of the two numbers.
When do you use LCM in real life?
Adding or subtracting fractions needs a common denominator, and the LCM gives the smallest one. Schedules are classic LCM problems: a bus every 12 minutes and one every 18 minutes next coincide in 36 minutes. Repeating events, gear ratios, and anything with cycles that must sync up all reduce to finding an LCM.
What is the difference between LCM and GCF?
The LCM goes upward to the smallest multiple both numbers share (LCM of 12 and 18 is 36), while the GCF goes downward to the largest divisor both numbers share (GCF of 12 and 18 is 6). Use the LCM for common denominators and scheduling; use the GCF for simplifying fractions.
Can the LCM be smaller than the numbers you start with?
No — the LCM is always at least as large as the biggest input number, because it must be a multiple of every input. If your computed LCM comes out smaller than one of the numbers, you made an error (you probably computed the GCF instead). This is the quickest sanity check available.
What is the LCM when one number divides the other?
It is simply the larger number. Since 15 is a multiple of 5, every multiple of 15 is automatically a multiple of 5, so LCM(5, 15) = 15. Check for this first on every problem — it is the fastest shortcut and handles a large share of homework questions.
What is the LCM of two numbers with no common factors?
When the numbers share no factor besides 1 (they are coprime), the LCM is just their product. LCM(7, 9) = 63 because 7 × 9 = 63. Be careful not to apply this to numbers that do share factors — for 6 and 8, the product 48 is wrong; the real LCM is 24.
Can you find the LCM of decimals or fractions?
The LCM is defined for whole numbers only, so convert first. For decimals like 0.4 and 0.6, work with 4 and 6 to get 12, then place the decimal point: the answer in the original scale is 1.2. For fractions, find the LCM of the denominators and use it as the common denominator.
Why is the formula LCM = (a × b) ÷ GCF true?
Multiplying a and b double-counts the prime factors the two numbers share. Dividing by the GCF removes exactly that double-counted overlap, leaving the smallest number that contains every prime factor of both. That is why the formula always produces a genuine common multiple — and the smallest one.
What is the least common denominator?
The least common denominator (LCD) of two fractions is the LCM of their denominators. For 5/12 and 7/18, the LCD is LCM(12, 18) = 36, so the fractions become 15/36 and 14/36. Using the least denominator keeps the numbers small and often skips the final simplification step entirely.

Related Tools