Euclidean Algorithm – Step-by-Step GCD
Step-by-step Euclidean algorithm to find GCD with full working shown.
How It Works
Enter two positive integers. The tool applies the Euclidean algorithm and shows every division step until the remainder is 0.
Formula
GCD(a, b): repeatedly apply a = b, b = a mod b until b = 0.
Frequently Asked Questions
What is the Euclidean algorithm?
It is an efficient method to find the GCD by repeatedly replacing (a, b) with (b, a mod b) until b reaches 0.
How many steps does it take?
The number of steps is at most 5 times the number of digits in the smaller number (by Lame's theorem).