Skip to main content
Mathovia

Math / Algebra

Two-Step Equation Calculator

Type any linear equation and get the answer with each inverse operation written out, a diagram of what happens to the variable, and a check by substitution. It works for one-step and multi-step equations too, including variables on both sides.

Use any letter for the variable. Fractions and decimals are fine: 2/3x means (2/3)·x, and 2(x + 3) multiplies the bracket.

Two-step equation

x = 5
x→× 3→+ 5→20
5←÷ 3←15←− 5←20

Top: what the equation does to x. Bottom: undo it in reverse order, using the opposite operation each time.

  1. Start with the equation3x + 5 = 20
  2. Subtract 5 from both sides3x = 15
  3. Divide both sides by 3x = 5
  4. Check: put x = 5 back into 3x + 5 = 20left side = 20, right side = 20 ✓
Written by
MPhil in Mathematics, Founder of Mathovia
Published

Mathematics verification: Mathematical formulas, calculations, worked examples and solutions are reviewed for accuracy before publication. How we check our work

A two-step equation is the first real puzzle in algebra: something has been done to a number twice, and you have to work backwards to find it. Most students can get to the answer with some guessing, but the method behind it, undoing operations in reverse order, is what every later equation depends on. This calculator shows that method for any equation you type, with each step written out and the answer checked at the end.

Solving a x plus b equals c: x equals c minus b, all over a
The general two-step equation and its solution

What counts as a two-step equation

The general form is ax + b = c: the variable is multiplied by one number and then has another added (or subtracted). Each operation needs to be undone, so there are two steps. The same idea shows up in several disguises:

FormExampleUndo firstThenAnswer
ax + b = c3x + 5 = 20subtract 5divide by 3x = 5
x/a + b = cx/4 − 2 = 6add 2multiply by 4x = 32
−ax + b = c−2x + 7 = 15subtract 7divide by −2x = −4
(x + b)/a = c(x + 3)/4 = 5multiply by 4subtract 3x = 17
a(x + b) = c2(x + 3) = 14divide by 2subtract 3x = 4
c = ax + b5 = 2x − 3add 3divide by 2x = 4

Notice the fourth and fifth rows. When brackets or a fraction bar group the addition with the variable, the order flips. The rule isn’t “always subtract first”. It’s “undo the last thing that was done to the variable first”.

How to solve a two-step equation (step by step)

The calculator opens on 3x + 5 = 20. Read it as a story: start with x, multiply by 3, add 5, and you get 20.

Step One: Undo the addition or subtraction

5 was added last, so take it away first, from both sides so the equation stays balanced.

3x + 5 = 20
3x + 5 − 5 = 20 − 5
3x = 15

Step Two: Undo the multiplication or division

x was multiplied by 3, so divide both sides by 3.

3x ÷ 3 = 15 ÷ 3
x = 5

Step Three: Check the answer

Put x = 5 back into the original equation. If both sides match, you’re done.

3(5) + 5 = 15 + 5 = 20  ✓

Under the answer, the calculator draws this as a function machine: x goes through × 3 and then + 5 to make 20, and you walk back through − 5 and ÷ 3 to get from 20 to 5.

A balance showing 3x + 5 equal to 20, then 5 removed from both pans to leave 3x = 15, then each pan split into 3 equal groups to give x = 5
A visual read of the worked example above. These are the same numbers the calculator returns for its default inputs.

Why you undo in reverse order

Think of putting on socks and then shoes. To get back to bare feet you take the shoes off first, then the socks. An equation works the same way. The expression 3x + 5 means “multiply first, add second” (that’s the order of operations), so solving means “subtract first, divide second”.

The linear equations lesson explains why doing the same thing to both sides keeps an equation true, which is what makes every step here legal.

Two-step equations with fractions and decimals

Fractions look harder but follow exactly the same pattern. The only new move is multiplying by a reciprocal instead of dividing by a fraction.

(2/3)x + 1 = 5
(2/3)x = 4          subtract 1
x = 4 × 3/2 = 6     multiply by 3/2, the reciprocal of 2/3

Decimals work the way you’d expect. The calculator keeps decimals in the steps if you type them:

0.5n − 1.2 = 3.8
0.5n = 5            add 1.2
n = 10              divide by 0.5

A two-step equation from real life

A plumber charges a $45 call-out fee plus $30 an hour. Your bill comes to $135. How many hours did the job take?

30h + 45 = 135
30h = 90            subtract the call-out fee
h = 3               divide by the hourly rate

Almost every “flat fee plus a rate” problem, from taxi fares to phone plans to gym memberships, turns into a two-step equation like this one. For more of these, the algebra equation generator makes fresh problems to solve with answers you can check.

Turning words into a two-step equation

Most two-step equations in homework arrive as sentences. The trick is to translate them one phrase at a time, with “is” becoming the equals sign:

WordsEquationAnswer
Five more than three times a number is 20.3x + 5 = 20x = 5
A number divided by 4, minus 2, is 6.x/4 − 2 = 6x = 32
Twice the sum of a number and 3 is 14.2(x + 3) = 14x = 4
Seven less than a number, divided by 2, is 9.(x − 7)/2 = 9x = 25

Watch the difference between “three times a number, plus five” and “three times the sum of a number and five”. The second one, 3(x + 5), groups the addition first, which changes both the equation and the order you undo it in. “Less than” also trips people up: “seven less than a number” is x − 7, not 7 − x.

Once the sentence is an equation, paste it into the calculator to check your algebra.

When there are more than two steps

Some equations need extra steps before they look like ax + b = c. The calculator handles these too and labels them as multi-step:

  • Variables on both sides. In 3x + 4 = x − 6, subtract x from both sides to get 2x + 4 = −6, then solve as normal: x = −5.
  • Terms to combine. 3x + 5 = 20 + x + x simplifies to 3x + 5 = 2x + 20 first.
  • More layers. (2x − 1)/3 + 4 = 9 takes four inverse operations: subtract 4, multiply by 3, add 1, divide by 2, giving x = 8.

If the variable cancels completely, you get either a false statement (no solution) or a true one (every number works).

Common mistakes with two-step equations

  1. Doing something to only one side. Every operation has to happen on both sides, or the balance breaks.
  2. Dividing before subtracting in ax + b = c. You can, but then you must divide every term: (3x + 5)/3 = 20/3 is correct but messier.
  3. Losing a negative sign. In −2x = 8, divide by −2, not 2. The answer is −4. The integer calculator walks through the sign rules if they’re shaky.
  4. Subtracting first when the addition is inside brackets. In (x + 3)/4 = 5, the 3 is stuck inside the fraction, so multiply by 4 first.
  5. Skipping the check. Substituting takes ten seconds and catches nearly every arithmetic slip.

Frequently Asked Questions

What is a two-step equation?+

An equation that takes two inverse operations to solve, usually one addition or subtraction and one multiplication or division. 3x + 5 = 20 is a classic example: subtract 5, then divide by 3, to get x = 5.

What order do you solve a two-step equation in?+

Reverse order of operations. Undo addition or subtraction first, then multiplication or division. The exception is when brackets or a fraction bar group things, as in (x + 3)/4 = 5, where you multiply by 4 first and subtract 3 second.

How do you solve a two-step equation with fractions?+

Multiply by the reciprocal. In (2/3)x + 1 = 5, subtract 1 to get (2/3)x = 4, then multiply both sides by 3/2 to get x = 6. You can also clear the fraction first by multiplying every term by the denominator.

How do you solve a two-step equation with a negative coefficient?+

Treat the negative sign as part of the number. In −2x + 7 = 15, subtract 7 to get −2x = 8, then divide by −2 to get x = −4. Dividing by a negative flips the sign of the answer.

How do I check my answer?+

Substitute it back into the original equation. If both sides give the same number, the answer is right. For 3x + 5 = 20 with x = 5: 3(5) + 5 = 15 + 5 = 20, which matches the right side.

What if the variable is on both sides?+

Move all the variable terms to one side first by adding or subtracting, then solve the two-step equation that's left. 3x + 4 = x − 6 becomes 2x + 4 = −6 after subtracting x, so x = −5.

Can an equation have no solution or infinitely many solutions?+

Yes. If the variable cancels and leaves something false, like 2 = 5, there's no solution. If it cancels and leaves something always true, like 2 = 2, every number is a solution. The calculator tells you which case you have.

Learn and practice this topic

Related calculators