Least Common Multiple Calculator

Find the least common multiple of any set of whole numbers, with prime factorisation and the first few common multiples listed.

How to use this calculator

  1. 1Enter two or more whole numbers.
  2. 2Use the LCM as the common denominator when adding or subtracting fractions.
  3. 3The build table shows which prime powers produced the answer.

How the calculation works

lcm(a, b) = |a × b| / gcd(a, b)
gcd
Greatest common divisor of the pair
|a × b|
The absolute value of the product

Dividing by the GCF before multiplying keeps the intermediate value small, which matters because a naive product overflows exact integer range far sooner.

For more than two numbers the operation is applied cumulatively: lcm(a, b, c) = lcm(lcm(a, b), c).

Equivalently, the LCM is the product of the highest power of every prime appearing in any of the numbers.

Worked example

LCM of 4, 6 and 15

  1. 1.Prime factors: 4 = 2², 6 = 2 × 3, 15 = 3 × 5.
  2. 2.Take the highest power of each prime: 2² from 4, 3 from 6 or 15, and 5 from 15.
  3. 3.Multiply: 4 × 3 × 5 = 60.
  4. 4.Check: 60 ÷ 4 = 15, 60 ÷ 6 = 10, 60 ÷ 15 = 4 — all whole, so 60 is a common multiple, and no smaller number is.

Result: 60

What the least common multiple is for

The least common multiple is the smallest whole number that every number in a group divides into evenly. Where the GCF asks "what is the biggest thing that fits inside these numbers," the LCM asks the opposite question — "what is the smallest thing these numbers all fit inside?"

Everyday problems that are secretly LCM problems

Any situation with repeating cycles of different lengths that need to line back up eventually is an LCM calculation underneath.

  • Adding fractionsthe lowest common denominator used to combine fractions with different denominators is simply the LCM of those denominators.
  • Schedulingif one event repeats every 4 days and another every 6, they next coincide on day 12 — the LCM of 4 and 6.
  • Gears and machinerytwo meshed gears with different tooth counts return to their starting alignment after a number of rotations equal to the LCM of their tooth counts.
  • Traffic lights and timerssynchronising two lights with different cycle lengths so they turn green together again is the same underlying calculation.

A quick sanity check using GCF

For any two numbers, the GCF and LCM are linked by one tidy identity: their product always equals the product of the two original numbers. That gives a fast way to check an answer by hand, and it is also why nearly-coprime number pairs — like 7 and 8 — tend to have a surprisingly large LCM relative to their size, since there is almost nothing shared between them to cancel out.

What this assumes, and where it stops

Assumptions

  • Inputs are non-zero whole numbers.

Limitations

  • The LCM grows very quickly with the number of inputs and can exceed exact integer range; the calculator refuses rather than returning a wrong figure.
  • Zero is rejected because it has no least common multiple with any other number.

Common questions

What is the difference between LCM and lowest common denominator?

They are the same calculation applied to different things. The lowest common denominator of a set of fractions is simply the LCM of their denominators — so to add 1/4 and 1/6 you take the LCM of 4 and 6, which is 12, and rewrite both fractions over 12.

How are LCM and GCF related?

For any two numbers, GCF × LCM equals their product. So for 4 and 6: GCF is 2, LCM is 12, and 2 × 12 = 24 = 4 × 6. This identity holds only for pairs — it does not extend to three or more numbers.

Formula and content last reviewed on .

Results are estimates for information only, not professional advice.

Report an error

Tools people commonly use alongside the least common multiple calculator.

See all math calculators →