Linear Equation Solver
Enter a, b and c for an equation of the form ax + b = c. The solver shows the answer for x, each step of the working and a check by substitution.
- Free, no sign-up
- Updated
- Formula and worked example
Enter your numbers to see the result.
- Solves ax + b = c
- Step-by-step working
- Check by substitution
- Detects no solution and infinite solutions
How to solve a linear equation
The goal is to get x alone on one side. Whatever you do to one side of the equation, you must do to the other. For ax + b = c there are only two steps:
| Step | What you do | Result |
|---|---|---|
| 1 | Subtract b from both sides | ax = c − b |
| 2 | Divide both sides by a | x = (c − b) ÷ a |
Worked example: 3x + 5 = 20
Subtract 5 from both sides to get 3x = 15. Divide both sides by 3 to get x = 5. Check: 3 × 5 + 5 = 20, so the answer is correct. The solver prints this check on every answer, and you should make it a habit on paper too.
No solution and infinite solutions
If a is zero, the x term vanishes. When b equals c, the statement is always true, so every value of x works: there are infinitely many solutions. When b does not equal c, the statement is never true, so there is no solution. Both cases are reported clearly.
Common mistakes
Sign errors. Moving a number across the equals sign changes its sign. In 2x − 4 = 10, add 4 to both sides, which gives 2x = 14. Dividing only one term. Divide the whole side by a, not just part of it. For equations with an x² term, use the quadratic formula calculator.
Frequently asked questions
What is a linear equation?
A linear equation has a variable raised only to the first power, such as 3x + 5 = 20. Its graph is a straight line and it has at most one solution.
How do I solve 2x + 3 = 11?
Subtract 3 from both sides to get 2x = 8, then divide by 2. The answer is x = 4.
What if x appears on both sides?
Collect the x terms on one side first. For 5x + 2 = 2x + 14, subtract 2x and 2 from both sides to get 3x = 12, so x = 4. Then enter a = 3, b = 0 and c = 12.
Can an equation have no solution?
Yes. If simplifying leaves a false statement such as 5 = 7, no value of x works. The solver reports this for the case a = 0 with b different from c.
More calculators you may need
- Scientific Calculator A free scientific calculator that runs in your browser. Use the keypad or your keyboard for tri...
- Quadratic Formula Calculator Enter the coefficients a, b and c of a quadratic equation. You get both roots, whether they are...
- Pythagorean Theorem Calculator Choose whether you need the hypotenuse or a missing leg, then enter the two sides you know. The...
- Mean Median Mode Calculator Paste or type a list of numbers separated by commas or spaces. You get the mean, median, mode...