Extended Euclidean algorithm calculator
Run the extended Euclidean algorithm on two integers a and b: it returns their greatest common divisor together with Bézout coefficients x and y satisfying a·x + b·y = gcd(a, b). Beyond the gcd, those coefficients are exactly what you need to build modular inverses and solve linear Diophantine equations. The full division step table is shown so you can follow every reduction.
Related tools
All Numbers & arithmetic tools →The Extended Euclidean algorithm calculator turns a, b into gcd(a, b), Bézout x, Bézout y, Bézout identity, instantly and for free. For instance, with a = 252 and b = 105 it returns gcd(a, b) = 21, Bézout x = -2 and Bézout y = 5.
How to use it
- Enter your values: a, b.
- Read the result instantly: gcd(a, b), Bézout x, Bézout y, Bézout identity.
Frequently asked questions
What does the Extended Euclidean algorithm calculator actually compute?
It takes a and b and derives gcd(a, b), Bézout x, Bézout y and Bézout identity from them. The calculation is live as you type, so the result updates on every change.
What information do I need to provide?
2 values: a and b. Nothing else is required — no account, no file upload.
Can you show a worked example?
With a = 252 and b = 105, the calculator returns gcd(a, b) = 21, Bézout x = -2 and Bézout y = 5. Those figures come from running this exact tool, so you can reproduce them by entering the same values.
When would I actually use this?
Reading a number written another way: a Roman numeral on a monument, a hexadecimal colour, a binary byte, or a fraction that needs reducing.
What is the most common mistake?
Assuming a decimal fraction survives a change of base. A tenth is exact in decimal and infinitely repeating in binary, which is why 0.1 + 0.2 is not 0.3 in most programming languages.
Where do the figures come from, and how current are they?
Base conversion and number-theory results are exact. Roman numerals follow the standard subtractive form used since the Middle Ages, which is not the only one the Romans themselves used.