What is a linear equation solver?
A linear equation solver finds the value of x that makes an equation like 3x + 5 = 20 true. This one handles every one-variable linear equation once it's written as ax + b = c: you enter the three numbers, and it returns x = (c − b) ÷ a along with the working, so you can check each step against your own.
How to use it
- Rewrite your equation in the form ax + b = c (see the table below for common shapes).
- Enter a, the number multiplying x. It can be negative or a decimal, but not 0.
- Enter b, the constant on the same side as x. If there isn't one, leave it at 0.
- Enter c, the number on the other side.
- Click Calculate. You get x and a line showing the substitution, for example
x = (c - b) / a = (20 - 5) / 3.
Why x = (c − b) ÷ a
Solving a linear equation means undoing what's been done to x, in reverse order, while keeping both sides equal:
- Start with ax + b = c.
- Subtract b from both sides: ax = c − b.
- Divide both sides by a: x = (c − b) ÷ a.
Every linear equation in one variable can be reduced to this, which is why three numbers are enough.
Worked examples
3x + 5 = 20
a = 3, b = 5, c = 20. x = (20 − 5) ÷ 3 = 15 ÷ 3 = 5. Check: 3 × 5 + 5 = 20.
2x − 7 = 9
The constant is negative, so b = −7. x = (9 − (−7)) ÷ 2 = 16 ÷ 2 = 8. The working line shows this as (9 - -7) / 2; the double minus is subtracting a negative, which is the same as adding 7.
10 − 2x = 4
Reorder the left side as −2x + 10, so a = −2, b = 10, c = 4. x = (4 − 10) ÷ (−2) = −6 ÷ −2 = 3.
0.5x + 1.25 = −3
a = 0.5, b = 1.25, c = −3. x = (−3 − 1.25) ÷ 0.5 = −4.25 ÷ 0.5 = −8.5.
Rearranging common equations
Most of the work is getting your equation into ax + b = c. These patterns cover the usual cases:
| Your equation | Rearranged | a | b | c | x |
|---|---|---|---|---|---|
| 3x + 5 = 20 | already in form | 3 | 5 | 20 | 5 |
| 4x = 6 | 4x + 0 = 6 | 4 | 0 | 6 | 1.5 |
| 10 − 2x = 4 | −2x + 10 = 4 | −2 | 10 | 4 | 3 |
| x/4 = 18 | 0.25x + 0 = 18 | 0.25 | 0 | 18 | 72 |
| 5x + 3 = 2x + 12 | 3x + 3 = 12 | 3 | 3 | 12 | 3 |
| 2(x + 3) = 14 | 2x + 6 = 14 | 2 | 6 | 14 | 4 |
The rules behind those moves:
- Expand brackets first. Multiply the outside number into each term: 2(x + 3) = 2x + 6.
- Collect x terms on one side. Subtract the smaller x term from both sides.
- Collect constants on the other side, or leave one constant as b on the x side. Either works, because the solver does the final subtraction.
- Division by a number is multiplication by its reciprocal. x/4 is 0.25x.
Always check your answer
Substitute x back into the original equation, not the rearranged one. If both sides match, the answer is right and so was your rearranging. For 5x + 3 = 2x + 12 with x = 3: the left side is 15 + 3 = 18, the right side is 6 + 12 = 18. If they don't match, the mistake is almost always a sign error when moving a term across the equals sign.
What it can't solve
- Quadratics and higher powers (x², x³). These can have two or more solutions and need a different method, such as the quadratic formula.
- Two or more unknowns (2x + y = 7). A single equation with two variables has infinitely many solutions; you need a system of equations.
- x in a denominator or under a root (3/x = 6, √x = 4). Some of these can be turned into linear equations by hand first: 3/x = 6 becomes 6x = 3.
For plain arithmetic on the numbers you've rearranged, the basic calculator accepts full expressions with brackets. If your coefficients are fractions you'd like to keep exact, work them out in the fraction calculator first. The scientific calculator can check answers that involve roots or logarithms.
Last updated