LCM and GCD Calculator
Free LCM and GCD calculator. Find the least common multiple and greatest common divisor of two or three numbers instantly.
What is a GCD and LCM calculator?
A GCD/LCM calculator finds the greatest common divisor (GCD) and least common multiple (LCM) of two or three integers — the largest number that divides them all, and the smallest number they all divide into. Both are staples of fraction and algebra homework.
How this calculator works
- Enter two numbers, or three for a larger set.
- The GCD comes from Euclid’s algorithm — repeated remainder division.
- The LCM is computed as a × b ÷ GCD, extended across all inputs.
- Results update instantly as you type.
How to use the result
- Use the LCM to find a common denominator — to add 1/12 and 1/18, the LCM of 12 and 18 is 36.
- Use the GCD to reduce fractions to lowest terms — 12/18 divides by GCD 6 to give 2/3.
- In scheduling problems, the LCM tells you when two repeating events coincide (every 12 and 18 days → every 36 days).
- Check your answer: multiply your GCD result into the reduced fraction to confirm it returns the original.
What’s the difference between GCD and LCM?
GCD is the largest number that divides all inputs evenly — the biggest “shared chunk”. LCM is the smallest number that is a multiple of all inputs — the first point where their multiples line up. They’re linked by the identity LCM × GCD = a × b.
Common mistakes
- Confusing the two. GCD of 12 and 18 is 6 (the biggest shared factor); LCM is 36 (the smallest shared multiple).
- Using 0. GCD with 0 is defined (it returns the other number), but LCM with 0 is 0 — leave the optional third field blank instead of typing 0.
- Forgetting negatives. GCD and LCM use absolute values; sign doesn’t change the result.
Fraction and GCD work is classic calculator territory — the percentage calculator handles the decimal side of the same number relationships, and the basic calculator is there for quick arithmetic checks while you work.