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
| Symbol | Name | Description | Unit |
|---|---|---|---|
| a | First integer | A positive integer | — |
| b | Second integer | A positive integer | — |
| GCD | Greatest Common Divisor | GCD(a, b) — the largest integer that divides both a and b; computed with the Euclidean algorithm | — |
| LCM | Least Common Multiple | The smallest positive integer divisible by both a and b | — |
How to Use
- Find GCD(a, b) using the Euclidean algorithm.
- Compute LCM(a, b) = (a × b) ÷ GCD(a, b).
- 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.
| Step | a | b | a = b × q + r | Remainder r |
|---|---|---|---|---|
| 1 | 12 | 6 | 12 = 6 × 2 + 0 | 0 |
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:
| Step | a | b | Remainder r |
|---|---|---|---|
| 1 | 252 | 105 | 42 |
| 2 | 105 | 42 | 21 |
| 3 | 42 | 21 | 0 |
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. ✓
Related pages
- Use the Calculator — Interactive calculator for this formula
- Read the Notes — Step-by-step explanation with worked examples