Solving x + a = b Equation Solver with Worked Examples

To solve , subtract from both sides: . Type an equation such as and the solver shows each step.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

  • what an equation is
  • adding and subtracting whole numbers, decimals and negatives
  • the idea of an inverse operation

What Solving x + a = b means

An equation is a balance. Whatever you do to one side you must do to the other. To get on its own, undo the “plus ” by subtracting from both sides.

The same idea works when numbers are decimals or negative, and it is the first step in solving every harder linear equation.

Check your answer by substituting it back into the original equation. The multiplicative version is solving ax = b, the two-step version is solving ax + b = c, and a formula is rearranged in rearranging y = mx + c for x. A closely connected idea is Solving ax + b = cx + d.

This page is part of Linear equations in Algebra. Topics that work alongside it: Solving ax = b, Solving ax + b = c, Rearranging y = mx + c for x, Solving a(x + b) = c, Solving x/a + b = c and Solving (x + a)/b = c.

What is it used for?

The simplest type of equation: one operation has been added to x, and you undo it by doing the opposite to both sides.

How to use solving x + a = b

  1. Write the equation .
  2. Subtract from both sides.
  3. Simplify to get .
  4. Substitute back to check.

Graph

Solving x + 3 = 8x = 5-10123456780246810Solving x + 3 = 8xyy = x + 3y = 8Graph with x from -1 to 8 and y from -1 to 11. Shows the curve y = x + 3; the curve y = 8; point x = 5 at (5, 8).

The line y = x + 3 meets y = 8 where x = 5.

Worked examples

The examples marked with a button were worked out by the solver on this page. You can try each one yourself.

Example 1: a whole-number answer

Solve .

Linear equation Answer checked
Answer
x=5x = 5
  1. The equation
    Solving for .
  2. Move everything to one side
  3. Simplify
  4. Isolate
    Subtract the constant from both sides.
  5. Divide both sides by
  6. Check by substituting back
    ✓

Example 2: subtracting a number

Solve . Here you add 3 to both sides.

Linear equation Answer checked
Answer
x=13x = 13
  1. The equation
    Solving for .
  2. Move everything to one side
  3. Simplify
  4. Isolate
    Subtract the constant from both sides.
  5. Divide both sides by
  6. Check by substituting back
    ✓

Example 3: with decimals

Solve .

Linear equation Answer checked
Answer
x=6.5x = 6.5
  1. The equation
    Solving for .
  2. Move everything to one side
  3. Simplify
  4. Isolate
    Subtract the constant from both sides.
  5. Divide both sides by
  6. Check by substituting back
    ✓

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

Subtract to undo adding

x + 7 = 12: x = 12 − 7 = 5

Subtract 7 from both sides.

Add to undo subtracting

x − 3 = 10: x = 10 + 3 = 13

Add 3 to both sides.

Decimals

x + 2.5 = 9: x = 6.5

Same method with decimals.

A negative answer

x + 12 = 5: x = −7

The answer can be negative.

Word problems

To solve x + a = b, do the opposite of what has been done to x. Whatever you do to one side, do to the other.

A whole-number answer

Solve x + 7 = 12.

  1. Subtract 7 from both sidesx = 12 − 7
  2. Calculatex = 5
  3. Check: 5 + 7 = 12 ✓x = 5.

Subtracting a number

Solve x − 3 = 10.

  1. Add 3 to both sidesx = 10 + 3
  2. Calculatex = 13
  3. Check: 13 − 3 = 10 ✓x = 13.

A word problem Higher

A number plus 18 is 45. Find the number.

  1. Write the equationx + 18 = 45
  2. Subtract 18x = 27
  3. Check: 27 + 18 = 45 ✓The number is 27.

With decimals Higher

Solve x + 2.5 = 9.

  1. Subtract 2.5x = 9 − 2.5
  2. Calculatex = 6.5
  3. Check: 6.5 + 2.5 = 9 ✓x = 6.5.

Common mistakes

Adding when you should subtract

x + 7 = 12 gives x = 19 ✗

x = 12 − 7 = 5 ✓

Do the inverse.

Changing one side only

x = 12 and the 7 vanishes ✗

subtract 7 from both sides ✓

Keep the balance.

Sign error with subtraction

x − 3 = 10 gives x = 7 ✗

x = 10 + 3 = 13 ✓

Undo minus by adding.

Not checking

no substitution ✗

substitute back ✓

It takes seconds.

Exam tips

  1. Do the inverse operation.
  2. Both sides every time.
  3. Check by substituting.
  4. Negative answers are fine.
  5. Write each step on a new line.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Solve x + 4 = 11 Foundation

x = 11 − 4 = 7

2. Solve x + 9 = 20 Foundation

x = 20 − 9 = 11

3. Solve x − 6 = 5 Foundation

x = 5 + 6 = 11

4. Solve x − 8 = 3 Higher

x = 3 + 8 = 11

5. Solve x + 3.5 = 10 Higher

x = 10 − 3.5 = 6.5

6. Solve x + 12 = 5 Higher

x = 5 − 12 = −7

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Equation
Two expressions joined by an equals sign.
Solution
The value that makes it true.
Inverse operation
An operation that undoes another.
Balance
Both sides stay equal.
Unknown
The letter to find.
Substitute
Put a value in place of a letter.

Frequently asked questions

How do you solve x + 7 = 12?

Subtract 7 from both sides to get x = 5.

How do you solve x − 3 = 10?

Add 3 to both sides to get x = 13.

What is the inverse of addition?

Subtraction.

What is the golden rule of solving equations?

Do the same to both sides.

How do I check my solution?

Substitute it back into the original equation.

What is the next step up?

solving ax = b.

More in Algebra and the formula sheets.