Linear equation solver

Solve ax + b = c for x.

Enter your values and press Calculate. Your inputs stay in the address, so you can switch language or share the link.

Formula

ax + b = c → x = (c − b) ÷ a

How it works

Move b to the other side by subtracting it from both sides, then divide by a to isolate x.

Worked example

The same calculation with the default values:

  • Coefficient a 2
  • Constant b 5
  • Right-hand side c 11
  1. x = (11 − 5) ÷ 2 = 3
  2. check: 2 × 3 + 5 = 11

Result: x: 3

Assumes the coefficient a is non-zero - if a = 0, the equation isn't linear in x anymore and has either no solution or infinitely many, which this straightforward division formula cannot represent.

Common mistakes

  • Forgetting to apply the same operation to both sides when rearranging by hand - the calculator does this correctly internally, but a manual check that only moves a term on one side will get a different, wrong answer.
  • Dividing by a instead of multiplying when isolating x, or vice versa - the correct final step is dividing (c − b) by a, not multiplying.
  • Treating a = 0 as a valid input - with no x term left, the equation becomes either always true or never true, not solvable for a specific x.

Related calculators