Back to Blog
    Math

    How to Solve for x Step by Step (Brackets, Fractions, Decimals)

    Y
    Ytools Team
    October 2, 2026 4 min read
    Share →
    Solve for x in 4 moves — 2(5x+6) = 17 gives x = 1/2

    "Solve for x" means finding the value of the unknown that makes both sides of the equation equal. For linear equations — where xx appears only to the first power — the same four moves work every time, whether the equation has brackets, fractions, decimals or xx on both sides. Below you'll find the method and five worked examples taken from the kinds of equations students actually search for.

    The golden rule: do the same to both sides

    An equation is a balance. Whatever you do to one side — add, subtract, multiply or divide by a non-zero number — you must do to the other. Each move produces a simpler equation with the same solution.

    The 4-move method (+ check)

    The four moves for solving linear equations: expand, collect, isolate, divide, then check
    The four moves for solving linear equations: expand, collect, isolate, divide, then check
    1. Expand — remove brackets using the distributive property: a(b+c)=ab+aca(b+c) = ab + ac.
    2. Collect — gather xx-terms on one side and numbers on the other.
    3. Isolate — use addition or subtraction to leave the xx-term alone.
    4. Divide — divide by the coefficient of xx.
    5. Check — substitute your answer into the original equation.

    Worked examples

    Example 1 — brackets: 2(4z+8)=−402(4z + 8) = -40

    Worked solution of 2(4z+8) = −40 giving z = −7 with substitution check
    Worked solution of 2(4z+8) = −40 giving z = −7 with substitution check
    1. Expand: 8z+16=−408z + 16 = -40
    2. Subtract 16 from both sides: 8z=−568z = -56
    3. Divide by 8: z=−7z = -7
    4. Check: 2(4(−7)+8)=2(−28+8)=2(−20)=−402(4(-7)+8) = 2(-28+8) = 2(-20) = -40 ✓

    The same method solves 2(4y+3)=−422(4y+3) = -42 (answer y=−6y=-6) and 4(2y−4)=−404(2y-4) = -40 (answer y=−3y=-3). Try them before reading on.

    Example 2 — the answer is a fraction: 2(5x+6)=172(5x + 6) = 17

    1. Expand: 10x+12=1710x + 12 = 17
    2. Subtract 12: 10x=510x = 5
    3. Divide by 10: x=510=12x = \frac{5}{10} = \frac{1}{2}
    4. Check: 2(5⋅12+6)=2(8.5)=172(5 \cdot \tfrac12 + 6) = 2(8.5) = 17 ✓

    Answers don't have to be whole numbers. Leave them as simplified fractions unless the question asks for decimals.

    Example 3 — a fractional coefficient: 39=57c+2439 = \frac{5}{7}c + 24

    1. Subtract 24 from both sides: 15=57c15 = \frac{5}{7}c
    2. Multiply both sides by 75\frac{7}{5} (the reciprocal): c=15×75=21c = 15 \times \frac{7}{5} = 21
    3. Check: 57(21)+24=15+24=39\frac{5}{7}(21) + 24 = 15 + 24 = 39 ✓

    Tip: multiplying by the reciprocal of the coefficient is the same as dividing by it, and it keeps fractions tidy.

    Example 4 — decimals: −2.4−0.6x=−1.26-2.4 - 0.6x = -1.26

    1. Add 2.4 to both sides: −0.6x=1.14-0.6x = 1.14
    2. Divide by −0.6-0.6: x=1.14−0.6=−1.9x = \frac{1.14}{-0.6} = -1.9
    3. Check: −2.4−0.6(−1.9)=−2.4+1.14=−1.26-2.4 - 0.6(-1.9) = -2.4 + 1.14 = -1.26 ✓

    If decimals make you nervous, multiply every term by 100 first: −240−60x=−126-240 - 60x = -126. The answer is the same.

    Example 5 — variable on both sides: −0.66(j+1)+7.48j=6.71j-0.66(j+1) + 7.48j = 6.71j

    1. Expand: −0.66j−0.66+7.48j=6.71j-0.66j - 0.66 + 7.48j = 6.71j
    2. Collect jj-terms on the left: 6.82j−0.66=6.71j6.82j - 0.66 = 6.71j
    3. Subtract 6.71j6.71j from both sides: 0.11j−0.66=00.11j - 0.66 = 0
    4. Add 0.66: 0.11j=0.660.11j = 0.66
    5. Divide: j=6j = 6
    6. Check: −0.66(7)+7.48(6)=−4.62+44.88=40.26-0.66(7) + 7.48(6) = -4.62 + 44.88 = 40.26 and 6.71(6)=40.266.71(6) = 40.26 ✓

    A simpler one to practise: 3t−2+t=4−7t3t - 2 + t = 4 - 7t gives 4t−2=4−7t4t - 2 = 4 - 7t, so 11t=611t = 6 and t=611t = \frac{6}{11}.

    Special cases: no solution and infinitely many solutions

    Sometimes the variable disappears:

    • 2(x+3)=2x+52(x + 3) = 2x + 5 → 2x+6=2x+52x + 6 = 2x + 5 → 6=56 = 5, which is false. No solution.
    • 2(x+3)=2x+62(x + 3) = 2x + 6 → 6=66 = 6, always true. Infinitely many solutions (every xx works).

    Common mistakes

    • Expanding only the first term: 2(4z+8)2(4z+8) is 8z+168z + 16, not 8z+88z + 8.
    • Sign errors when moving terms: subtracting 16 from −40-40 gives −56-56, not −24-24.
    • Dividing only part of a side: in 8z=−568z = -56, divide the whole right side by 8.
    • Checking in a later line instead of the original equation — a mistake made earlier won't show up.

    Solve for x with a calculator that shows steps

    When you want to check your work, enter the equation in the linear equation solver and compare each line with the four moves. Our linear equation solver guide explains how to type equations with brackets and fractions. Once one unknown is comfortable, move on to two equations with two unknowns or quadratic equations.

    FAQ

    How do you solve for x step by step? Expand brackets, collect like terms, isolate the xx-term, divide by its coefficient, then substitute back to check.

    How do I solve for y instead of x? Exactly the same way — the letter doesn't matter. Treat yy, zz, cc or jj as the unknown.

    What if x is on both sides? Move all xx-terms to one side (by adding or subtracting them) before isolating.

    How do I solve equations with fractions? Multiply both sides by the reciprocal of the coefficient, or multiply every term by the lowest common denominator to clear the fractions first.

    Can an equation have no solution? Yes. If the variable cancels and you're left with a false statement like 6=56=5, there is no solution.

    Is there a solve for x calculator with steps? Yes — the linear equation solver shows each step so you can compare it with your own working.

    Conclusion

    Expand, collect, isolate, divide — then check. Those four moves solve every linear equation, from 2(4z+8)=−402(4z+8) = -40 to equations with decimals and unknowns on both sides. Practise a few by hand, then use the solver to confirm.

    Further reading: OpenStax Elementary Algebra 2e, chapter 2.