Skip to content
LoveToCalc

LCM calculator

Type two or more whole numbers and see their least common multiple — the common denominator — with the prime factors written out.

Two or more whole numbers, separated by commas, up to 15 digits each.

Try:

Least common multiple

lcm(4, 6, 10) = 60

By comparing prime factors

4 = 2²

6 = 2 · 3

10 = 2 · 5

Every prime that occurs, each to its highest power: 2² · 3 · 5 = 60

How to use it

What is the least common multiple?

The least common multiple, lcm, is the smallest positive whole number that all of the numbers divide. The multiples of 4 are 4, 8, 12, 16 and so on, those of 6 are 6, 12, 18, and 12 is the first in both. Add 10 and it becomes lcm(4, 6, 10) = 60.

With prime factors

Factorize each number and take every prime that occurs, to its highest power.

The primes are 2, 3 and 5, and the highest power of 2 is 2². lcm = 2² · 3 · 5 = 60.

Through the greatest common divisor

For two numbers, gcd(a, b) · lcm(a, b) = a · b, so lcm(a, b) = a · b / gcd(a, b). For 84 and 126, whose gcd is 42, that is 84 · 126 / 42 = 10,584 / 42 = 252. The identity holds for two numbers at a time only. With more, take them in turn: lcm(a, b, c) = lcm(lcm(a, b), c).

The common denominator

A common reason to look up an lcm is adding fractions. Two fractions are added over a common denominator, and the smallest one is the lcm of the denominators, which is why it is also called the least common denominator (LCD). In 1/4 + 1/6, lcm(4, 6) = 12, so 1/4 + 1/6 = 3/12 + 2/12 = 5/12.

Two shortcuts

How a single number is built from primes is on the prime factorization page.

Common mistakes

The formula and more examples are on the least common multiple formula page.

Common questions

Where is the lcm used outside a textbook? Whenever two things repeat at different rates and you want to know when they line up. One bus runs every 12 minutes and another every 18. If they leave together now, they do so again in lcm(12, 18) = 36 minutes.

How do I find the lcm of three numbers? Take two at a time. lcm(4, 6, 10) = lcm(lcm(4, 6), 10) = lcm(12, 10) = 60. With primes, take the highest power of every prime that appears in any of the numbers: 2² · 3 · 5 = 60.

Last reviewed October 6, 2026 ·How pages are reviewed

The formula behind this

All math calculators

Put this calculator on your site

Copy the code into your page where the calculator should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.