LCM Calculator

Find the least common multiple (LCM) of two or more whole numbers, the smallest number they all divide into. Calculates in your browser.

Separate two or more whole numbers with spaces or commas.

Least common multiple

-

Numbers-

Show the math

The LCM is built up pairwise from the greatest common divisor:

lcm(a, b) = a × b ÷ gcd(a, b)

The smallest positive number that every input divides into evenly, your common denominator for adding fractions. If any value is zero there is no common multiple. All math runs locally in your browser.

What this does

The LCM calculator finds the least common multiple of two or more whole numbers, the smallest positive number that every input divides into evenly. It is the key to adding fractions with different denominators.

How to use it

  1. Enter two or more whole numbers, separated by spaces or commas.
  2. Read the least common multiple.
  3. Use it as a common denominator or a shared cycle length.

How it works

It divides each pair’s product by their greatest common divisor, then folds that across the list. If any value is zero there is no common multiple.

lcm(a, b) = a × b ÷ gcd(a, b)

Understanding your result

The LCM is the smallest number all your values share as a multiple, which is exactly the common denominator for adding or comparing fractions, and the point at which repeating cycles line up again. It is always at least as large as the biggest input, and equals their product only when the numbers share no factors.

Example

The LCM of 4, 6 and 8 is 24, the smallest number divisible by all three.

Sources & methodology

Last updated .

Frequently asked questions

What is the least common multiple used for?

Most often as a common denominator when adding or comparing fractions, and for finding when repeating events (cycles) next coincide.

How does LCM relate to GCF?

For two numbers, LCM × GCF = the product of the numbers, so lcm(a, b) = a × b ÷ gcd(a, b).

Can I enter more than two numbers?

Yes. Enter any list of whole numbers separated by spaces or commas and the calculator finds the multiple common to all of them.

Is my data stored?

No. Everything is calculated locally in your browser.