Number Theory • Core Flagship Pillar

LCM Calculator

Calculate the Least Common Multiple (LCM) and Greatest Common Factor (GCF) of two, three, or more positive integers with step-by-step prime factorization breakdowns and interactive Venn diagram visualizers.

|
Last Updated: September 2026
|
Fundamental Arithmetic Theorem Verified
Quick-Select LCM Integer Pairs & Triples Standard Benchmarks

Integer Inputs

Prime Factor Decompositions
Prime Factor Overlap Venn Diagram
Least Common Multiple (LCM)
36
Smallest shared positive multiple
Greatest Common Factor (GCF)
6
Largest shared integer divisor
Product of Numbers
216
12 × 18 = 216
LCM × GCF Identity
36 × 6 = 216
LCM(a,b) · GCF(a,b) = a · b
LCM

Step-by-Step Prime Factor & Division Solution Proof

Direct Answer & Overview
Verified Educational Guide

How to Find the Least Common Multiple (LCM)

To find the LCM: 1. Prime factorize each integer. 2. Take each prime factor with its highest exponent. 3. Multiply these prime powers together: LCM = ∏ pᵢ^max(eᵢ). Alternatively, for two numbers a and b, compute: LCM(a, b) = |a × b| / GCF(a, b).

Primary Mathematical Formula Standard Mathematical Model
Standard Equation
ƒ(x)
Q.E.D.
LCM(a,b)=∣a⋅b∣GCF(a,b),LCM(a,b)×GCF(a,b)=a⋅b\text{LCM}(a, b) = \frac{|a \cdot b|}{\text{GCF}(a, b)}, \quad \text{LCM}(a, b) \times \text{GCF}(a, b) = a \cdot b
Evaluated with exact mathematical formulation • Rigorously verified
Exact Formula
Input Parameters
Required
1
Two, three, or more positive integers (comma or space separated)
2
Calculation method: Prime factorization, GCF formula, or Ladder method
Expected Outputs
Calculated
Least Common Multiple (LCM), Greatest Common Factor (GCF), Product
Prime factor expansions and interactive Venn diagram factor overlap canvas
Worked Numerical Example
Instant Verification
Find the LCM of 12 and 18
→ 12 = 2² × 3; 18 = 2 × 3²; LCM = 2² × 3² = 4 × 9 = 36; GCF = 2 × 3 = 6
LCM(12, 18) = 36 | GCF(12, 18) = 6 | Product = 216

Least Common Multiple Definition & Core Concept

The Least Common Multiple (LCM) represents the smallest non-zero positive integer that is an exact multiple of each number in a given set:

Multiples of 12
12, 24, 36, 48, 60, 72, ...

Generated by multiplying 12 by 1, 2, 3, 4, 5, 6...

Multiples of 18
18, 36, 54, 72, 90, ...

Common multiples are 36, 72... the smallest is LCM = 36.

The 4 Methods to Calculate LCM

Method Procedure Best Used For
Prime FactorizationMultiply highest prime powers: ∏ pᵢ^max(eᵢ)Standard algebraic homework & proofs
GCF FormulaLCM = (a × b) / GCF(a, b)Fast calculation when GCF is known
Ladder / DivisionDivide numbers simultaneously by common primesMultiple numbers (3+ inputs)
Listing MultiplesList multiples until the first match appearsSmall single-digit mental math

The Fundamental LCM-GCF Product Theorem

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

Every prime factor of a and b is counted in either the GCF (minimum powers) or the LCM (maximum powers). Since min(x, y) + max(x, y) = x + y, their product reconstructs the exact original product a · b.

Real-World Applications of LCM

Adding Unlike Fractions

Finding the Least Common Denominator (LCD) of 1/6 + 1/8 requires computing LCM(6, 8) = 24 to scale numerators cleanly.

Periodic Event Synchronization

If bus A arrives every 15 minutes and bus B every 20 minutes, they synchronize at the station every LCM(15, 20) = 60 minutes.

Mechanical Gear Alignment

Two meshed gears with 12 and 18 teeth will return to their exact starting tooth alignment after LCM(12, 18) = 36 tooth passes.

Step-by-Step Worked Numerical Solutions

Example 1: LCM of Three Numbers 8, 12, 20

Problem: Find the Least Common Multiple of 8, 12, and 20.

1. Prime factorize 8 = 2³.
2. Prime factorize 12 = 2² × 3.
3. Prime factorize 20 = 2² × 5.
4. Collect max prime exponents: 2³ (from 8), 3¹ (from 12), 5¹ (from 20).
5. Multiply: 2³ × 3¹ × 5¹ = 8 × 3 × 5 = 120.
Result: LCM(8, 12, 20) = 120

Common Pitfalls & Mistakes

Confusing LCM with GCF

LCM is always greater than or equal to the largest number in the set; GCF is always less than or equal to the smallest number.

Assuming LCM(a,b,c) = a·b·c / GCF

The formula LCM · GCF = Product ONLY holds for pairs (two numbers). For 3+ numbers, use prime factorization.

Taking Minimum Powers Instead of Maximum

Taking the minimum prime powers calculates the GCF, not the LCM.

Fact-Checked & Verified • Computational Accuracy Standards
Updated August 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is the Least Common Multiple (LCM)?
The Least Common Multiple (LCM) of two or more non-zero integers is the smallest positive integer that is divisible by all the given numbers without leaving a remainder. For example, the LCM of 4 and 6 is 12.
How do you find the LCM using prime factorization?
1. Decompose each number into its prime factor representation. 2. Identify every unique prime number that appears across all factorizations. 3. For each prime, take the HIGHEST exponent found among the numbers. 4. Multiply these highest prime powers together to obtain the LCM.
What is the mathematical relationship between LCM and GCF?
For any two positive integers a and b, the product of their Least Common Multiple and Greatest Common Factor equals the product of the two numbers: LCM(a, b) × GCF(a, b) = a × b. Therefore, LCM(a, b) = (a × b) / GCF(a, b).
How do you calculate the LCM of three or more numbers?
Find the LCM sequentially: compute LCM(a, b), then compute LCM(LCM(a, b), c), and continue. Alternatively, use prime factorization: take the maximum exponent for each prime factor present across all numbers and multiply them.
What is the LCM of two coprime numbers?
Two numbers are coprime if their Greatest Common Factor is 1 (GCF = 1). In this case, their LCM is simply their direct product: LCM(a, b) = a × b (e.g. LCM of 7 and 9 is 63).
Why is LCM important when adding or subtracting fractions?
To add or subtract fractions with different denominators, you must find a Least Common Denominator (LCD). The LCD is exactly the Least Common Multiple (LCM) of the individual denominators.