LCM LCM Calculator
Least Common Multiple · Free Math Tool
Instant · Free · No signup Works for 2–6 positive integers

Formula & Methods

Home » Formula & Methods

Core identity (two numbers)

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

This is exact for all integers a, b ≠ 0. Our LCM calculator uses this under the hood after computing GCD with the Euclidean algorithm.

Prime-power formula

Mathematical notation

Write each integer in canonical form:

a = p1α1 · p2α2 · … and b = p1β1 · p2β2 · …

Then:

LCM(a,b) = p1max(α1,β1) · p2max(α2,β2) · …
GCD(a,b) = p1min(α1,β1) · p2min(α2,β2) · …

Three or more numbers

LCM is associative:

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

Same for GCD. That is why the calculator can accept up to six inputs without a special formula.

Useful properties

PropertyMeaning
LCM(a, a) = |a|A number with itself
LCM(a, 1) = |a|1 divides everything
LCM(a, 0) = 0By convention in many texts; we reject 0 in the tool
If a divides bThen LCM(a,b) = |b|
Coprime pairGCD=1 ⇒ LCM = |a×b|
Desk with calculator and notes