Key takeaways
- ax + b = c rearranges to x = (c - b) ÷ a.
- Always undo addition/subtraction before undoing multiplication/division.
- If a = 0, there's no x term, so the equation has either infinite solutions or none.
- Check your answer by substituting it back into the original equation.
In this guide
What is a linear equation?
A linear equation in one variable looks like ax + b = c: some number (a) times x, plus another number (b), equals a known total (c). "Solving" means finding the single value of x that makes the equation true.
Why does solving for x matter?
Most everyday costs are built the same way: a fixed part plus a rate that depends on how much you use. Once you can solve ax + b = c, you can work backward from any total to find the hidden quantity — distance traveled, hours worked, items bought.
A taxi with a $5 flat fee and $3 per kilometer charges the same formula whether you ride 1 km or 50 km. Solving for x is how you turn "the total was $20" into "you traveled 5 km".
The formula
| Symbol | What it means | Example |
|---|---|---|
| a | The coefficient of x | 3 |
| b | The constant added to ax | 5 |
| c | The value the whole left side equals | 20 |
| x | The unknown you're solving for | 5 |
How to solve for x step by step
- 1Write the equation as ax + b = c. Make sure everything with x is on one side.
- 2Move b to the other side. Subtract it from c:
ax = c - b. - 3Divide both sides by a. This isolates x:
x = (c - b) ÷ a. - 4Check your answer. Substitute it back into the original equation to confirm both sides match.
Enter your own a, b, and c below to solve any linear equation instantly.
Try it yourself
Pre-filled with the example — change any value.
Common mistakes to avoid
- Forgetting to divide the whole side by a, not just part of it.
- Dividing by zero. If a = 0, there's no x term left, so the equation either has infinite solutions (if b = c) or no solution at all (if b ≠ c).
- Skipping the check. Plugging your answer back in takes seconds and catches almost every arithmetic slip.
Tips and tricks
- If you have two unknowns and two equations instead of one, you need the simultaneous equations solver.
- To find the steepness of the line this equation describes, use the slope formula calculator.
- Estimate first: round a, b, and c to easy numbers to sanity-check your exact answer.
Where you'll use it in real life
- Transportation: taxi and rideshare fares built from a flat fee plus a per-distance rate.
- Utilities: phone or electricity bills with a base charge plus a usage charge.
- Work: hourly wages plus a fixed bonus or deduction.
- Shopping: working out how many items you bought from a total receipt and a per-item price.
Quick summary
To solve ax + b = c, subtract b from c, then divide by a. Watch out for a = 0, and always check your answer by substituting it back in. Try the calculator above with your own numbers to see every step worked out.
Worked example
A taxi charges a $5 flat fee plus $3 per kilometer. Your total fare came to $20. How many kilometers did you travel? That's 3x + 5 = 20.
- 013x + 5 = 20
- 023x = 20 - 5
- 033x = 15
- 04x = 15 ÷ 3
- 05x = 5
These numbers are pre-filled in the calculator above.
Frequently asked questions
How do I solve for x in ax + b = c?
Subtract b from c, then divide the result by a: x = (c - b) ÷ a.
What if a is 0?
There's no x term, so the equation simplifies to b = c. If that's true, x can be any number (infinite solutions); if it's false, there's no solution.
What's the difference between an equation and an expression?
An expression (like 3x + 5) has no equals sign and can't be "solved". An equation (like 3x + 5 = 20) sets two expressions equal, so you can solve for the unknown.
How do I check my answer to a linear equation?
Substitute your value of x back into the original equation. If both sides come out equal, your answer is correct.


