LCM Pro
Least Common Multiple · Step-by-step
Enter values 0 / 12

Separate with commas, spaces or new lines. Ctrl+Enter to calculate

LCM Guide

Complete reference to the Least Common Multiple

Guide LCM Calculator — Complete Guide

The Least Common Multiple (LCM) is a foundational concept in mathematics used everywhere from adding fractions to scheduling algorithms. This guide covers everything you need to know: what LCM is, how to find it, the formulas, real-world applications, visual charts, and answers to frequently asked questions.

What is the Least Common Multiple (LCM)?

The Least Common Multiple (LCM) of two or more integers is the smallest positive integer that is evenly divisible by each of them. In other words, it is the lowest number that all the given numbers can divide into without leaving a remainder.

For example, the LCM of 4 and 6 is 12, because:

Multiples Timeline — LCM(4, 6) = 12

Visualization of the first 30 multiples of 4 and 6. The first common multiple is 12, so LCM(4, 6) = 12.

● Multiples of 4 ● Multiples of 6 ● LCM = 12 12 ✓
Key point: The LCM is always greater than or equal to the largest number in the set. It is never smaller than any of the given numbers.

Other Names for LCM Worldwide

Depending on your region or textbook, the LCM may be called:

Language Name Abbreviation Example
🇬🇧 EnglishLeast Common MultipleLCMLCM(4, 6) = 12
🇩🇪 GermanKleinstes gemeinsames VielfacheskgVkgV(4, 6) = 12
🇪🇸 SpanishMínimo Común MúltiploMCMMCM(4, 6) = 12
🇫🇷 FrenchPlus Petit Commun MultiplePPCMPPCM(4, 6) = 12
🇮🇹 ItalianMinimo Comune Multiplomcmmcm(4, 6) = 12
🇵🇹 PortugueseMínimo Múltiplo ComumMMCMMC(4, 6) = 12
🇷🇺 RussianНаименьшее общее кратноеНОКНОК(4, 6) = 12
🇨🇳 (for reference)最小公倍数LCMLCM(4, 6) = 12
🇯🇵 Japanese最小公倍数LCMLCM(4, 6) = 12
🇮🇳 Hindiलघुत्तम समापवर्त्यLCMLCM(4, 6) = 12
🇸🇦 Arabicالمضاعف المشترك الأصغرLCMLCM(4, 6) = 12
🇵🇰 Urduسب سے چھوٹا مشترکہ ضربLCMLCM(4, 6) = 12

LCM Formula

There are several equivalent ways to write the LCM formula. The most common one links LCM to GCD (Greatest Common Divisor):

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

This works because of the fundamental identity:

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

LCM of Fractions

For fractions, the formula is different:

LCM(a₁/b₁, a₂/b₂, …) = LCM(numerators) ÷ GCD(denominators)

LCM of Three or More Numbers

For more than two numbers, LCM is associative — you can fold the list pairwise:

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

Prime Factorization Formula

If each number is broken into prime factors, the LCM is the product of the highest power of every prime appearing in any number:

LCM = p₁max(e₁) × p₂max(e₂) × … × pₙmax(eₙ)

Formula Comparison Table

Method Formula Best For Complexity
GCD Method LCM(a, b) = a × b ÷ GCD(a, b) Two large numbers O(log min(a,b))
Prime Factorization LCM = ∏ pmax e Three or more numbers O(√n)
Listing Multiples First common multiple Small numbers (< 20) O(LCM)
Fractions LCM(nums) ÷ GCD(dens) Rational numbers O(√n)

How to Find the LCM — 3 Methods

You can calculate the LCM using any of these three standard methods. Our calculator uses prime factorization internally for the most reliable results.

1

Listing Multiples

List the multiples of each number and find the smallest one they share. Best for small numbers.

2

Prime Factorization

Break each number into primes, take the highest power of every prime, and multiply.

3

GCD Method

Use LCM(a, b) = a × b ÷ GCD(a, b). Fastest for large numbers.

Method 1: Listing Multiples

Example: Find LCM(6, 8).

Number Multiples First Common
6 6, 12, 18, 24, 30, … 24
8 8, 16, 24, 32, …

Method 2: Prime Factorization

Example: Find LCM(12, 18).

Factor Trees — 12 and 18

Prime factorization of 12 and 18 broken down into their prime factors.

12 2 6 2 3 12 = 2² × 3 18 2 9 3 3 18 = 2 × 3²
Composite / number Prime factor
Number Prime Factorization 2 3 Highest
122² × 3
182 × 3²
LCM2² × 3²4 × 9 = 36

Method 3: GCD Method

Example: Find LCM(24, 36).

LCM vs HCF (GCD) — What's the Difference?

LCM and HCF (also called GCD) are complementary concepts. Understanding both is essential for number theory and fraction work.

Venn Diagram — LCM and GCD

For two numbers a and b, the LCM is the union of all prime factors (with highest powers) and the GCD is the intersection (with lowest powers).

a = 12 b = 18 a-only factor 2 × 3 GCD = 6 b-only factor LCM = 2² × 3 × 3 = 36 LCM = a × b ÷ GCD = 12 × 18 ÷ 6
Aspect LCM — Least Common Multiple HCF / GCD — Highest Common Factor
DefinitionSmallest number divisible by all given numbersLargest number that divides all given numbers
RelationshipLCM(a, b) × HCF(a, b) = a × b
SizeAlways ≥ largest number in the setAlways ≤ smallest number in the set
Primary useAdding/subtracting fractions, schedulingSimplifying fractions, grouping
ExampleLCM(12, 18) = 36HCF(12, 18) = 6
Verification12 × 18 = 216 = 36 × 6 ✓

Visual Charts & Diagrams

Visualizations help understand how LCM grows with input size and how different pairs compare.

LCM Growth Chart — Common Number Pairs

Bar chart comparing the LCM of frequently asked number pairs. Notice how LCM(a, b) = a × b when a and b are coprime.

LCM vs Product — Coprime vs Non-Coprime

When two numbers are coprime (GCD = 1), LCM equals their product. Otherwise, LCM is smaller than the product.

Pair (a, b) GCD a × b LCM Coprime?
(7, 11)17777✓ Yes
(5, 9)14545✓ Yes
(8, 9)17272✓ Yes
(12, 18)621636✗ No
(24, 36)1286472✗ No
(15, 20)530060✗ No

Fraction Visualization — LCD(1/4, 1/6)

To add 1/4 + 1/6, we find the LCD = LCM(4, 6) = 12, then rewrite both fractions with denominator 12.

1/4 = × 3 = 3/12 1/6 = × 2 = 2/12 1/4 + 1/6 = 3/12 + 2/12 = 5/12

Key Properties of LCM

These properties help you simplify calculations and verify results.

Property Formula Example
CommutativeLCM(a, b) = LCM(b, a)LCM(4, 6) = LCM(6, 4) = 12
AssociativeLCM(a, LCM(b, c)) = LCM(LCM(a, b), c)LCM(2, LCM(3, 4)) = 12
IdentityLCM(a, 1) = aLCM(7, 1) = 7
IdempotentLCM(a, a) = aLCM(5, 5) = 5
Divisibilitya | b ⟹ LCM(a, b) = b3 | 9 ⟹ LCM(3, 9) = 9
Coprime caseGCD(a, b) = 1 ⟹ LCM(a, b) = a × bLCM(7, 11) = 77
Boundmax(a, b) ≤ LCM(a, b) ≤ a × b6 ≤ LCM(6, 8) = 24 ≤ 48
DistributiveLCM(a, GCD(b, c)) = GCD(LCM(a,b), LCM(a,c))LCM(6, GCD(8,12)) = 6
Quick check: If your LCM is smaller than any of the input numbers, something is wrong. The LCM must be at least the largest number.

LCM Chart — Common Pairs at a Glance

A quick reference for frequently asked LCM values. Useful for homework, exams, and cross-checking calculations.

LCM(2, 3)6
LCM(3, 4)12
LCM(4, 6)12
LCM(5, 7)35
LCM(6, 8)24
LCM(6, 9)18
LCM(8, 12)24
LCM(9, 12)36
LCM(10, 15)30
LCM(12, 18)36
LCM(14, 21)42
LCM(15, 20)60
LCM(16, 24)48
LCM(18, 24)72
LCM(20, 30)60
LCM(24, 36)72
LCM(25, 30)150
LCM(30, 45)90

LCM Table — Numbers 1 to 12

A 12×12 multiplication-style table of LCM values. Read as LCM(row, column).

·123456789101112
1123456789101112
2226410614818102212
33631215621249303312
444124201228836204412
55101520530354045105560
666612306422418306612
77142128354275663707784
888248402456872408824
9918936451863729909936
101010302010307040901011060
1111223344556677889911011132
121212121260128424366013212

Real-World Applications of LCM

The LCM isn't just a classroom concept — it appears in many practical situations where repeating events need to align.

Field Problem LCM Role Example
MathematicsAdding fractionsFind common denominator1/4 + 1/6 → 12
SchedulingRepeating eventsWhen events alignBuses: 12 & 18 min → 36
MechanicsGear rotationRe-alignment point24 & 36 teeth → 72 turns
CommercePackage sizesEqual quantitiesPens 12-pack, pads 18-pack → 36
MusicRhythm patternPattern re-sync4/4 & 3/4 → 12 beats
Computer ScienceHash table sizeCycle detectionHash collisions
FinancePayment cyclesMatching schedulesWeekly & monthly billing

Adding and Subtracting Fractions

To add fractions with different denominators, find the LCD (Least Common Denominator), which is the LCM of the denominators.

Example: 1/4 + 1/6. LCM(4, 6) = 12, so rewrite as 3/12 + 2/12 = 5/12.

Scheduling and Repeating Events

If two events occur at different intervals, the LCM tells you when they'll happen together again.

Example: A bus leaves every 12 minutes and another every 18 minutes. They'll next depart together after LCM(12, 18) = 36 minutes.

Gear and Wheel Rotation

Two gears with 24 and 36 teeth will return to their starting alignment after LCM(24, 36) = 72 revolutions.

Purchase and Packaging Problems

If pens come in packs of 12 and notebooks in packs of 18, you need LCM(12, 18) = 36 of each to have equal counts of both.

Music and Rhythm

Drummers use LCM to find when two different rhythmic patterns will align perfectly again.

Computer Science

In hashing, task scheduling, and rate limiters, LCM is used to detect cycles and align periodic processes.

Deep Dive In-Depth Articles

Longer explorations of LCM concepts, history, and advanced applications.

8 min read LCM Guide Team Mathematics

The Historical Origins of LCM

The concept of the Least Common Multiple dates back to ancient civilizations. Babylonian mathematicians were already solving problems equivalent to finding common multiples over 4,000 years ago, using their base-60 sexagesimal number system. Egyptian scribes used LCM-like reasoning when working with fractions in the Rhind Mathematical Papyrus (c. 1650 BCE), where they needed to find common denominators to combine unit fractions.

The Greek mathematician Euclid (c. 300 BCE) described an algorithm in his Elements that is still used today — the Euclidean algorithm for finding the Greatest Common Divisor. Because of the identity LCM(a, b) = a × b ÷ GCD(a, b), Euclid's algorithm indirectly gives us a fast way to compute LCMs, and his book also contains the earliest known proof that every integer has a unique prime factorization.

In India, mathematicians like Aryabhata (5th century CE) and Brahmagupta (7th century CE) developed systematic methods for working with multiples and divisors. The classical Indian kuttaka method for solving linear Diophantine equations relied on reasoning that is closely related to LCM computations. Chinese mathematicians in the Nine Chapters on the Mathematical Art (c. 200 CE) also worked with LCM-equivalent concepts for reducing fractions to common denominators.

Today, LCM is a fundamental tool in number theory, cryptography, computer algorithms, and engineering. Every time you add fractions, synchronize processes, or detect a cycle, you're using a concept that has been refined over four millennia.

Why LCM Matters in Modern Computing

In computer science, LCM plays a surprisingly central role. Distributed systems use LCM to synchronize clocks, determine how often periodic tasks coincide, and calculate when two independent event streams will "meet" again. For example, in a system where two processes check for data every 6 and 8 milliseconds respectively, they will both fire together every LCM(6, 8) = 24 milliseconds — which determines the worst-case latency of the combined system.

Hash tables use LCM when resizing. If the table grows to a size divisible by many small numbers, collisions between keys with different hashing patterns occur at LCM-determined intervals. That's why many hash table sizes are chosen as prime numbers or powers of two — to avoid predictable LCM patterns that could cause clustering.

In cryptography, LCM appears in RSA key generation and in the Chinese Remainder Theorem, which reconstructs an integer from its remainders modulo pairwise coprime numbers. The CRT is used in secure multi-party computation, error-correcting codes, and efficient modular exponentiation.

Common Misconceptions About LCM

Many students make the same handful of mistakes when learning LCM. Here are the most common, along with why they're wrong:

Advanced: LCM in Abstract Algebra

In ring theory, the LCM of two elements of an integral domain is defined as a generator of the intersection of the principal ideals generated by each element. In a Principal Ideal Domain (PID), LCM and GCD always exist and satisfy the same identity LCM(a, b) × GCD(a, b) = a × b (up to units). This generalization is used in polynomial rings, algebraic number theory, and cryptography based on lattices.

In the integers, LCM corresponds to the "join" operation in the lattice of divisibility, and GCD corresponds to the "meet." Together they form a distributive lattice, which is why the identity LCM(a, GCD(b, c)) = GCD(LCM(a, b), LCM(a, c)) holds.

Worked Examples

Three fully solved examples covering different scenarios.

Example 1: LCM of two numbers

Find LCM(15, 20).

StepActionResult
1Prime factorize15 = 3 × 5; 20 = 2² × 5
2Take highest powers2², 3¹, 5¹
3Multiply4 × 3 × 5 = 60
Verify60 ÷ 15 = 4 ✓; 60 ÷ 20 = 3 ✓

Example 2: LCM of three numbers

Find LCM(8, 12, 18).

NumberPrime FactorizationHighest Power
8
122² × 32², 3¹
182 × 3²2¹, 3²
LCM2³ × 3² = 722³, 3²

Example 3: LCM of fractions

Find LCM(1/2, 3/4, 5/6).

StepActionResult
1LCM of numeratorsLCM(1, 3, 5) = 15
2GCD of denominatorsGCD(2, 4, 6) = 2
3Result15/2 = 7.5 or 7½

Common Mistakes to Avoid

Even experienced students make these errors. Watch out for them.

❌ MistakeWhy it's wrong✅ Correct approach
Confusing LCM with GCDLCM is the smallest common multiple (bigger), GCD is the largest common divisor (smaller)Remember: LCM ≥ max(a, b); GCD ≤ min(a, b)
Forgetting the highest powerUsing the lowest exponent gives GCD, not LCMAlways pick the maximum exponent per prime
Missing prime factorsEvery distinct prime from any number must appearBuild the union of all prime factors with max exponents
Assuming LCM = a × b alwaysOnly true when GCD(a, b) = 1 (coprime)Use LCM(a, b) = a × b ÷ GCD(a, b)
Forgetting the zero caseEvery multiple of 0 is 0, so no smallest existsReject 0 as input; LCM is undefined with 0
Not simplifying fractions firstUnsorted fractions can give wrong resultsReduce each fraction before applying the LCM formula
Pro tip: Always verify your LCM by dividing it by each original number. If any division leaves a remainder, you made a mistake.

Frequently Asked Questions

Quick answers to the most common LCM questions.

What is the LCM of two numbers?

The LCM of two numbers is the smallest positive integer that both numbers can divide evenly. For example, LCM(6, 8) = 24 because 24 is the smallest number divisible by both 6 and 8.

How do I find the LCM of three numbers?

You can find it in one of two ways: (1) prime factorize each number, take the highest power of every prime, and multiply; or (2) find LCM of the first two numbers, then find LCM of that result with the third. Both give the same answer.

What is the difference between LCM and LCD?

LCD (Least Common Denominator) is just the LCM applied to the denominators of fractions. The math is identical — the name only changes because of context. LCM(4, 6) = 12 and LCD(1/4, 1/6) = 12.

Is LCM always greater than the numbers?

The LCM is always greater than or equal to the largest number in the set. It can never be smaller than any input number. If the two numbers are equal, LCM(a, a) = a.

Can LCM be a negative number?

No. LCM is only defined for positive integers (and positive rationals) and is always positive. Some textbooks extend it to negative integers by taking the absolute value, but the result is always positive.

What is the LCM of 0 and any number?

LCM involving 0 is undefined in standard arithmetic, because every multiple of 0 is 0, and there is no "smallest" positive multiple. Our calculator rejects inputs containing 0.

How is LCM used in real life?

LCM is used for adding fractions, scheduling repeating events (buses, alarms), aligning gear rotations, planning purchases with different package sizes, music rhythm patterns, and many computer science algorithms like rate limiting and hash table sizing.

What is the relationship between LCM and GCD?

For any two positive integers a and b: LCM(a, b) × GCD(a, b) = a × b. This identity lets you calculate one if you know the other — it's the basis of the GCD method for finding LCM.

Can I find LCM of decimals?

Yes. Convert each decimal to a fraction first (0.5 → 1/2, 1.25 → 5/4), then apply the LCM formula for fractions. Our calculator does this automatically in Decimal mode.

What is the LCM of two prime numbers?

If both numbers are prime and different, their LCM is simply their product. For example, LCM(7, 11) = 77. If they're the same prime, LCM(p, p) = p.

Mathematical Glossary

Key terms you'll encounter while working with LCM.

LCM
Least Common Multiple — the smallest positive integer divisible by every number in a set.
GCD
Greatest Common Divisor — the largest positive integer that divides every number in a set evenly. Also called HCF.
Multiple
The product of a number and any integer. Multiples of 3 are 3, 6, 9, 12, …
Factor
A number that divides another number without leaving a remainder.
Prime
A number greater than 1 with exactly two factors: 1 and itself.
Composite
A number greater than 1 that is not prime.
Coprime
Two numbers whose GCD is 1.
Prime Factorization
Breaking a number into the product of its prime factors.
LCD
Least Common Denominator — the LCM of denominators, used to add or subtract fractions.
BigInt
A data type that can hold integers of arbitrary size — used for exact arithmetic without rounding.