Maths & numbers

Bézout coefficients calculator

Use the extended Euclidean algorithm to find one pair of integer coefficients.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Adding b/g to x and subtracting a/g from y produces another valid pair, where g is the gcd.

THE FORMULAax + by = gcd(a,b)

A worked example

30 × (−1) + 18 × 2 = 6.

Good to know

Several coefficient pairs can give the same gcd.

Read the result

Use the extended Euclidean algorithm to find one pair of integer coefficients.

The primary result is labeled “Greatest common divisor”. Keep the input definitions in view when comparing this result with another method.

Try a related calculation

Several coefficient pairs can give the same gcd.

For a related exercise, try the greatest common divisor.

A few questions, answered

How can I check the default inputs by hand?

30 × (−1) + 18 × 2 = 6.

Which rule does this calculator apply?

ax + by = gcd(a,b)

Find your calculator

Start typing to explore the library.