How to Solve for X
To solve for x is to isolate it: get x alone on one side by undoing, in reverse order, everything that was done to it — while doing every move to both sides so the equation stays balanced. The solve for x calculator above applies exactly those moves and shows them; this section teaches the pattern with verified examples so you can do it by hand and recognise wrong answers on sight.
Worked Example 1: x on Both Sides — 5x − 3 = 2x + 9
Subtract 2x from both sides: 3x − 3 = 9. Add 3 to both sides: 3x = 12. Divide by 3: x = 4. Check by substitution: 5(4) − 3 = 17 and 2(4) + 9 = 17 — both sides agree, so x = 4 is right. The substitution check takes ten seconds and catches nearly every sign slip; make it a habit, not an afterthought.
Worked Example 2: Fractions and Brackets
For x/4 + 2 = 7: subtract 2 (x/4 = 5), then multiply by 4 — x = 20 (check: 20/4 + 2 = 7 ✓). For 3(x − 2) = 2x + 5: either expand first (3x − 6 = 2x + 5 → x = 11; check: 3 × 9 = 27 = 22 + 5 ✓) — brackets always come before collecting terms. For the proportion (x + 1)/3 = (x − 2)/2: cross-multiply, 2(x + 1) = 3(x − 2), giving x = 8 (check: 9/3 = 6/2 ✓). Three shapes, one idea: peel the operations off x from the outside in.
When x Has Two Answers
Quadratics solve differently: bring everything to one side and factor. 2x² = 8x becomes 2x² − 8x = 0 = 2x(x − 4), so x = 0 or x = 4 — both substitute back cleanly (0 = 0; 32 = 32). The trap: dividing both sides by x "to simplify" deletes the x = 0 answer silently. For quadratics that will not factor, the quadratic formula calculator finishes the job; for two equations at once, the system of equations solver handles the pair. The equation chapter of OpenStax's Elementary Algebra teaches the balance method from first principles.
Worked Example 3: Decimals and a Negative Answer
Solve 4.5x + 3 = 2x − 9.5. The routine does not change when decimals arrive: gather the x terms on one side and the numbers on the other. Subtract 2x from both sides: 2.5x + 3 = −9.5. Subtract 3 from both sides: 2.5x = −12.5. Divide by 2.5: x = −5. A negative answer is not a warning sign — it is just a number, and the check proves it: 4.5(−5) + 3 = −22.5 + 3 = −19.5, and 2(−5) − 9.5 = −19.5. Both sides match, so x = −5 is right. If decimals slow you down, multiply the whole equation by 10 first — 45x + 30 = 20x − 95 — and solve the integer version instead; scaling every term by the same number never changes the solution.
Solving for a Letter in a Formula
Science and geometry homework often asks you to solve for a letter that is not x at all: rearrange the formula first, then substitute. The volume of a box is V = l·w·h; to solve for the height, divide both sides by l·w, giving h = V/(l·w). Only then do numbers enter: a box with V = 240 cm³, l = 10 cm and w = 6 cm has h = 240/60 = 4 cm. The moves are the same inverse operations as any solve-for-x problem — the letters simply stay letters until the last line. This is why teachers call it a literal equation: you are solving for one symbol in terms of the others, and the answer is a formula, not a number. The same pattern rearranges P = 2l + 2w into l = (P − 2w)/2, and the simple interest formula I = Prt into r = I/(Pt) — one rearrangement, endlessly reusable.
Three Solve-for-X Traps
- Operating on one side only. Every move applies to both sides — the equation is a balance, and one-sided moves unbalance it into a different (wrong) problem.
- Undoing in the wrong order. Addition is undone before division: for 3x + 6 = 21, subtract 6 first (3x = 15, x = 5), because the +6 was applied after the ×3 when the expression was built.
- Sign slips when moving terms. A term crossing the equals sign flips its sign: moving +9 in 5x = 2x + 9 gives 5x − ... — write the move explicitly (subtract 2x from both sides) instead of mentally "carrying" terms.
Every equation type — linear, radical, rational, exponential — is catalogued with a solved example in our guide to the types of equations, and stuck-anywhere rescue steps are in problem-solving strategies.