Euclidean Algorithm Calculator
Find the GCD of two numbers using the Euclidean algorithm.
The Euclidean algorithm efficiently finds the greatest common divisor by repeated remainders.
The math behind it
Replace (a, b) with (b, a mod b) repeatedly; when the remainder hits 0, the last non-zero value is the GCD.
Worked example
gcd(252, 105) = 21.
FAQ
Why is it so fast?
Each step roughly shrinks the numbers, so it finishes in very few iterations even for huge inputs.