About this calculator
Enter the coefficients of two equations in the form ax + by = c and this solver finds x and y, showing every step.
It also tells you when there is no solution (parallel lines) or infinitely many (the same line).
Worked examples
Real numbers, worked out by the same calculator. Press “Use these numbers” to try one above.
2x + y = 5 and x − y = 1
- x
- 2
- y
- 1
- Determinant
- -3
The solution is x = 2 and y = 1.
Show the working
- Write the equations as 2x + 1y = 5 and 1x + -1y = 1.
- Determinant D = a₁b₂ − a₂b₁ = 2 × -1 − 1 × 1 = -3.
- x = (c₁b₂ − c₂b₁) ÷ D = (5 × -1 − 1 × 1) ÷ -3 = -6 ÷ -3 = 2.
- y = (a₁c₂ − a₂c₁) ÷ D = (2 × 1 − 1 × 5) ÷ -3 = -3 ÷ -3 = 1.
- Check: 2 × 2 + 1 × 1 = 5, which matches 5.
3x + 2y = 12 and x − y = 1
- x
- 2.8 (14/5)
- y
- 1.8 (9/5)
- Determinant
- -5
The solution is x = 2.8 and y = 1.8.
Show the working
- Write the equations as 3x + 2y = 12 and 1x + -1y = 1.
- Determinant D = a₁b₂ − a₂b₁ = 3 × -1 − 1 × 2 = -5.
- x = (c₁b₂ − c₂b₁) ÷ D = (12 × -1 − 1 × 2) ÷ -5 = -14 ÷ -5 = 2.8.
- y = (a₁c₂ − a₂c₁) ÷ D = (3 × 1 − 1 × 12) ÷ -5 = -9 ÷ -5 = 1.8.
- Check: 3 × 2.8 + 2 × 1.8 = 12, which matches 12.
x + y = 10 and x − y = 2
- x
- 6
- y
- 4
- Determinant
- -2
The solution is x = 6 and y = 4.
Show the working
- Write the equations as 1x + 1y = 10 and 1x + -1y = 2.
- Determinant D = a₁b₂ − a₂b₁ = 1 × -1 − 1 × 1 = -2.
- x = (c₁b₂ − c₂b₁) ÷ D = (10 × -1 − 2 × 1) ÷ -2 = -12 ÷ -2 = 6.
- y = (a₁c₂ − a₂c₁) ÷ D = (1 × 2 − 1 × 10) ÷ -2 = -8 ÷ -2 = 4.
- Check: 1 × 6 + 1 × 4 = 10, which matches 10.
Cramer's rule
For a₁x + b₁y = c₁ and a₂x + b₂y = c₂, first find the determinant D = a₁b₂ − a₂b₁. If D is not zero, x = (c₁b₂ − c₂b₁) ÷ D and y = (a₁c₂ − a₂c₁) ÷ D.
When there is no solution
If D is zero the two lines have the same slope. They either never meet (no solution) or are the same line (infinitely many solutions). The solver tells you which.
Solving by hand
The usual school method is elimination: multiply the equations so one unknown has the same number in both, subtract to remove it, solve for the other, then substitute back. The working above reaches the same answer by a different route.
Frequently asked questions
How do I solve simultaneous equations?
Use elimination or substitution, or Cramer's rule as this solver does. Every method gives the same answer.
What if the determinant is zero?
Then there isn't a single solution: the lines are parallel or identical.
Can the answers be fractions?
Yes. When all the numbers are whole, the solver also shows the answer as a fraction, like 7/3.
Can it solve three equations?
Not yet. This solver handles two equations with two unknowns.
Formulas tested against hand-worked answers. Last reviewed 29 September 2026. These calculators do arithmetic only; they are not financial, tax or legal advice.