Euclid's Algorithm Calculator
Compute the Greatest Common Divisor (GCD) using the step-by-step Euclidean algorithm.
Greatest Common Divisor (GCD)6
Step-by-Step Execution
48 = 18 * 2 + 12
18 = 12 * 1 + 6
12 = 6 * 2 + 0
The Euclidean Algorithm
Euclid's algorithm is an efficient method for computing the greatest common divisor (GCD) of two integers, which is the largest number that divides them both without a remainder.
How it works
The algorithm relies on the principle that the GCD of two numbers does not change if the larger number is replaced by its difference with the smaller number. In practice, we use modulo division until the remainder is zero.