Extended Euclidean Algorithm

GCD with Bézout coefficients

About this calculator

The Extended Euclidean Algorithm Calculator computes gcd(a, b) together with Bézout coefficients x and y satisfying a·x + b·y = gcd(a, b), showing the full Euclidean division chain step by step. It runs on exact BigInt arithmetic for integers up to 15 digits, reports whether the inputs are coprime, handles negative inputs by working on absolute values and reattaching signs, and uses the convention gcd(0, 0) = 0.

How to use the Extended Euclidean Algorithm calculator

  1. Enter the values for your problem into the input fields.
  2. Read the result — it updates instantly as you type.
  3. Check the formula and the visual explanation to follow how the answer was found.
  4. Copy the page URL to share the exact calculation.

Common examples

  • gcd(240, 46) = 2 with 240·(−9) + 46·47 = 2, reached in 5 division steps
  • gcd(17, 5) = 1 with 17·(−2) + 5·7 = 1 — coprime
  • gcd(35, 15) = 5 with 35·1 + 15·(−2) = 5
  • gcd(101, 13) = 1 with 101·4 + 13·(−31) = 1

Frequently asked questions

How does the Extended Euclidean Algorithm calculator work?

Enter your values and the calculator applies the exact mathematical method for this problem, showing the result together with the formula it used. Everything is computed with high-precision arithmetic, so the answer you see is not limited by ordinary floating-point rounding.

When would I use the Extended Euclidean Algorithm calculator?

It is useful for homework and exam preparation, for checking work done by hand, and whenever a step in a larger problem needs this calculation done quickly and reliably.

How accurate are the results?

Calculations run at 30 significant digits of precision internally. Displayed values are rounded for readability, but the underlying result is far more precise than a typical hand or pocket-calculator computation.

Can I share a specific calculation with someone else?

Yes. Every value you enter updates the URL, so copying the address bar and sharing the link reopens the exact same calculation for whoever clicks it.