Home › Math Calculators › GCD and LCM Calculator
Find the greatest common divisor and least common multiple of two whole numbers.
How the calculation works
The calculator uses the Euclidean algorithm to find the GCD, then uses it to compute the LCM.
Formula used
LCM(a, b) = a × b ÷ GCD(a, b)
Example
For 12 and 18 the GCD is 6 and the LCM is 36.
About GCD and LCM
GCD
The greatest common divisor, also called the greatest common factor, is the largest number that divides both numbers exactly. It is used to simplify fractions.
LCM
The least common multiple is the smallest number that both numbers divide into. It is used to find common denominators and to line up repeating cycles.
The link between them
For two numbers a and b, the product of their GCD and LCM equals a times b. The calculator uses this to find the LCM.
Prime factors
The table shows each number as a product of prime numbers. The GCD uses the primes they share and the LCM uses all primes at their highest power.
Frequently asked questions
Where is GCD used?
Simplifying fractions and splitting items into equal groups.
Can I use decimals?
No. Enter whole numbers only.
Results are estimates for general information only and are not professional financial, medical or legal advice.
All Calculators
Every calculator on the site, in 16 categories.
💰
Financial Calculators
- Mortgage Calculator
- Loan Calculator
- Interest Calculator
- Payment Calculator
- Retirement Calculator
- Amortization Calculator
- Investment Calculator
- Inflation Calculator
- Finance Calculator
- Income Tax Calculator
- Compound Interest Calculator
- Daily Compound Interest Calculator
- Salary Calculator
- Pay Raise Calculator
- Interest Rate Calculator
- Sales Tax Calculator
- Simple Interest Calculator
- ROI Calculator
- Percent Off Calculator
- Unit Price Calculator
- Tip Calculator
📐
Math Calculators
- Scientific Calculator
- Fraction Calculator
- Improper Fraction to Mixed Number Calculator
- Long Division Calculator
- Percentage Calculator
- Percentage Change Calculator
- Discount Calculator
- Random Number Generator
- Triangle Calculator
- Rise Over Run to Degrees Calculator
- Average Rate of Change Calculator
- Standard Deviation Calculator
- Average Calculator
- Pythagorean Theorem Calculator
- Quadratic Formula Calculator
- GCD and LCM Calculator