Home · Everyday · Arithmetic · Euclidean Algorithm Calculator
Euclidean Algorithm Calculator
The Euclidean algorithm step by step — remainders until zero — for the greatest common divisor of two numbers.
What this calculator does
The Euclidean algorithm step by step — remainders until zero — for the greatest common divisor of two numbers. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
All inputs are whole numbers; the tools use exact integer arithmetic.
Factorisations are found by trial division up to the square root, which is exact for the sizes accepted here.
The Euclidean algorithm replaces the larger number by the remainder until it reaches zero.
Worked example
With the example inputs this page opens with (first integer 1071, second integer 462), the result is 21 — gcd(1071, 462). Euclid's algorithm replaces the pair by (divisor, remainder) until the remainder is zero — the last non-zero remainder is the GCD.
Quick reference
| Step | Equation |
|---|---|
| 1 | 1071 = 2 × 462 + 147 |
| 2 | 462 = 3 × 147 + 21 |
| 3 | 147 = 7 × 21 + 0 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
How does the Euclidean Algorithm Calculator work?
The Euclidean algorithm step by step — remainders until zero — for the greatest common divisor of two numbers. A · b → gcd with steps. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Euclidean Algorithm Calculator need?
A · b → gcd with steps. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Euclidean Algorithm Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.