Enter the coefficients A and B, along with the constant term C, into the calculator to find a solution to the Diophantine equation Ax + By = C. The calculator will provide one possible solution (x, y) if it exists.

Diophantine Equation Formula

The Diophantine equation is an equation of the form:

Ax + By = C

Where:

  • A and B are coefficients of the variables x and y, respectively
  • C is the constant term
  • x and y are variables that take integer values

To solve the Diophantine equation, one must find integer solutions for x and y that satisfy the equation. This is typically done using the Extended Euclidean Algorithm to find the greatest common divisor (gcd) of A and B and then determining if C is divisible by the gcd. If it is, the equation has integer solutions.

How to Calculate a Diophantine Equation?

The following steps outline how to calculate a solution to the Diophantine equation:


  1. First, determine the coefficients A and B, and the constant term C.
  2. Use the Extended Euclidean Algorithm to find the gcd of A and B, and the coefficients x and y that satisfy Ax + By = gcd(A, B).
  3. Check if C is divisible by the gcd. If it is not, there is no integer solution.
  4. If C is divisible by the gcd, multiply the coefficients x and y found in step 2 by C/gcd to find an initial solution to the equation.
  5. Use the calculator above to verify your solution or to find a solution if you have the values for A, B, and C.

Example Problem:

Use the following values as an example problem to test your knowledge:

A (Coefficient of x) = 15

B (Coefficient of y) = 25

C (Constant term) = 100