Euclidean Algorithm Steps
Enter two integers and see every step of the Euclidean algorithm — division, remainder, and the final GCD.
Use the Euclidean Algorithm Steps
Enter Two Integers
Quick examples
Division Steps
| Step | Equation | Dividend | Divisor | Quotient | Remainder |
|---|
Back-substitution (Extended Algorithm)
Expresses GCD as a linear combination: a·x + b·y = GCD
| Step | x coefficient | y coefficient | Value |
|---|
Enter two integers above and click Compute.
Summary
The Euclidean Algorithm Steps tool takes two integers and walks through every division step used to find their Greatest Common Divisor (GCD). Each row shows the dividend, divisor, quotient, and remainder, making it easy to follow the algorithm by hand or check homework. Toggle the extended algorithm to also compute the Bezout coefficients — integers x and y satisfying ax + by = GCD.
How it works
- Enter two integers (positive or negative) in the input fields.
- The tool applies the Euclidean algorithm: repeatedly replace (a, b) with (b, a mod b) until b = 0.
- Each iteration is shown as a row: a = q × b + r.
- The last non-zero remainder is the GCD.
- Enable "Extended algorithm" to back-substitute and find Bezout coefficients x, y such that ax + by = GCD.
Use cases
- Check Euclidean algorithm homework step by step.
- Verify the GCD before simplifying a fraction.
- Learn how the algorithm reduces large numbers to small ones quickly.
- Use Bezout coefficients to solve linear Diophantine equations.
- Confirm coprimeness: GCD = 1 means the numbers share no factors.
- Understand why the algorithm terminates in O(log min(a,b)) steps.
Frequently Asked Questions
Last updated: 2026-06-11 · Reviewed by Nham Vu