LCM & GCD Calculator
Calculate LCM and GCD

🔒 Zero upload · Method · · Disclaimer · LCM & GCD Calculator
Need a fast answer on calculating LCM and GCD? LCM & GCD Calculator answers with the steps beside it. Type Number 1 and Number 2 into LCM & GCD; each keystroke re-runs the math. The answer from LCM & GCD arrives with its working attached. LCM & GCD suits budgeting and planning checks. No account is needed for LCM & GCD. The browser does the arithmetic. LCM & GCD sits in the Math section next to least common multiple calculator of two numbers and greatest common divisor calculator with steps. LCM & GCD goes from question to answer fast. LCM & GCD answers the next Math question you meet.
What the defaults give
For 12 and 18: the LCM is 36 and the GCD is 6.
They are linked by a useful identity: for any two positive integers, LCM × GCD = a × b. Here 36 × 6 = 216, and 12 × 18 = 216. Find one and the other follows.
Both values from prime factors
12 = 2² × 3
18 = 2 × 3²
GCD takes the lowest power of each shared prime: 2¹ × 3¹ = 6.
LCM takes the highest power of every prime present: 2² × 3² = 4 × 9 = 36.
Worked example by listing
Multiples of 12: 12, 24, 36, 48…
Multiples of 18: 18, 36, 54…
Lowest common: 36
Divisors of both: 1, 2, 3, 6. Greatest: 6.
The shortcut
Euclid’s algorithm gives the GCD quickly: 18 mod 12 = 6, then 12 mod 6 = 0, so the GCD is 6. Then LCM = (12 × 18) ÷ 6 = 36. For large numbers this is far faster than listing multiples.
Where each is used
- LCM — adding fractions with different denominators, finding when two repeating events coincide, gear and pulley alignment.
- GCD — simplifying fractions, reducing ratios, dividing a space into the largest equal tiles.
- Together — the identity above, and checking one result against the other.
Mistakes worth avoiding
- Multiplying the two numbers and assuming that is the LCM. It is the LCM only when the numbers are coprime, as with 4 and 9.
- Taking the highest power of a prime that appears in only one number for the GCD — it must appear in both.
- Forgetting that with three numbers the identity LCM × GCD = product does not hold.
- Stopping the Euclid algorithm one step early, before the remainder reaches zero.
Frequently Asked Questions
Why is the LCM of 12 and 18 equal to 36?
Because 36 is the smallest number both divide into: 36 = 12 × 3 and 36 = 18 × 2. In prime factors it is 2² × 3², the highest power of every prime present.
Why is the GCD 6?
Because 6 is the largest number dividing both 12 and 18 — 12 = 2 × 6 and 18 = 3 × 6. In prime factors it is 2¹ × 3¹, the lowest power of each shared prime.
Does LCM × GCD always equal the product?
For two positive integers, yes. For three or more numbers it does not hold, so calculate each separately.
How do I find the LCM quickly by hand?
Find the GCD first with Euclid’s algorithm, then divide the product by it. For 12 and 18: GCD 6, so LCM = 216 ÷ 6 = 36.
What is the LCM used for in fractions?
It is the least common denominator. For 1/12 and 1/18, 36 is the smallest denominator both convert to: 3/36 and 2/36, which add to 5/36.
What is the LCM of more than two numbers?
Take the highest power of every prime appearing in any of them. For 4, 6 and 10 that is 2² × 3 × 5 = 60. The product rule LCM × GCD = product applies only to two numbers, so calculate three or more directly.
Moving Average (SMA) and other Math tools
Moving Average (SMA) · Midpoint Calculator · Hexagon Area Calculator · Quartile & IQR Calculator · Euler Totient Calculator · Arithmetic Series Sum · Math Guides