GCD & LCM Calculator
Find greatest common divisor and least common multiple
Results
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