MultiConvers

Least Common Multiple Calculator

Paste two or more integers to get the smallest positive number that is a multiple of each of them.

How it works

The least common multiple of a and b is |a b| / gcd(a, b). For a longer list the same pairing is applied left to right: lcm(4, 6, 8) = lcm(lcm(4, 6), 8) = lcm(12, 8) = 24. Including 0 makes the LCM 0, because every multiple of 0 is 0.

Results that would overflow JavaScript’s safe integers are withheld rather than rounded. Decimals are rejected — LCM is defined on integers.

Formula

lcm(a, b) = |a × b| ÷ gcd(a, b)
lcm(12, 18) = 216 ÷ 6 = 36

Worked examples

  • Two numbers

    12 and 18 36

  • Three numbers

    4, 6, 8 24

Useful notes

  • Use the GCF calculator when you want the greatest common factor instead.
  • Signs are ignored: lcm(−12, 18) is the same as lcm(12, 18).

FAQ

How do I find the LCM of two numbers?

Divide the absolute product by the greatest common factor. 12 and 18 share a GCF of 6, so LCM = 216 ÷ 6 = 36.

Can I enter more than two numbers?

Yes. The LCM of a list is built pairwise. 4, 6 and 8 share 24.

What is the LCM of a number and 0?

0. The only common multiple of n and 0 that this definition keeps is 0.

Related tools

See all Math tools.