Linear Equation

Solve ax + b = c for x.

Use this tool

Result

The result appears in this panel after you run the tool.

About this tool

x is (c − b) / a. The page shows that value when a is not zero.

A zero coefficient means the equation is either impossible or true for every x, and this page does not guess which. It stops.

How to use it

  1. Enter a, b, and c.
  2. Calculate.
  3. Read x. A value of a equal to zero is rejected.

Limitations

Solving a x + b = c for x

The arrangement the boxes assume

The unknown appears once, with coefficient a, added to b, and set equal to c. The algebra is x = (c − b) / a whenever a is not zero. The panel prints that value and restates the formula so the arrangement is visible. This is not a x + b = 0 unless you typed c as zero. Moving a term to the other side is your job before you fill the boxes.

A short solution

Take a = 3, b = 1, and c = 10. Then x = (10 − 1) / 3 = 3. The panel reads x = 3, followed by the formula reminder. Check: 3 × 3 + 1 = 10. A second triple, a = 0.5, b = 2, c = 5, gives x = (5 − 2) / 0.5 = 6. Decimals are accepted. The printed x keeps at most ten fractional digits.

When a is zero

If a is 0 and b equals c, every number satisfies the equation, and the panel says so instead of dividing by zero. If a is 0 and b differs from c, there is no solution, and the panel says the sides differ. Those two messages are the whole special case. The page will not solve two equations at once, and it will not accept an x² term. A quadratic with a leading coefficient of zero is refused on the quadratic page for the complementary reason. Negatives are fine: a = −2, b = 4, c = 0 gives x = (0 − 4) / −2 = 2.

Rearranging before you type

An equation that arrives as 5x = 2x + 9 is not yet in the shape a x + b = c. Move terms until the unknown’s coefficient is a and the constant beside it is b. One legal arrangement is a = 3, b = 0, c = 9, because 5x − 2x = 9. Another arrangement that forgets to move the 2x will put the wrong a in the box and still print a confident x. The checker only rejects a non-numeric token or the zero-a stories already described. It does not know which algebra problem you started from. The formula reminder in the output is (c − b) / a, which is worth reading against your own rearrangement before you trust the value.

Privacy

Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.