LCM calculator (least common multiple)

Gives the smallest positive number that every entered number divides. Useful for common denominators and for finding when repeating events line up.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter numbers (separate with commas or spaces).
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

lcm(a, b) = |a × b| ÷ gcd(a, b); for more numbers, lcm(a, b, c) = lcm(lcm(a, b), c).

Example

Result: Least common multiple: 60; Greatest common divisor: 2.

Limits and caveats

  • Accepts nonzero whole numbers up to 10^15 each, and up to 100 numbers.
  • The result is always positive because minus signs are ignored.

Questions about this tool

How are LCM and GCD related?

For two positive numbers, lcm × gcd equals their product. For 4 and 6 the LCM is 12 and the GCD is 2, and 12 × 2 = 24 = 4 × 6.

How does it help when adding fractions?

The LCM of the denominators is the least common denominator. For 1/4 + 1/6 use 12: 3/12 + 2/12 = 5/12.

Why is zero not allowed?

There is no positive common multiple that includes zero, so the tool asks for nonzero numbers.