LCM Calculator

Find the smallest positive integer divisible by both input numbers.

What does this calculator do?

The least common multiple (LCM) is the smallest positive integer that both input integers divide exactly.

Formula

For positive integers, LCM is calculated from the GCD:

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

How to use it

Enter two positive whole numbers. The result includes both the LCM and the GCD used in the formula.

Worked example

For 12 and 18, the GCD is 6, so LCM = (12 × 18) ÷ 6 = 36.

Formula version1.0.0
FormulaLCM(a, b) = |a × b| ÷ GCD(a, b)
Precision0 decimals

Frequently asked questions

When is the LCM useful?

It is useful for common denominators and for finding when repeating cycles next coincide.

Is the LCM always larger than both inputs?

Not always. If one input divides the other, the larger input is already their LCM.

How are GCD and LCM related?

For positive integers, GCD(a, b) × LCM(a, b) equals a × b.

Sources

Related calculators

Last updated: 2026-08-05 · v1.0.0 · Report an error