Linear Equation Calculator

Solve a single linear equation in x, or a pair of equations in two unknowns, a standard Class 10 topic. For two equations, the calculator also says when there is no solution or infinitely many.

Solve
Results update as you type.

x

5

About this calculator

Enter the coefficients; use negative numbers where needed.

How to use it

  1. Choose one equation or two.
  2. Enter the coefficients.
  3. Read the solution.

The formula

x = (c − b) ÷ a; for two equations, x = (c₁b₂ − c₂b₁) ÷ D, y = (a₁c₂ − a₂c₁) ÷ D, D = a₁b₂ − a₂b₁
D
determinant; if 0, the lines are parallel or the same

Worked example

Two equations

  1. 2x + 3y = 13 and x − y = −1.
  2. D = 2 × (−1) − 1 × 3 = −5.
  3. x = 2, y = 3.

What the result means

Check by putting the answer back into both equations.

Assumptions

  • All lengths in the same unit.

Limitations

  • Results are rounded to 10 significant figures.

Frequently asked questions

How do I solve two linear equations?

By substitution, elimination or Cramer’s rule; all give the same answer.

What if D = 0?

The lines are parallel (no solution) or the same line (infinitely many).

What is 3x + 7 = 22?

x = 5.

Last reviewed on 3 October 2026. Found a mistake? Tell us.