🧮
🧮 Math & statistics

Linear Equation Solver (ax + b = c)

Results update as you type.

Your numbers

Understanding the linear equation solver — concept and principle

A linear equation in one unknown can always be written as ax + b = c, where x appears only to the first power. Solving it means finding the single value of x that makes both sides equal. Linear equations are the first step of algebra and appear everywhere in daily life: how many hours of work cover a bill, how many items fit a budget after a fixed fee, or what temperature in Celsius matches a Fahrenheit reading.

Solving 3x + 5 = 20 on a balanceRemoving 5 from both pans leaves 3x = 15; splitting into three gives x = 5.Do the same to both sidesxxx5203x + 5 = 20startxxx153x = 15take 5 off both sidesx5x = 5divide both sides by 3Check: 3 × 5 + 5 = 20 ✓
Whatever you do to one pan, do to the other: x = (20 − 5) ÷ 3 = 5.

How it is calculated

x = (c − b) ÷ a

Special cases:

The principle

An equation is a balance: if you do the same thing to both sides, it stays balanced. Subtracting b from both sides leaves ax = c − b, and dividing both sides by a (allowed only when a ≠ 0) leaves x alone. Graphically, y = ax + b is a straight line and the solution is the x-coordinate where that line meets the horizontal line y = c. A non-zero slope guarantees exactly one crossing; a zero slope gives either no crossing (parallel lines) or infinitely many (the same line).

Worked example

  1. Inputs: a = 3, b = 5, c = 20, so the equation is 3x + 5 = 20.
  2. Subtract 5 from both sides: 3x = 15.
  3. Divide both sides by 3: x = 15 ÷ 3.
  4. Result: x = 5.
  5. Check: 3 × 5 + 5 = 15 + 5 = 20.
How x changes with aHow x changes with a051015200.751.52.2533.754.56Example: 5a
Each point is the calculator re-run with only “a” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
ax
0.7520
1.510
2.256.666666667
35
3.754
4.53.333333333
62.5

How to read the result

Always substitute the answer back into the original equation; if both sides match, the solution is correct. In a word problem, interpret x in its unit: if a is a price per item and b a delivery fee, x = 5 means five items reach the total of 20. A non-integer x may need rounding up or down depending on the situation (you cannot buy 4.6 tickets).

Common mistakes

Keep in mind: The calculator solves the equation exactly as entered. If a model of a real situation is only approximately linear, the answer is only as good as the model.

Frequently asked questions

How do I solve an equation with x on both sides?

Collect the x terms on one side and constants on the other. For 5x + 2 = 3x + 10, subtract 3x: 2x + 2 = 10, so a = 2, b = 2, c = 10 and x = 4.

What if the equation has fractions?

Multiply both sides by the common denominator first, or enter decimal coefficients directly.

Can a linear equation have two solutions?

No. It has exactly one solution, none, or infinitely many.

Sources: I. M. Gelfand and A. Shen, Algebra, Birkhäuser · OpenStax, Elementary Algebra 2e, Chapter 2: Solving Linear Equations and Inequalities

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →