How to use the LCM Calculator
- Enter two numbers, or three if you need a triple LCM.
- Leave the third field at zero to ignore it.
- Read the least common multiple.
- Compare with the GCF row to see the relationship between the two.
How the calculation works
The LCM is computed from the GCF rather than by listing multiples: lcm(a, b) = |a·b| ÷ gcd(a, b). Dividing by the shared factor prevents counting it twice, which is exactly what makes the result least rather than merely common. For three or more numbers, apply the rule pairwise.
The prime-factor view explains why: take every prime that appears in any input and raise it to the highest power it reaches in any single input. The GCF does the opposite, taking the lowest power. That symmetry is why gcd(a,b) × lcm(a,b) = a × b for any pair.
Practically, the LCM is the least common denominator when adding fractions, and the period at which independent cycles resynchronise — gear teeth returning to the same alignment, buses departing together, or shift rotas coinciding.
lcm(a, b) = |a × b| / gcd(a, b) ; gcd(a,b) × lcm(a,b) = a × bSource: Fundamental theorem of arithmetic; standard gcd–lcm identity.
Worked example
Two buses leave a stop every 12 and 18 minutes. When do they next leave together?
- gcd(12, 18) = 6.
- lcm = 12 × 18 ÷ 6 = 216 ÷ 6.
- Result: 36.
Every 36 minutes the two departures coincide.
Frequently asked questions
Is the LCM always bigger than both numbers?+
It is at least as big as the larger. It equals the larger when one number divides the other.
What is the LCM of coprime numbers?+
Their product, since they share no factors to divide out.
Do I need the least common denominator to add fractions?+
No, any common denominator works — but the least one keeps the numbers smallest and the simplification shortest.
Can the LCM involve zero?+
No. Zero has no meaningful least common multiple with a non-zero number.
Last reviewed September 1, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.