By Tim King · Updated
Linear Equation Calculator
Solve for x With Brackets and Fractions, Plus a Check on Your Answer
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Linear Equation Calculator works
This linear equation calculator solves any equation with one unknown, such as 3(x + 4) = 5x − 2 or x/3 = x/5 + 2. It expands brackets, gathers terms, divides through and checks the answer by substituting it back, then shows every step so you can follow or copy the method.
A linear equation has an unknown raised only to the first power: no x², no x times y, no x under a fraction line. Every such equation tidies down to the shape ax = b, and the answer is x = b ÷ a. The work is all in getting there cleanly.
How the linear equation calculator works
First each side is expanded, so 3(x + 4) becomes 3x + 12. Then every x term moves to the left and every number to the right, changing sign as it crosses the equals sign. That leaves ax = b, and the formula x = b ÷ a finishes it. Fractions stay exact, so x/3 = x/5 + 2 gives (2/15)x = 2 and x = 15, not 14.999.
First example. 3(x + 4) = 5x − 2 expands to 3x + 12 = 5x − 2. Moving terms gives −2x = −14, so x = 7. Check: both sides equal 33.
Second example. 0.5x − 1.2 = 2.3 becomes (1/2)x = 7/2, so x = 7.
How many solutions can a linear equation have? One, none or infinitely many. If the x terms cancel and the numbers disagree, as in 3x + 5 = 3x + 8, there is no solution. If everything cancels, every x works.
Example linear equations, simplified and solved
| Equation | Simplified | Solution |
|---|---|---|
| 2x + 3 = 11 | 2x = 8 | x = 4 |
| 5x - 7 = 3x + 9 | 2x = 16 | x = 8 |
| 3(x + 4) = 5x - 2 | -2x = -14 | x = 7 |
| x/4 + 2 = 7 | (1/4)x = 5 | x = 20 |
| 0.5x - 1.2 = 2.3 | (1/2)x = 7/2 | x = 7 |
| 7 - 2x = 15 | -2x = 8 | x = -4 |
| 4(2x - 1) = 3(x + 7) | 5x = 25 | x = 5 |
| x/3 = x/5 + 2 | (2/15)x = 2 | x = 15 |
| 2(x - 3) - 4 = 6x | -4x = 10 | x = -5/2 |
| (x + 1)/2 = (x - 1)/3 | (1/6)x = -5/6 | x = -5 |
| 6 = 2x - 8 | -2x = -14 | x = 7 |
| 10x = 4x + 27 | 6x = 27 | x = 9/2 |
| 1.2x + 0.8 = 5 | (6/5)x = 21/5 | x = 7/2 |
| 9 - (x - 4) = 2x | -3x = -13 | x = 13/3 |
| 5(x - 2) = 3(x + 4) - 2 | 2x = 20 | x = 10 |
| x + x/2 = 18 | (3/2)x = 18 | x = 12 |
| -3x + 7 = -11 | -3x = -18 | x = 6 |
| 8x - 3 = 5x | 3x = 3 | x = 1 |
| 2y + 5 = 17 | 2y = 12 | y = 6 |
| (2x - 5)/3 = 7 | (2/3)x = 26/3 | x = 13 |
| 3x + 5 = 3x + 8 | 0 = 3 | No solution |
| 2(x + 1) = 2x + 2 | 0 = 0 | Every x works |
Tips
- Implicit multiplication is fine. Type 3x, 2(x + 1) or (x + 1)(2) without a × sign.
- Use / for fractions. (2x − 5)/3 = 7 is read as the whole bracket over 3.
- Any single letter works. 2y + 5 = 17 solves for y.
FAQ
What makes an equation linear?
The unknown appears only to the power one and is never multiplied by itself or by another unknown. Its graph is a straight line, which is where the name comes from. Equations with x² are quadratic and need the quadratic equation calculator instead.
Why does the sign change when a term moves across the equals sign?
Moving a term is shorthand for doing the same thing to both sides. Taking 5x away from both sides of 3x + 12 = 5x − 2 removes it from the right and leaves −5x on the left. The balance is kept, so the solution is unchanged.
What if the equation has two variables?
One equation with two unknowns has endless solutions, one for every value you pick for the other letter. To pin down a single answer you need as many equations as unknowns. Enter them together in the system of equations calculator to solve them at once.
How do I clear fractions in an equation by hand?
Multiply every term on both sides by the lowest common denominator. For x/3 = x/5 + 2 that is 15, giving 5x = 3x + 30, so 2x = 30 and x = 15. The calculator keeps exact fractions instead, but it reaches the same answer.
See also: all Algebra and Geometry tools, Arithmetic, Number Theory, Statistics, Trigonometry and Calculus.
Related tools
System Of Equations Calculator
Solve simultaneous equations with every elimination step.
Quadratic Equation Calculator
Solve ax² + bx + c = 0, with exact roots and the vertex.
Inequality Calculator
Solve a linear or double inequality, with interval notation and the number line.
Proportion Calculator
Find the missing number in a/b = c/d, with the cross multiplication shown.
Arithmetic Sequence Calculator
The nth term, the sum and the rule, with the working.