LCM Formula – Least Common Multiple Calculation

The complete LCM formula using the GCD method and prime factorization: variable definitions, step-by-step method, and three fully worked examples.

Formula
The least common multiple of two positive integers equals their product divided by their greatest common divisor. For more than two numbers, apply the formula pairwise.
Variables
SymbolNameDescriptionUnit
aFirst integerA positive integer
bSecond integerA positive integer
GCDGreatest Common DivisorGCD(a, b) — the largest integer that divides both a and b; computed with the Euclidean algorithm
LCMLeast Common MultipleThe smallest positive integer divisible by both a and b
How to Use
  1. Find GCD(a, b) using the Euclidean algorithm.
  2. Compute LCM(a, b) = (a × b) ÷ GCD(a, b).
  3. For more than two numbers: LCM(a, b, c) = LCM(LCM(a, b), c).
Examples
1. LCM(12, 18)

Step 1 — find GCD(12, 18) using the Euclidean algorithm.

Stepaba = b × q + rRemainder r
112612 = 6 × 2 + 00

GCD(12, 18): 18 = 12 × 1 + 6, then 12 = 6 × 2 + 0 → GCD = 6.

Verification: 36 ÷ 12 = 3 ✓ 36 ÷ 18 = 2 ✓ No smaller common multiple exists.
2. LCM(252, 105)

Step 1 — GCD(252, 105) via Euclidean algorithm:

StepabRemainder r
125210542
21054221
342210

GCD = 21.

1,260 ÷ 252 = 5 ✓ 1,260 ÷ 105 = 12 ✓
3. LCM(4, 6, 10) — three numbers

Apply LCM pairwise. First compute LCM(4, 6), then LCM(result, 10).

💡Verify using prime factorization: 4 = 2², 6 = 2 × 3, 10 = 2 × 5. LCM = 2² × 3 × 5 = 60. ✓