x = (c − b) ÷ a

Linear equation calculator

Enter a, b and c from ax + b = c. The page solves for x, shows the rearrangement and flags the two degenerate cases.

Short answer: 2x + 3 = 11 gives x = 4, because x = (11 − 3) ÷ 2. Subtracting the constant and then dividing by the coefficient solves every equation of this shape.

Two cases that are not a number

With a = 0 the equation stops depending on x. If b = c it holds for every value of x; if not, it holds for none. Both are real answers and both are reported, which is what stops this page from printing Infinity for a perfectly ordinary input.

Worked example

A mobile plan costs ₹200 plus ₹2 per GB, and the bill came to ₹260: 200 + 2g = 260, so g = (260 − 200) ÷ 2 = 30 GB. Rearranging a linear equation is the same move whatever the units.

Linear equation questions

How is a linear equation solved?

Undo the operations in reverse: subtract b from both sides, then divide by a, giving x = (c − b) ÷ a. For 2x + 3 = 11 that is (11 − 3) ÷ 2 = 4, which checks because 2 × 4 + 3 = 11.

What if a is zero?

Then the x term vanishes. If b equals c the equation is true for every x and has infinitely many solutions; if b differs from c it is false for every x and has none. The page states which case applies instead of dividing by zero.

Can the answer be a fraction?

Yes, and it is shown as a decimal with up to ten significant places. 3x + 1 = 2 gives x = 1/3 = 0.333…, which the page reports as 0.3333333333 rather than pretending it terminates.

Related tools