greatest common multiple calculator

Calculator

Enter two or more integers to find the shared multiple result. This tool calculates the LCM (least common multiple), which people often mean when they say “greatest common multiple.”

Accepted: positive numbers, negative numbers, and zero. Minimum: 2 values.

What is a “greatest common multiple”?

In strict math language, there is usually no greatest common multiple for non-zero integers, because you can always multiply by another whole number and get an even larger common multiple. For that reason, the meaningful target is the least common multiple (LCM), the smallest positive number that each input divides into evenly.

So if you searched for a greatest common multiple calculator, this page gives you the practical result you likely want: the LCM. As a bonus, it also shows the GCD (greatest common divisor) so you can see both key relationships.

How this calculator works

Step 1: Normalize the numbers

The tool reads your integers and uses their absolute values for GCD/LCM operations. Negative signs do not change divisibility patterns for these calculations.

Step 2: Compute GCD with the Euclidean algorithm

For two numbers a and b, it repeatedly applies: gcd(a, b) = gcd(b, a mod b) until the remainder is 0.

Step 3: Compute LCM from GCD

For each pair, it uses this identity:

LCM(a, b) = |a × b| ÷ GCD(a, b)

For more than two numbers, it repeats pairwise:

  • LCM(a, b, c) = LCM(LCM(a, b), c)
  • GCD(a, b, c) = GCD(GCD(a, b), c)

Quick examples

Example 1: 12, 18, 30

LCM(12, 18) = 36, then LCM(36, 30) = 180. So the least common multiple is 180.

Example 2: 8, 14

GCD(8, 14) = 2, so LCM = (8 × 14) ÷ 2 = 56.

Why LCM matters in real life

  • Scheduling: Find when repeating events line up again.
  • Fractions: Find a common denominator quickly.
  • Manufacturing cycles: Sync machines with different cycle lengths.
  • Classroom math: Build number sense and factor intuition.

FAQ

Can I include zero?

Yes. If any value is 0, the pairwise LCM will become 0, and all common multiples collapse to 0 in that setup.

Can I use negative numbers?

Yes. The calculator accepts them and uses absolute values for LCM/GCD logic.

How many numbers can I enter?

As many as you like for typical use. Very large values may produce very large results, but this calculator uses BigInt arithmetic for accuracy on integers.

🔗 Related Calculators