← All tools/Calculators/Math/Linear Equation Solver

Linear Equation Solver

Type in a, b and c and see x worked out step by step — no algebra homework required.

Value of x

5

3x + 7 = 22

−100+10
Step 13x = 22 − 7 = 15
Step 2x = 15 ÷ 3 = 5
Check3 × 5 + 7 = 22

How it works

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

3x + 7 = 22. Subtract 7 from both sides: 3x = 22 − 7 = 15. Divide both sides by 3: x = 15 ÷ 3 = 5. Check: 3 × 5 + 7 = 15 + 7 = 22, which matches the right-hand side.

Frequently asked questions

What if a is 0?

Then the equation has no x term: 0x + b = c. If b and c are equal, every value of x works; if they differ, no value of x works. The calculator says so instead of dividing by zero.

How do I check the answer?

Put the x value back into the original equation. For 3x + 7 = 22, x = 5 gives 3 × 5 + 7 = 15 + 7 = 22, which matches the right-hand side.

Can a be negative or a fraction?

Yes. The same rule applies: x = (c − b) ÷ a. For −2x + 4 = 10, x = (10 − 4) ÷ (−2) = −3.

What is the difference between ax + b = c and ax + b = 0?

They are the same shape. ax + b = 0 is just the case where c is 0, so x = −b ÷ a. This calculator takes c as a separate input, so both forms work.

More tools

Tell us what you think

Loving this tool, or stuck on something? Tell us — it takes a minute.

We’ll only use your name and email to reply if needed. The tool and page are filled in for you.