All tools › Math Calculators › Algebra
Solve a linear equation in one unknown and see each step, the check, and whether it has one, no or endless solutions.
Solve a linear equation in one unknown, with every step
A linear equation in one unknown has the variable only to the first power: no squares, no roots, no variable in a denominator. Any such equation can be tidied into the form ax + b = cx + d. This equation solver takes that form, finds x, and shows the three algebra steps and a check of both sides.
You can fill in the four numbers, or type the equation as text, for example 3x + 5 = 2x – 7. The page also tells you when an equation has no solution or is true for every value of x.
How to use the equation solver
- Either type the equation in Equation as text, or leave that box empty and use the four number boxes.
- In the boxes, a is the number in front of x on the left side and b is the constant on the left. c and d are the same two numbers for the right side.
- Use 0 for a term that is missing. For 4x – 7 = 10, enter a = 4, b = -7, c = 0 and d = 10.
Typed equations can use any single letter as the unknown, several terms on each side, decimals, and a division by a number, such as x/2 or 3x/4. Join the terms with + and -. Brackets, powers and two different letters are not read; expand the brackets first.
The method in plain words
ax + b = cx + d gives (a – c)x = d – b so x = (d – b) / (a – c)
- Step 1. Subtract cx from both sides and subtract b from both sides. All the x terms are now on the left and all the plain numbers on the right.
- Step 2. Combine like terms. The left side becomes (a – c) times x, the right side becomes d – b.
- Step 3. Divide both sides by a – c.
When all four numbers are whole numbers or short decimals, the answer is also given as a fraction in lowest terms.
Worked example: 5x – 8 = 2x + 13
Enter a = 5, b = -8, c = 2 and d = 13, or type the equation as text. The calculator returns x = 7 with these rows:
| Row | What the page shows |
|---|---|
| Step 1 | 5x – 2x = 13 – (-8) |
| Step 2 | 3x = 21 |
| Step 3 | x = 21 / 3 = 7 |
| Check: left side | 5 x 7 + (-8) = 27 |
| Check: right side | 2 x 7 + 13 = 27 |
Both sides come to 27, so x = 7 is right. A second run, 6x + 1 = 2x + 4, gives 4x = 3 and x = 0.75, with the extra row x = 3/4.
One solution, no solution, or every x
| After step 2 | Result | Example |
|---|---|---|
| A number other than 0 in front of x | One solution | 5x – 8 = 2x + 13 gives x = 7 |
| 0x = a number other than 0 | No solution | 4x + 6 = 4x + 1 leaves 0x = -5 |
| 0x = 0 | Every x is a solution | 4x + 6 = 4x + 6 |
In the second case the two sides are parallel lines that never meet. In the third case they are the same line, and the equation is called an identity.
Limits and assumptions
- One unknown, first power only. For x squared use the quadratic page; for two or three unknowns use the system solver.
- The text reader handles simple terms only. It does not expand brackets or read fractions with x in the denominator, such as 3/x.
- Decimal answers are rounded to 10 significant digits. The fraction row appears only when the inputs are whole numbers or decimals with up to six places.
- Numbers can be up to 1 trillion in size.
Frequently asked questions
What makes an equation linear?
The unknown appears only to the first power and is not multiplied by itself, placed under a root or put in a denominator.
How do I enter an equation with brackets, such as 2(x + 3) = 14?
Multiply out the brackets first. 2(x + 3) becomes 2x + 6, so type 2x + 6 = 14, or enter a = 2, b = 6, c = 0 and d = 14.
Can the answer be negative or a fraction?
Yes. A linear equation with whole-number coefficients often has a fraction or a negative number as its solution. The page shows the decimal and, where it can, the exact fraction.
What if x is only on one side?
Then the coefficient on the other side is 0. For 4x – 7 = 10, use c = 0. The steps work the same way.
Related calculators
- System of Equations Solver – two or three linear equations solved together.
- Quadratic Formula Calculator – for equations with an x squared term.
- Slope Calculator – the line behind each side of a linear equation.
- Fraction Calculator – add, subtract, multiply and divide fractional answers.

