Greatest Common Divisor (GCD) Calculator
Compute the greatest common divisor of two numbers using the Euclidean algorithm.
Examples
- 48 & 18 ⇒ 6
- 21 & 14 ⇒ 7
FAQ
What is the GCD?
It's the largest integer that divides both numbers without remainder.
Can I use negative numbers?
Yes, the algorithm uses absolute values.
Is order important?
No, gcd(a,b) equals gcd(b,a).
How is this useful?
GCD is used in simplifying fractions and number theory.
Additional Information
- The Euclidean algorithm repeatedly uses remainders to find the GCD.
- A GCD greater than 1 indicates the numbers share common prime factors.
- You can find the least common multiple using lcm = |a * b| / gcd.