How to Solve for x: Step-by-Step Guide With Worked Examples
To solve for x, get x alone on one side of the equals sign by doing the opposite operation to both sides. If x has 5 added to it, subtract 5 from both sides. If x is multiplied by 3, divide both sides by 3. Whatever you do to one side, you must do to the other, so the equation stays balanced. When x stands alone, the number on the other side is the answer.
This guide explains the idea in plain words with a picture of a balance scale, then walks through eight worked examples with real numbers, from one-step problems to problems with x on both sides. You will also find ways to use algebra in family life, tips for teaching it to a child, common mistakes and ten practice problems with answers. If you are new to this topic, you may find it helpful to look at our hub on how to calculate percentage first, and the guide on order of operations, since you will use it in every step below.

What Does “Solve for x” Mean?
An equation is a sentence in mathematics where two things are equal, like 7 + 3 = 10. In algebra, one of the numbers is hidden and a letter, usually x, stands for it. “Solve for x” means find the number that makes the equation true.
Think of a balance scale with a bag of unknown weight on one side. If one side holds x + 3 and the other holds 10, then the bag must weigh 7, because 7 + 3 = 10. Solving for x is a way of finding the missing weight without opening the bag.
The Golden Rule: Keep the Balance
The one rule that makes algebra work is this: do the same thing to both sides. If you take 4 grams off the left side of a balanced scale, take 4 grams off the right side as well. If you double the left, double the right. The scale stays level, and the equation stays true.
The operations come in opposite pairs, and we use them to undo each other.
| If the equation has… | Do this to both sides… |
|---|---|
| Addition (x + 5) | Subtract 5 |
| Subtraction (x − 5) | Add 5 |
| Multiplication (3x) | Divide by 3 |
| Division (x ÷ 4) | Multiply by 4 |
How to Solve for x: The 6 Steps
- Simplify each side. Remove brackets and combine like terms, following the order of operations.
- Collect the x terms on one side and the plain numbers on the other.
- Undo addition or subtraction first. Add or subtract the same number on both sides.
- Undo multiplication or division next. Divide or multiply both sides by the same number.
- Write the answer in the form x = number.
- Check your answer. Put the number back into the original equation. If both sides are equal, you are right.
Worked Example 1: One-Step Addition
Solve x + 8 = 15.
- x is joined to +8. Undo it by subtracting 8 from both sides.
- x + 8 − 8 = 15 − 8
- x = 7
- Check: 7 + 8 = 15. Correct.
Worked Example 2: One-Step Subtraction
Solve x − 6 = 11.
- Undo the subtraction by adding 6 to both sides.
- x − 6 + 6 = 11 + 6
- x = 17
- Check: 17 − 6 = 11. Correct.
Worked Example 3: One-Step Multiplication
Solve 4x = 36.
- 4x means 4 times x. Undo it by dividing both sides by 4.
- 4x ÷ 4 = 36 ÷ 4
- x = 9
- Check: 4 × 9 = 36. Correct.
Worked Example 4: One-Step Division
Solve x ÷ 5 = 12.
- Undo the division by multiplying both sides by 5.
- x ÷ 5 × 5 = 12 × 5
- x = 60
- Check: 60 ÷ 5 = 12. Correct.

Worked Example 5: Two-Step Equation
Solve 3x + 4 = 19.
- Undo the addition first. Subtract 4 from both sides: 3x = 15.
- Now undo the multiplication. Divide both sides by 3: x = 5.
- Check: 3 × 5 + 4 = 15 + 4 = 19. Correct.
Why do we undo addition first? Because we are working backwards through the order of operations, which does multiplication before addition. To unwrap a present, you take off the last layer first.
Worked Example 6: Two-Step With Subtraction
Solve 5x − 7 = 28.
- Add 7 to both sides: 5x = 35.
- Divide both sides by 5: x = 7.
- Check: 5 × 7 − 7 = 35 − 7 = 28. Correct.
Worked Example 7: x on Both Sides
Solve 6x + 2 = 2x + 18.
- Collect the x terms. Subtract 2x from both sides: 4x + 2 = 18.
- Subtract 2 from both sides: 4x = 16.
- Divide both sides by 4: x = 4.
- Check: left side 6 × 4 + 2 = 26. Right side 2 × 4 + 18 = 26. Both are 26. Correct.
Worked Example 8: Brackets
Solve 2(x + 3) = 20.
- Multiply out the bracket: 2x + 6 = 20.
- Subtract 6 from both sides: 2x = 14.
- Divide both sides by 2: x = 7.
- Check: 2 × (7 + 3) = 2 × 10 = 20. Correct.
There is a second way for this problem: divide both sides by 2 first, getting x + 3 = 10, then subtract 3 to get x = 7. Both routes reach the same answer, which is a good sign.
How to Solve for x With Fractions and Decimals
Fractions and decimals follow the same rules. Here are two quick examples.
Fraction example: x ÷ 2 + 3 = 8
- Subtract 3 from both sides: x ÷ 2 = 5.
- Multiply both sides by 2: x = 10.
- Check: 10 ÷ 2 + 3 = 5 + 3 = 8. Correct.
Decimal example: 2.5x = 10
- Divide both sides by 2.5.
- x = 10 ÷ 2.5 = 4.
- Check: 2.5 × 4 = 10. Correct.
Using Algebra in Everyday Family Life
Algebra sounds like a school subject, but families use the same thinking when they plan and share. These real-life problems give children a reason to care.
- Shopping. You buy 3 identical notebooks and a pen that costs 2. The total is 11. What does each notebook cost? 3x + 2 = 11, so 3x = 9 and x = 3.
- Cooking. A recipe needs 2 cups of flour for every 1 cup of milk. You have 6 cups of flour. How much milk? 2x = 6, so x = 3 cups.
- Sharing fairly. A mother shares 24 dates equally among her children and keeps 4. If each child gets 5, how many children? 5x + 4 = 24, so 5x = 20 and x = 4 children.
- Travel. A family drives at 60 kilometres an hour. How long to drive 180 kilometres? 60x = 180, so x = 3 hours.
- Garden. A plot is x metres wide and 8 metres long. The fence around it is 36 metres. 2x + 16 = 36, so 2x = 20 and x = 10 metres.
- Saving for a gift. A child has 12 coins and saves 3 each week. After how many weeks does the child have 33? 12 + 3x = 33, so 3x = 21 and x = 7 weeks.
Ask your child to make up their own story problem. Writing the equation from a story is half the skill of algebra.
Common Mistakes When Solving for x
- Doing the operation to only one side. The equation is no longer balanced.
- Wrong order. In 3x + 4 = 19, subtract 4 first. If you divide by 3 first, you must divide every term, including the 4 and the 19, which is easy to forget.
- Sign errors. When you move a number to the other side, its sign changes. +5 becomes −5.
- Forgetting to multiply the whole bracket. 2(x + 3) is 2x + 6, not 2x + 3.
- Not checking. A quick check catches most mistakes. Put your answer back and see if both sides match.
- Dividing by the wrong number. If x has a 7 in front of it, divide by 7, not by the number on the other side.
How to Teach Solving for x to a Child
Children understand algebra best when they see it. Start with objects, then pictures, then symbols.
- Use a real balance. A ruler on a pencil makes a simple scale. Put coins in cups to represent unknowns.
- Use mystery boxes. Hide a number of beans in a box. “A box and 3 beans equal 10 beans. How many are in the box?”
- Draw it. Draw two sides of a scale and write what is on each.
- Say the rule aloud. “Whatever I do to one side, I do to the other.”
- Let them check. Children enjoy proving their answer is right.
- Be patient and encouraging. A wrong step is a chance to learn, not a failure.
If you want to build confidence, our articles on how to help a child with math and how to study math offer more advice.
Practice Problems
Solve each one and check by putting your answer back into the equation. Answers follow.
- x + 9 = 20
- x − 4 = 13
- 7x = 56
- x ÷ 3 = 8
- 2x + 5 = 17
- 4x − 3 = 25
- 5x + 1 = 3x + 11
- 3(x + 2) = 27
- x ÷ 4 + 6 = 10
- 8x = 2x + 30
Answers
- x = 11
- x = 17
- x = 8
- x = 24
- x = 6
- x = 7
- x = 5 (2x = 10)
- x = 7 (x + 2 = 9)
- x = 16 (x ÷ 4 = 4)
- x = 5 (6x = 30)
Frequently Asked Questions
What is the first step in solving for x?
Simplify each side, then move the plain numbers to one side using opposite operations. Undo addition and subtraction before multiplication and division.
How do you solve for x with x on both sides?
Subtract the smaller x term from both sides so all the x terms are on one side, then solve as usual.
Can x be a negative number or a fraction?
Yes. For example, x + 5 = 2 gives x = −3, and 2x = 1 gives x = 1/2.
Why do we use the letter x?
It is a tradition. Any letter can stand for an unknown number.
How do I know my answer is right?
Put it back into the original equation. If the left side equals the right side, you have the right answer.
A Last Word
Solving for x is a skill of patience and balance. Take one step at a time, keep both sides fair, and check your work. With a little practice each day, a child who found algebra scary can become the one who explains it to a younger brother or sister. Teaching someone else is the best way to learn, and it brings the whole family closer around the table.
