Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Least Common Multiple (LCM)






The Smallest Shared Multiple

While the GCD finds the largest number that divides two given integers, the LCM works in the opposite direction — it finds the smallest number that both integers divide into. Where the GCD looks downward into shared factor structure, the LCM looks upward to the first point where two multiplication sequences meet.

Key Terms

Least Common Multiple— the central concept on this page
Multiple— the LCM is the smallest shared member of two multiple sequences
Greatest Common Divisor— linked to the LCM by the identity a⋅b=gcd⁡(a,b)⋅lcm(a,b)a \cdot b = \gcd(a,b) \cdot \text{lcm}(a,b)
Common Denominator— the LCM of two denominators gives the least common denominator

See All Arithmetic Definitions →


What is LCM?

You already solve this whenever two repeating things have to line up.
Two buses leave a stop together, one returning every 4 minutes and the other every 6. Counting forward in 4s and in 6s, you look for the first time the two counts meet.
The same question turns up with timetables, with packs in a shop and with fractions.
Each situation asks for the first number reached by counting in 4s and also by counting in 6s.
situationthe questionanswer
buses every 4 and every 6 minutes, both leaving nowwhen do they leave together again?in 12 minutes
sausages in packs of 4, rolls in packs of 6fewest of each with none left over?12 of each
adding 1/4 + 1/6smallest denominator both fit into?12, giving 3/12 + 2/12
What they share: the smallest number that both 4 and 6 divide into evenly.
The multiples of 44 are 4,8,12,16,20,24,…4, 8, 12, 16, 20, 24, \ldots The multiples of 66 are 6,12,18,24,30,…6, 12, 18, 24, 30, \ldots The numbers appearing in both lists — the common multiples — are 12,24,36,…12, 24, 36, \ldots The smallest is 1212, so lcm(4,6)=12\text{lcm}(4, 6) = 12.
Number line scene (two tracks)04812162024×406121824×6lcm = 12lcm(4, 6) = 12multiples of 4:4, 8, 12, 16, 20, 24, …multiples of 6:6, 12, 18, 24, …common multiples:12, 24, 36, …smallest = 12
The definition
The least common multiple of two positive integers aa and bb, written lcm(a,b)\text{lcm}(a, b), is the smallest positive integer divisible by both.
The least common multiple of two positive integers aa and bb, written lcm(a,b)\text{lcm}(a, b), is the smallest positive integer divisible by both.
So lcm(4,6)=12\text{lcm}(4, 6) = 12 — the bus meeting time, the pack count and the common denominator all at once.
The LCM is a single whole number, trapped between the larger input and the product.
The LCM always exists and is always at least as large as the larger input: lcm(a,b)≥max⁡(a,b)\text{lcm}(a, b) \geq \max(a, b). The result must be a multiple of both numbers, so it cannot be smaller than either one.

At the other extreme, lcm(a,b)≤a⋅b\text{lcm}(a, b) \leq a \cdot b. The product a⋅ba \cdot b is always a common multiple — the LCM may equal it or may be smaller, but never exceeds it.
What the name buys: one answer, and one set of methods, for every one of those situations.
Once the timetable, the shopping and the fractions are seen as the same question, a single way of finding the LCM settles all of them. Listing multiples works for small numbers; for larger ones the page shows faster routes through prime factorization and through the greatest common divisor.
The rest of the page covers the notation, the basic properties, three methods for finding the LCM, and its relationship with the GCD.

LCM Notation

Notation

LCM Notation

The mirror twin of the GCD marks: the same function grammar pointed the other way, a square-bracket shorthand completing number theory's pair, and an acronym that changes name when it moves into fraction work.
gcd⁡(a,b)\gcd(a, b) and its spellings are owned by GCD notation; the divides bar inside every definition by divisibility notation.
lcm⁡(a,b)\operatorname{lcm}(a, b)
the l-c-m of a and b
The mirror twin: lowercase upright operator, arguments in parentheses — smallest common multiple where gcd⁡\gcd takes largest common divisor, as What is LCM? above defines. The pair is chained by gcd⁡(a,b)⋅lcm⁡(a,b)=a⋅b\gcd(a,b) \cdot \operatorname{lcm}(a,b) = a \cdot b — The GCD-LCM Relationship below.
CasesMore arguments extend associatively — lcm⁡(a,b,c)\operatorname{lcm}(a, b, c), per LCM of More Than Two Numbers below; print keeps the operator upright, like gcd⁡\gcd and the trig names.
Do not confuseThe GCD bounds, flipped. lcm⁡(a,b)≥max⁡(a,b)\operatorname{lcm}(a,b) \geq \max(a,b) while gcd⁡(a,b)≤min⁡(a,b)\gcd(a,b) \leq \min(a,b) — swapping the two inequalities is the standard slip when both operators share a problem.
[a,b][a, b]
bracket a, b — the lcm in number-theory shorthand
Number theory's compact spelling: where gcd⁡\gcd compresses to bare parentheses (a,b)(a, b), lcm⁡\operatorname{lcm} compresses to square brackets — [4,6]=12[4, 6] = 12 in that dialect. The GCD page records its half of the pair.
CasesStrictly a research-literature convention — school texts and this site keep the full names; meeting [a,b]=ab/(a,b)[a, b] = ab/(a, b) in a paper is the identity lcm⁡=ab/gcd⁡\operatorname{lcm} = ab/\gcd in costume.
Do not confuseA closed interval. [4,6][4, 6] is every real from four to six in interval notation and the single integer 1212 in number-theory shorthand — same glyphs, incompatible readings, resolved only by context.
LCM vs LCD\text{LCM vs LCD}
least common multiple; least common denominator
One computation, two names by job: the LCD of a set of fractions is the LCM of their denominators — the acronym changes when the inputs are denominators; the arithmetic does not.
CasesThe LCD name lives where fractions are combined — the common-denominator step of adding fractions is an LCM computation wearing its application name.
Do not confuseA separate technique. LCD and LCM are often learned as unrelated procedures — computing "the LCD of 14\frac{1}{4} and 16\frac{1}{6}" and "the LCM of 44 and 66" is the same twelve.
DownloadPNG2×PDF
Notation · Cheat sheet
Arithmetic Notation at a Glance
The marks from the notation cards across the arithmetic pages: how each is read and what it means. Every group links to the full card on its page.
Fractions
ab\frac{a}{b}
a over b
The vinculum: numerator over denominator, a division held in place.
a/ba/b
a slash b; a over b
The inline spelling for running text and code; same value, no grouping power.
a÷ba \div b
a divided by b
The obelus, the schoolroom division sign: a÷b=aba \div b = \frac{a}{b}.
Mixed numbers
2342\frac{3}{4}
two and three quarters
Adjacency means addition here, and only here: 2+342 + \frac{3}{4}.
3543\frac{5}{4} vs 4144\frac{1}{4}
non-standard form, and its correction
The fractional part must be proper; carry the extra whole.
−234-2\frac{3}{4}
negative two and three quarters
The minus grips the whole package: −(2+34)-(2 + \frac{3}{4}).
Divisibility
a∣ba \mid b
a divides b
A statement, true or false: b=a⋅kb = a \cdot k for some integer kk.
5∤125 \nmid 12
five does not divide twelve
The slashed bar denies: no integer kk gives 12=5k12 = 5k.
b mod a=0b \bmod a = 0
b mod a equals zero
The same fact as a computation: the remainder vanishes.
Factors
n=p1a1⋯pkakn = p_1^{a_1} \cdots p_k^{a_k}
n as a product of prime powers
Canonical factorisation: pp for primes, exponents count repeats.
d(n)d(n) · τ(n)\tau(n)
d of n; tau of n
The number of positive divisors of nn.
σ(n)\sigma(n)
sigma of n
The sum of the positive divisors: σ(12)=28\sigma(12) = 28.
GCD
gcd⁡(a,b)\gcd(a, b)
the g-c-d of a and b
Greatest common divisor, in function spelling.
HCF, GCF\text{HCF, GCF}
highest, or greatest, common factor
Other names for the gcd: HCF in British and Indian schools, GCF in American schools.
gcd⁡(a,b)=1\gcd(a, b) = 1
a and b are coprime
The equation is the notation; coprimality has no mark of its own.
LCMThis page
lcm⁡(a,b)\operatorname{lcm}(a, b)
the l-c-m of a and b
Least common multiple, the mirror twin of gcd⁡\gcd.
[a,b][a, b]
bracket a, b
Number theory’s shorthand for the lcm; (a,b)(a, b) is the gcd.
LCM vs LCD\text{LCM vs LCD}
least common multiple; least common denominator
The LCD of fractions is the LCM of their denominators.
Modulo
a mod na \bmod n
a mod n
The operator that computes a remainder: 17 mod 5=217 \bmod 5 = 2.
a % na \ \% \ n
a percent n
The remainder operator in code: C, Java, Python, JavaScript.
a≡b(modn)a \equiv b \pmod{n}
a is congruent to b modulo n
A statement: aa and bb leave the same remainder.
Integer part
⌊x⌋\lfloor x \rfloor
floor of x
The greatest integer at most xx: the integer part.
⌈x⌉\lceil x \rceil
ceiling of x
The least integer at least xx.
{x}\{x\}
fractional part of x
What the floor leaves: x−⌊x⌋x - \lfloor x \rfloor, in [0,1)[0, 1).
⌊x+12⌋\lfloor x + \tfrac{1}{2} \rfloor
x rounded to the nearest integer
Rounding built from the floor; ties go up: 2.5→32.5 \to 3.
Same marks, different job
a∣ba \mid bDivides, between integers; such that, inside set braces; absolute value when doubled.
(a,b)(a, b) vs [a,b][a, b]The gcd and the lcm in number-theory shorthand; a point or an interval elsewhere.
{x}\{x\}The fractional part here; a one-element set in set theory.
 mod \bmod vs (modn)\pmod{n}An operator that returns a number; a label on a congruence statement.
σ(n)\sigma(n)The divisor sum here; a standard deviation in statistics.
Arithmetic Notation at a Glance·/arithmeticLearn Math Class

Basic Properties

Several properties mirror those of the GCD, with directions reversed.

lcm(a,a)=a\text{lcm}(a, a) = a. The smallest multiple of aa that is also a multiple of aa is just aa itself.

lcm(a,1)=a\text{lcm}(a, 1) = a. Every positive integer is a multiple of 11, so aa already qualifies.

lcm(a,b)=lcm(b,a)\text{lcm}(a, b) = \text{lcm}(b, a). Order is irrelevant — the common multiples of aa and bb are the same as those of bb and aa.

lcm(a,b)≤a⋅b\text{lcm}(a, b) \leq a \cdot b, with equality when aa and bb are coprime. The product provides an upper bound; shared factors bring the LCM below it.

Both aa and bb divide lcm(a,b)\text{lcm}(a, b) by definition. And the LCM divides every other common multiple — it is the smallest, and all others are its multiples.
DownloadPNG2×PDF
Layout
PropertyStatementExample
Reflexivity & identity with 1lcm(a, a) = a and lcm(a, 1) = alcm(7, 7) = 7; lcm(15, 1) = 15
Commutativitylcm(a, b) = lcm(b, a)lcm(4, 6) = lcm(6, 4) = 12
Lower boundlcm(a, b) ≥ max(a, b)lcm(4, 6) = 12 ≥ 6
Upper boundlcm(a, b) ≤ a · b, with equality when gcd(a, b) = 1lcm(4, 6) = 12 ≤ 24; lcm(7, 9) = 63 = 7 · 9
Minimalityevery common multiple of a and b is also a multiple of lcm(a, b)common multiples of 4 and 6 are 12, 24, 36, … — all multiples of 12
Basic PropertiesLearn Math Class

Method 1: Listing Multiples

The most direct approach lists multiples of each number and identifies the first overlap.

Example
For lcm(6,8)\text{lcm}(6, 8):
Multiples of 66: 6,12,18,24,30,36,…6, 12, 18, 24, 30, 36, \ldots
Multiples of 88: 8,16,24,32,40,…8, 16, 24, 32, 40, \ldots
The first number appearing in both lists is 2424, so lcm(6,8)=24\text{lcm}(6, 8) = 24.
Number line scene (two tracks)0612182430×608162432×8lcm = 24lcm(6, 8) = 24multiples of 6:6, 12, 18, 24, 30, …multiples of 8:8, 16, 24, 32, …first coincidence at 24
The method is intuitive and works well for small inputs. It becomes tedious when the LCM is much larger than the inputs — for lcm(7,13)=91\text{lcm}(7, 13) = 91, listing multiples of 77 up to 9191 requires thirteen entries. The methods that follow avoid this exhaustive search.
÷1÷2÷3÷4÷5÷6÷7÷8÷9÷10÷11÷12✕0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
The ÷6 column: 6, 12, 18, 24, …

The highlighted column marks every number divisible by 6, which is the list of multiples of 6 the method starts from; the ÷8 column beside it marks 8, 16, 24, and the first row marked in both columns is 24, the least common multiple. Listing multiples is reading two columns until they agree. Compare any two divisor columns on the interactive divisibility table.

The method is transparent but slow; the next two replace the search with structure.

Method 2: Prime Factorization

The prime factorization approach mirrors the GCD method, but takes the maximum exponent for each prime instead of the minimum.

For lcm(12,18)\text{lcm}(12, 18):

12=22⋅3112 = 2^2 \cdot 3^1

18=21⋅3218 = 2^1 \cdot 3^2

Pitfall: Taking the smaller exponents
Choosing the smaller exponent of each prime, as for the GCD, gives 21⋅31=62^1 \cdot 3^1 = 6, which divides 1212 and 1818 but is a multiple of neither. The larger exponents give 22⋅32=362^2 \cdot 3^2 = 36.

Every prime appearing in either factorization must appear in the LCM — otherwise the LCM would not be divisible by both. Take the larger exponent for each: max⁡(2,1)=2\max(2, 1) = 2 for the prime 22, and max⁡(1,2)=2\max(1, 2) = 2 for the prime 33.

Method 2: Prime Factorization
lcm(12,18)=22⋅32=4⋅9=36\text{lcm}(12, 18) = 2^2 \cdot 3^2 = 4 \cdot 9 = 36
The example of this section, one step at a time. Press Next to carry out each step.
DownloadPNG2×PDF
lcm(12,18)\text{lcm}(12, 18)Step 1 of 3
Step
lcm(12,18)\text{lcm}(12, 18)
1
Write the prime factorization of each number
12=22⋅3112 = 2^2 \cdot 3^1 and 18=21⋅3218 = 2^1 \cdot 3^2
2
For each prime, take the larger exponent
max⁡(2,1)=2\max(2, 1) = 2 for 22; max⁡(1,2)=2\max(1, 2) = 2 for 33
3
Multiply the primes with those exponents
22⋅32=4⋅9=362^2 \cdot 3^2 = 4 \cdot 9 = 36
The LCM from prime factorizations·/arithmetic/divisibility/lcmLearn Math Class
Prime factorizations — lcm(12, 18) Prime factorizations — lcm(12, 18) 12 2² · 3 2 2 2 3 3 18 2 · 3² 2 2 3 3 3 LCM takes the maximum exponent of each prime: lcm(12, 18) = 22 · 32 = 36 lcm(12, 18) = 3612 = 2² · 318 = 2 · 3²Amber: full coverage at thelarger exponent per prime.Every prime appears at itsmax — nothing is missing.2² · 3² = 4 · 9 = 36
The contrast with the GCD is symmetric. The GCD takes the minimum exponent — the overlap. The LCM takes the maximum — the full coverage needed to accommodate both numbers.

Method 3: Using GCD

When the GCD is known or easy to compute — particularly through the Euclidean algorithm — the LCM follows from a single formula:

Method 3: Using GCD
lcm(a,b)=a⋅bgcd⁡(a,b)\text{lcm}(a, b) = \frac{a \cdot b}{\gcd(a, b)}

Fact: Two Maya calendars realign every 52 years
The Maya ran a 260260-day calendar alongside a 365365-day one. Since gcd⁡(260,365)=5\gcd(260, 365) = 5, the same pair of dates comes back after 260⋅3655=18,980\frac{260 \cdot 365}{5} = 18{,}980 days, which is 5252 years, not the 260260 years the plain product would give.

For lcm(12,18)\text{lcm}(12, 18): gcd⁡(12,18)=6\gcd(12, 18) = 6, so lcm=12⋅186=2166=36\text{lcm} = \frac{12 \cdot 18}{6} = \frac{216}{6} = 36.

For lcm(35,15)\text{lcm}(35, 15): gcd⁡(35,15)=5\gcd(35, 15) = 5, so lcm=35⋅155=5255=105\text{lcm} = \frac{35 \cdot 15}{5} = \frac{525}{5} = 105.

This is often the fastest route. The Euclidean algorithm finds the GCD efficiently even for large numbers, and a single division then delivers the LCM. No factorization or multiple-listing is needed.

A practical note: to avoid integer overflow in computation, divide before multiplying — compute agcd⁡(a,b)⋅b\frac{a}{\gcd(a,b)} \cdot b rather than a⋅bgcd⁡(a,b)\frac{a \cdot b}{\gcd(a,b)}.

The GCD–LCM Relationship

For any positive integers aa and bb:

The GCD–LCM Relationship
a⋅b=gcd⁡(a,b)⋅lcm(a,b)a \cdot b = \gcd(a, b) \cdot \text{lcm}(a, b)

The identity holds because the GCD and LCM partition the prime structure of a⋅ba \cdot b without overlap or omission.

Consider a prime pp appearing with exponent α\alpha in aa and β\beta in bb. Its exponent in a⋅ba \cdot b is α+β\alpha + \beta. Its exponent in the GCD is min⁡(α,β)\min(\alpha, \beta), and in the LCM is max⁡(α,β)\max(\alpha, \beta). Since min⁡(α,β)+max⁡(α,β)=α+β\min(\alpha, \beta) + \max(\alpha, \beta) = \alpha + \beta, the exponents in gcd⁡⋅lcm\gcd \cdot \text{lcm} match those in a⋅ba \cdot b.

This holds for every prime simultaneously, so the products are equal.
The exponent argument above for a single prime pp, as a chain of four facts.
DownloadPNG2×PDF
Provea⋅b=gcd⁡(a,b)⋅lcm(a,b)a \cdot b = \gcd(a, b) \cdot \text{lcm}(a, b)
1
in a⋅ba \cdot b: α+β\alpha + \beta
productA prime pp appears with exponent α\alpha in aa and β\beta in bb
2
in the GCD: min⁡(α,β)\min(\alpha, \beta)
GCDThe GCD takes the smaller exponent
3
in the LCM: max⁡(α,β)\max(\alpha, \beta)
LCMThe LCM takes the larger exponent
4
min⁡(α,β)+max⁡(α,β)=α+β\min(\alpha, \beta) + \max(\alpha, \beta) = \alpha + \beta
key stepSo the exponents in gcd⁡⋅lcm\gcd \cdot \text{lcm} match those in a⋅ba \cdot b
a⋅b=gcd⁡(a,b)⋅lcm(a,b)a \cdot b = \gcd(a, b) \cdot \text{lcm}(a, b)
This holds for every prime simultaneously, so the products are equal.
Proving the GCD–LCM relationshipLearn Math Class
The proof works one prime at a time, and the gold line is all it needs: the smaller and the larger of two exponents add up to their sum.
The relationship is useful in both directions. Knowing the GCD gives the LCM, and knowing the LCM gives the GCD — each determines the other when aa and bb are fixed.

For each prime the GCD keeps the smaller exponent and the LCM the larger, so together they rebuild a⋅ba \cdot b exactly.

When aa and bb Are Coprime

If gcd⁡(a,b)=1\gcd(a, b) = 1, the GCD–LCM formula simplifies to:

When aa and bb Are Coprime
lcm(a,b)=a⋅b\text{lcm}(a, b) = a \cdot b

Pitfall: Multiplying numbers that share a factor
Using the product for 1212 and 1818 gives 12⋅18=21612 \cdot 18 = 216, a common multiple but not the least, since gcd⁡(12,18)=6\gcd(12, 18) = 6. Dividing by the GCD gives lcm(12,18)=2166=36\text{lcm}(12, 18) = \frac{216}{6} = 36.

With no shared prime factors, nothing overlaps. Every prime in aa is absent from bb, and every prime in bb is absent from aa. The LCM must include all of them at full strength, which is exactly what the product provides.

lcm(7,9)=63\text{lcm}(7, 9) = 63. The numbers share no common factor (gcd⁡=1\gcd = 1), so the LCM equals their product.

lcm(8,15)=120\text{lcm}(8, 15) = 120. Again coprime, so 8×15=1208 \times 15 = 120.

This also works in reverse: if lcm(a,b)=a⋅b\text{lcm}(a, b) = a \cdot b, then aa and bb must be coprime. Any shared factor would pull the LCM below the product.
Number line scene (two tracks)071421283542495663×709182736455463×9lcm = 63lcm(7, 9) = 63multiples of 7:7, 14, 21, … 56, 63multiples of 9:9, 18, 27, … 54, 63no meeting before 7 · 9
Coprime numbers meet only at their product

The multiples of 7 and the multiples of 9 run side by side from 0 to 63. Because 7 and 9 share no factor except 1, no multiple of 7 below 63 is also a multiple of 9: the two tracks first line up at 63 = 7 · 9. For coprime numbers the LCM is the full product.

Shared factors make the tracks meet earlier: 6 and 9 already meet at 18, below 6 · 9 = 54.

When One Divides the Other

If a∣ba \mid b, then lcm(a,b)=b\text{lcm}(a, b) = b.

The larger number is already a multiple of the smaller. No number bigger than bb is needed — bb itself is divisible by both aa and bb.

lcm(4,12)=12\text{lcm}(4, 12) = 12, because 4∣124 \mid 12.

lcm(5,30)=30\text{lcm}(5, 30) = 30, because 5∣305 \mid 30.

lcm(a,a)=a\text{lcm}(a, a) = a, because every number divides itself.

This is the minimal case — the LCM equals the larger input. At the other extreme (coprime numbers), the LCM equals the full product. Every other case falls between these bounds: max⁡(a,b)≤lcm(a,b)≤a⋅b\max(a, b) \leq \text{lcm}(a, b) \leq a \cdot b.
DownloadPNG2×PDF
Layout
CaseConditionlcm(a, b) equals…Example
Minimal — one divides the othera ∣ bthe larger: lcm(a, b) = blcm(5, 30) = 30
Intermediate — share some factors1 < gcd(a, b) < min(a, b)(a · b) / gcd(a, b), strictly between max(a, b) and a · blcm(12, 18) = 36 (gcd = 6, product = 216)
Maximal — coprimegcd(a, b) = 1the full product: lcm(a, b) = a · blcm(7, 9) = 63 = 7 · 9
When One Divides the OtherLearn Math Class

LCM of More Than Two Numbers

Like the GCD, the LCM extends to more than two numbers by applying it pairwise:

LCM of More Than Two Numbers
lcm(a,b,c)=lcm(lcm(a,b),  c)\text{lcm}(a, b, c) = \text{lcm}(\text{lcm}(a, b), \; c)

Example
For lcm(4,6,9)\text{lcm}(4, 6, 9):
lcm(4,6)=12\text{lcm}(4, 6) = 12.
lcm(12,9)\text{lcm}(12, 9): factoring gives 12=22⋅312 = 2^2 \cdot 3 and 9=329 = 3^2. Maximum exponents: 22⋅32=362^2 \cdot 3^2 = 36.
So lcm(4,6,9)=36\text{lcm}(4, 6, 9) = 36.

Pitfall: Dividing the product of three by their GCD
Stretching the two-number formula to 4⋅6⋅9gcd⁡(4,6,9)=2161=216\frac{4 \cdot 6 \cdot 9}{\gcd(4, 6, 9)} = \frac{216}{1} = 216 gives a common multiple six times too large. Pairing the numbers step by step gives lcm(4,6,9)=36\text{lcm}(4, 6, 9) = 36.

Alternatively, factor all three numbers at once and take the maximum exponent for each prime across all factorizations. Here 4=224 = 2^2, 6=2⋅36 = 2 \cdot 3, 9=329 = 3^2. The primes present are 22 and 33, with maximums 222^2 and 323^2. The result is 3636 — the same answer by a more direct route.

RULE
The order of pairing does not matter. The LCM is associative and commutative.

Applications of LCM

Adding fractions with different denominators requires a common denominator, and the LCM of the denominators is the smallest one that works.

Example
To add 14+16\frac{1}{4} + \frac{1}{6}: lcm(4,6)=12\text{lcm}(4, 6) = 12, so 14=312\frac{1}{4} = \frac{3}{12} and 16=212\frac{1}{6} = \frac{2}{12}, giving 512\frac{5}{12}.

Scheduling problems are natural LCM applications. If Bus A arrives every 1212 minutes and Bus B every 1818 minutes, and both just arrived simultaneously, they next coincide in lcm(12,18)=36\text{lcm}(12, 18) = 36 minutes.
Number line scene (two tracks)0122436Bus A01836Bus Blcm = 36lcm(12, 18) = 36Bus A every 12 min,Bus B every 18 min.Both arrive togetherevery 36 minutes.
Fact: Two cicada broods meet every 221 years
Brood XIII of the periodical cicadas emerges every 1717 years and Brood XIX every 1313. The periods are coprime, so the two line up only every 13⋅17=22113 \cdot 17 = 221 years: in 2024 both came out in Illinois for the first time since 1803.

Cycle synchronization follows the same pattern. Two gears with 1212 and 1818 teeth respectively realign after 3636 teeth have passed the contact point. Two blinking lights with periods of 44 and 66 seconds flash together every 1212 seconds.

Nature runs such cycles too. Periodical cicadas spend most of their lives underground and then come out all at once as a brood, every 1313 years in some broods and every 1717 years in others. Where a 1313-year brood and a 1717-year brood live side by side, the two emerge in the same year only at common multiples of their periods.

In each case, the question is the same: when does the first simultaneous recurrence occur? The answer is always the LCM of the individual periods.

Worked Examples

Find lcm(8,14)\text{lcm}(8, 14) by listing multiples. Multiples of 88: 8,16,24,32,40,48,568, 16, 24, 32, 40, 48, 56. Multiples of 1414: 14,28,42,5614, 28, 42, 56. First common multiple: 5656. So lcm(8,14)=56\text{lcm}(8, 14) = 56.

Find lcm(24,90)\text{lcm}(24, 90) by prime factorization. 24=23⋅324 = 2^3 \cdot 3 and 90=2⋅32⋅590 = 2 \cdot 3^2 \cdot 5. Maximum exponents: 23⋅32⋅5=8⋅9⋅5=3602^3 \cdot 3^2 \cdot 5 = 8 \cdot 9 \cdot 5 = 360.

Find lcm(35,15)\text{lcm}(35, 15) using the GCD. gcd⁡(35,15)=5\gcd(35, 15) = 5. So lcm=35⋅155=105\text{lcm} = \frac{35 \cdot 15}{5} = 105.

Find the common denominator for 512+718\frac{5}{12} + \frac{7}{18}. lcm(12,18)=36\text{lcm}(12, 18) = 36. Convert: 512=1536\frac{5}{12} = \frac{15}{36} and 718=1436\frac{7}{18} = \frac{14}{36}. Sum: 2936\frac{29}{36}.

Verify: gcd⁡(8,14)⋅lcm(8,14)=2⋅56=112=8⋅14\gcd(8, 14) \cdot \text{lcm}(8, 14) = 2 \cdot 56 = 112 = 8 \cdot 14. The identity holds.

Find lcm(6,10,15)\text{lcm}(6, 10, 15). lcm(6,10)=30\text{lcm}(6, 10) = 30. lcm(30,15)=30\text{lcm}(30, 15) = 30 (since 15∣3015 \mid 30). So lcm(6,10,15)=30\text{lcm}(6, 10, 15) = 30.

Summary: Three Methods for LCM

Three distinct routes lead to the LCM, each preferable in different situations. Listing multiples is intuitive but slow as numbers grow; prime factorization is systematic when factor structures are accessible; the GCD formula is fastest when the Euclidean algorithm is at hand. The table below collects all three side by side — with the kind of inputs each handles best, the mechanics in one line, and a worked example.
DownloadPNG2×PDF
Layout
MethodBest forHow it worksWorked example
Listing multiplessmall inputs; quick intuition; classroom explanationwrite out the multiples of each number; the first number that appears in both lists is the LCMlcm(6, 8): 6, 12, 18, 24, … and 8, 16, 24, … → first match is 24
Prime factorizationfactorizations are easy to obtain or already knownfactor both numbers; for each prime, take the maximum exponent that appears in either factorizationlcm(12, 18): 12 = 2² · 3, 18 = 2 · 3² → 2² · 3² = 36
GCD formulalarger numbers; GCD already known or easily computed via the Euclidean algorithmapply lcm(a, b) = (a · b) / gcd(a, b); for safety, divide before multiplying: (a / gcd) · blcm(12, 18): gcd(12, 18) = 6 → (12 · 18) / 6 = 36
Summary: Three Methods for LCMLearn Math Class
DownloadPNG2×PDF
Before you read
Three ways to find an LCM
All three methods give the same least common multiple. The last one reuses the GCD.
Least common multiple3 methods
Listing multiples
Howlist multiples until the first common one
Prime factorization
Howtake each prime to its maximum exponent
GCD formulaabgcd⁡(a,b)\dfrac{ab}{\gcd(a,b)}
Howdivide the product by the GCD
Takeaway
Borrow the GCD
Once the GCD is known, the LCM follows in one step: lcm⁡(a,b)=ab/gcd⁡(a,b)\operatorname{lcm}(a, b) = ab / \gcd(a, b).
Three methods for the LCM·/arithmetic/divisibility/lcmLearn Math Class

Formula Summary

This summary lists the rules for the least common multiple that the page states, in nine rows. Each row gives the name of the rule with a line on why it holds and a link to its section, the formula, and what the formula gives.

The first rows bound the LCM between the larger number and the product, give the cases of a number with itself or with one and the order of the inputs, and state that the LCM divides every common multiple. The formula through the greatest common divisor and the identity behind it follow, then the two extreme cases, coprime numbers and one number dividing the other, and the rule for three or more numbers.
DownloadPNG2×PDF
RuleFormulaWhat it gives
BoundsA multiple of both numbers is at least the larger one, and the product is always a common multiple, as what LCM is explains.max⁡(a,b)≤lcm(a,b)≤a⋅b\max(a, b) \leq \text{lcm}(a, b) \leq a \cdot bthe range the LCM always falls in
Same number and oneIn both cases aa already qualifies as the smallest common multiple, from the basic properties.lcm(a,a)=a,lcm(a,1)=a\text{lcm}(a, a) = a, \quad \text{lcm}(a, 1) = athe LCM when nothing new has to be covered
OrderThe common multiples of aa and bb are those of bb and aa, one of the basic properties.lcm(a,b)=lcm(b,a)\text{lcm}(a, b) = \text{lcm}(b, a)the same answer in either order
Common multiplesBoth numbers divide the LCM by definition, and the LCM divides every other common multiple (basic properties).a∣lcm(a,b)a \mid \text{lcm}(a, b) and b∣lcm(a,b)b \mid \text{lcm}(a, b)every other common multiple is a multiple of the LCM
Using the GCDOften the fastest route; using the GCD divides before multiplying, agcd⁡(a,b)⋅b\frac{a}{\gcd(a,b)} \cdot b, to keep the numbers small.lcm(a,b)=a⋅bgcd⁡(a,b)\displaystyle \text{lcm}(a, b) = \frac{a \cdot b}{\gcd(a, b)}the LCM in a single division once the GCD is known
GCD–LCM relationshipFor each prime the GCD keeps the smaller exponent and the LCM the larger, as the GCD–LCM relationship proves.a⋅b=gcd⁡(a,b)⋅lcm(a,b)a \cdot b = \gcd(a, b) \cdot \text{lcm}(a, b)either quantity from the other
Coprime numbersIt also works the other way: an LCM equal to the product means the numbers are coprime, as the coprime case shows.lcm(a,b)=a⋅b\text{lcm}(a, b) = a \cdot b when gcd⁡(a,b)=1\gcd(a, b) = 1the full product, since no prime is shared
One divides the otherThe smallest possible LCM, from when one divides the other.if a∣ba \mid b, then lcm(a,b)=b\text{lcm}(a, b) = bthe larger number itself
More than two numbersThe order of pairing does not matter; see LCM of more than two numbers.lcm(a,b,c)=lcm(lcm(a,b),  c)\text{lcm}(a, b, c) = \text{lcm}(\text{lcm}(a, b), \; c)the LCM of any list, pair by pair
LCM rulesLearn Math Class
The bounds give a quick check on any answer: an LCM below the larger number or above the product is wrong. For a computation, the formula through the GCD is usually the shortest path, with the Euclidean algorithm supplying the GCD.

Common Pitfalls

Three mistakes account for many of the wrong LCM answers. Each is marked where it happens in the sections above; here each is worked through in full, with the wrong and the right working side by side.
DownloadPNG2×PDF
1Taking the smaller exponents
The prime factorization methods for the GCD and the LCM use the same factorizations and differ in one choice. That choice is swapped: for each prime the smaller exponent is taken, as for the GCD, instead of the larger one.
Start
12=22⋅312 = 2^2 \cdot 3 and 18=2⋅3218 = 2 \cdot 3^2.
Wrong turn
Error here
The smaller exponents are 11 for the prime 22 and 11 for the prime 33, so lcm(12,18)=21⋅31=6\text{lcm}(12, 18) = 2^1 \cdot 3^1 = 6.
Right path
The larger exponents are max⁡(2,1)=2\max(2, 1) = 2 and max⁡(1,2)=2\max(1, 2) = 2, so lcm(12,18)=22⋅32=36\text{lcm}(12, 18) = 2^2 \cdot 3^2 = 36. The wrong answer 66 is in fact gcd⁡(12,18)\gcd(12, 18).
Why it happensThe two methods are usually learned together, and min and max are easy to swap when nothing else in the working changes.
How to checkThe LCM is never smaller than the larger number. Since 6<186 < 18, it cannot be lcm(12,18)\text{lcm}(12, 18), while 36÷12=336 \div 12 = 3 and 36÷18=236 \div 18 = 2 are both whole.
2Multiplying numbers that share a factor
The coprime shortcut lcm(a,b)=a⋅b\text{lcm}(a, b) = a \cdot b is used for every pair, including pairs that have a common factor.
Wrong turn
Error here
lcm(12,18)=12⋅18=216\text{lcm}(12, 18) = 12 \cdot 18 = 216.
Right path
gcd⁡(12,18)=6\gcd(12, 18) = 6, so lcm(12,18)=12⋅186=2166=36\text{lcm}(12, 18) = \frac{12 \cdot 18}{6} = \frac{216}{6} = 36. The product equals the LCM only when the GCD is 11, as for 77 and 99, where lcm(7,9)=63\text{lcm}(7, 9) = 63.
Why it happensThe product is always a common multiple, so it passes the check that both numbers divide it, and for coprime pairs it is the right answer. The shortcut works often enough to seem like a rule.
How to checkFind the GCD first. If it is larger than 11, the LCM is below the product. Here 216÷6=36216 \div 6 = 36, and 3636 is already divisible by both 1212 and 1818.
3Dividing the product of three by their GCD
The formula lcm(a,b)=a⋅bgcd⁡(a,b)\text{lcm}(a, b) = \frac{a \cdot b}{\gcd(a, b)} is stretched to three numbers by dividing their product by the GCD of all three.
Wrong turn
Error here
lcm(4,6,9)=4⋅6⋅9gcd⁡(4,6,9)=2161=216\text{lcm}(4, 6, 9) = \frac{4 \cdot 6 \cdot 9}{\gcd(4, 6, 9)} = \frac{216}{1} = 216.
Right path
Pair the numbers. lcm(4,6)=12\text{lcm}(4, 6) = 12, and then lcm(12,9)=36\text{lcm}(12, 9) = 36. So lcm(4,6,9)=36\text{lcm}(4, 6, 9) = 36, the same result as the maximum exponents 22⋅322^2 \cdot 3^2.
Why it happensThe identity a⋅b=gcd⁡(a,b)⋅lcm(a,b)a \cdot b = \gcd(a, b) \cdot \text{lcm}(a, b) looks as if it should extend to more numbers, but it does not. Here 44 and 66 share the factor 22, and 66 and 99 share the factor 33, yet no factor greater than 11 is shared by all three, so dividing by gcd⁡(4,6,9)=1\gcd(4, 6, 9) = 1 removes nothing.
How to checkTest a smaller candidate. 216÷6=36216 \div 6 = 36, and 3636 is divisible by 44, 66 and 99, so 216216 is not the least. For 66, 1010 and 1515 the wrong formula gives 900900, while lcm(6,10,15)=30\text{lcm}(6, 10, 15) = 30.
Common pitfalls with the LCM·/arithmetic/divisibility/lcmLearn Math Class
All three slips miss what the LCM must be: the smallest common multiple. It takes the larger exponent of each prime, it equals the product only when the GCD is 11, and for three numbers it is found a pair at a time, since abcgcd⁡(a,b,c)\frac{abc}{\gcd(a, b, c)} does not give it. Checking that the answer is at least the larger number, and testing a smaller candidate such as the product divided by the GCD, catches each slip.

Skills You Should Learn

Each skill opens its step-by-step method page. Skills marked "On this page" are taught above.
Taught on this page
  • Find the least common multipleFind the smallest number that two or more numbers divide: take every prime with its larger exponent, or use lcm⁡(a,b)=a⋅bgcd⁡(a,b)\operatorname{lcm}(a, b) = \frac{a \cdot b}{\gcd(a, b)}.On this page ↑
More arithmetic methods
  • Find the GCD by prime factorizationFactor both numbers into primes and keep the shared primes with the smaller exponent: gcd⁡(72,120)=23⋅3=24\gcd(72, 120) = 2^3 \cdot 3 = 24.
  • Add and subtract fractionsRewrite the fractions over the least common denominator, add or subtract the numerators, keep the denominator, and simplify.

LCM FAQ

How is LCM used for adding fractions?

+
The LCM of the denominators is the least common denominator (LCD). For 1/4 + 1/6: lcm(4, 6) = 12, so convert to 3/12 + 2/12 = 5/12. Any common denominator works — 24 would too — but the LCD keeps the numbers as small as possible and the final fraction closer to lowest terms.Read more →

How is LCM used in scheduling problems?

+
The LCM tells you when repeating events line up. If one bus comes every 12 minutes and another every 18, they arrive together every lcm(12, 18) = 36 minutes. The same reasoning schedules blinking lights, gear rotations, and recurring meetings: any cycle lengths coincide at the LCM of their periods. Try any pair in the LCM calculator.Read more →

Is the LCM always bigger than both numbers?

+
The LCM is never smaller than either number, but it need not exceed both: max(a, b) ≤ lcm(a, b) ≤ a × b. When one number divides the other, the LCM simply equals the larger one — lcm(4, 12) = 12. The other extreme occurs for coprime numbers, where the LCM is the full product: lcm(7, 9) = 63.Read more →

Does the GCD–LCM formula work for three numbers?

+
No. For two numbers lcm(a,b)=abgcd⁡(a,b)\text{lcm}(a, b) = \frac{ab}{\gcd(a, b)}, but dividing the product of three numbers by the GCD of all three overshoots. For 44, 66 and 99 it gives 2161=216\frac{216}{1} = 216, while lcm(4,6,9)=36\text{lcm}(4, 6, 9) = 36: 44 and 66 share a 22 and 66 and 99 share a 33, yet no factor is common to all three, so the division removes nothing. Pair the numbers instead: lcm(lcm(4,6),9)=lcm(12,9)=36\text{lcm}(\text{lcm}(4, 6), 9) = \text{lcm}(12, 9) = 36.Read more →

How often do 13-year and 17-year cicadas emerge together?

+
Every 221221 years. A brood that emerges every 1313 years and one that emerges every 1717 years come out in the same year only at common multiples of their periods, and since 1313 and 1717 are coprime, the least of these is the full product 13⋅17=22113 \cdot 17 = 221. Broods XIII and XIX did exactly that in Illinois in 2024, for the first time since 1803.Read more →

Why divide before multiplying when computing the LCM in code?

+
To keep the intermediate number small. The product a⋅ba \cdot b can exceed the largest value a fixed-size integer type holds even when the LCM itself fits, and the overflow corrupts the result. Computing agcd⁡(a,b)⋅b\frac{a}{\gcd(a, b)} \cdot b divides first; since gcd⁡(a,b)\gcd(a, b) divides aa exactly, nothing is lost, the answer is the same, and no step produces a number larger than the LCM.Read more →