🍋 Math Tools
GCD & LCM Calculator
Find greatest common divisor and least common multiple
chars
words
sentences
lines
Results
Result
About GCD & LCM Calculator
Calculate the GCD (greatest common divisor) and LCM (least common multiple) of two or more numbers. See step-by-step prime factorization and the relationship between GCD and LCM.
How It Works
The tool uses the Euclidean algorithm for GCD and the formula LCM(a,b) = (a × b) / GCD(a,b). For multiple numbers, it applies the algorithms iteratively. Prime factorization uses trial division.
Step by Step
- 1 Enter two or more numbers separated by commas or spaces
- 2 Click Calculate to find GCD and LCM
- 3 Review the prime factorization of each number
Tips
- GCD is useful for simplifying fractions
- LCM is useful for finding common denominators
- The relationship: GCD(a,b) × LCM(a,b) = a × b
- Enter up to 10 numbers for multi-value GCD/LCM
Frequently Asked Questions
What is the GCD used for?
GCD (greatest common divisor) is used to simplify fractions, find common factors, and solve divisibility problems. For example, GCD(12,8) = 4, so 12/8 simplifies to 3/2.
What is the LCM used for?
LCM (least common multiple) is used to find common denominators when adding fractions. For example, LCM(4,6) = 12, so you'd use 12 as the common denominator for 1/4 + 1/6.