Try it with your numbers
Show every step
Everything on this page grows from one idea: an equation is a balance, and the same operation to both sides keeps it level. Parentheses, fractions and the strange cases with no answer are all variations on that move. If single steps still feel shaky, a quick look at solving two-step equations will make this page much easier.
How do you solve equations with variables on both sides?
The target is always the shape , where one variable term sits alone on one side and a number sits on the other. The only new decision, compared with simpler equations, is which variable term to remove. Here is the full routine:
- Simplify each side (distribute, then combine like terms).
- Subtract one variable term from both sides so appears once.
- Add or subtract the constant so numbers sit on the other side.
- Divide by the coefficient.
- Substitute back into the original equation.
Example 1. Solve .
Check: the left side is and the right side is .
Steps 3 and 4 are the same moves from solving one-step equations, applied twice. You will often hear that a term “moves across the equals sign and changes sign”. That phrase is shorthand. What actually happens is that you subtract (or add) the term on both sides, and the sign change is a side effect of cancelling. Students who think of it as teleporting tend to forget the term on the other side.
Quick check
Answer:
Is there a shortcut formula for variables on both sides?
Yes, and it comes from doing the routine once with letters. Start with . Subtract and from both sides to get . Divide by :
In words: the difference of the constants divided by the difference of the coefficients, both taken in the same direction (right minus left in the numerator, left minus right in the denominator). Solving an equation for a letter in terms of other letters is exactly the skill behind solving literal equations.
For we have , , , :
If , the denominator is and the variable terms cancel. That is the no-solution and all-numbers situation covered below.
The formula is best used as a second opinion, not a replacement for the steps. It also explains the usual advice to move the smaller variable term. On , subtracting gives , then , so with no negatives anywhere. Subtracting instead gives , then , and you must divide by a negative. Same answer, more chances to slip.
Variables on both sides with parentheses and negatives
Distribute first, combine second, collect third. Doing the steps out of order is the most common reason a correct idea produces a wrong answer.
Example 2. Solve .
Check: the left side is and the right side is .
A minus in front of parentheses flips every term inside: , not and not .
Notice that the variable ended up on the right in . That is fine. The equals sign works in both directions, so and say the same thing. When equations grow longer, the habit of simplifying each side completely before moving anything is the core of solving multi-step equations.
Variables on both sides with fractions and decimals
Fractions look harder but cost only one extra step: clear them first. Multiply every term on both sides by the least common denominator, and the equation becomes whole numbers.
Example 3. Solve .
The least common denominator of 2 and 3 is 6.
Check: the left side is and the right side is .
The trap here is multiplying the fractions but forgetting the plain numbers. The 3 and the 5 must be multiplied by 6 as well, giving 18 and 30. Decimals work the same way with powers of ten. For , multiply everything by 10 to get . Then , so . Check: and .
This only applies when is in the numerator. If sits in a denominator, the equation is a different type and needs extra care, covered in solving rational equations.
What if the variables cancel? No solution or all numbers

Sometimes the variable terms vanish together. What remains is a statement with no at all, and that statement is either true or false.
Take . Subtracting leaves , which is false for every , so the equation has no solution. Now take . Distributing gives , and subtracting leaves , which is always true, so every real number works. This is called an identity.
| Last line | Meaning | Solution set |
|---|---|---|
| always true | all real numbers | |
| never true | no solution | |
| true for one value | one solution |
The costly mistake is reading as . A true statement without says nothing about being zero. Both cases happen exactly when the coefficients match ( in the shortcut formula): equal constants give an identity, unequal constants give no solution.
The same idea carries into inequalities. For the last line is true, so every real number works, written in interval notation. The rules for solving linear inequalities add one more twist: dividing by a negative flips the inequality sign.
Quick check
Answer: All real numbers
How do you check an answer with variables on both sides?
Substitute your answer into the original equation, not into a later line, and evaluate each side separately. If the two numbers match, the answer is right. If they differ, an error happened somewhere, and the size of the gap often hints where.
Checking against the original catches mistakes in your own steps. For example, if a solver reports for , the left side is and the right side is . They do not match, so the answer is wrong, and the sign was probably lost when dividing by .
Try this: Pick a secret answer, say . Write on the left and on the right, and confirm both equal 26 when . Then solve without looking and see whether you land back on 6.
Three independent checks are worth building into your routine:
- Substitute into the original equation.
- Solve again by moving the other variable term and compare.
- Run the shortcut formula as a third opinion.
If you want more repetitions with answers to compare against, the multi-step equations practice problems are a good next stop.
Where do variables on both sides show up in real life?
Whenever two things change at different rates and you want the moment they match. Each side of the equation is a cost, a distance or an amount that depends on the same unknown, and solving finds the break-even point.
Example 4. Rental A charges a flat fee of 40 dollars plus dollars per mile. Rental B charges 25 dollars plus dollars per mile. For how many miles do they cost the same?
Check: both cost dollars at 100 miles. Rental B is cheaper for short trips because its fee is lower, and Rental A wins past 100 miles because its per-mile rate is lower.
Graphically, each side is a line written in slope-intercept form, and the solution is the -coordinate where the lines cross. Here they cross at . Parallel lines never cross, which is the no-solution case, and two copies of the same line overlap everywhere, which is the identity case. Turning sentences into equations like these is the focus of linear equation word problems.
Quick check
Answer: 4 months
When variables on both sides are not a linear equation
Once is squared or sits inside an absolute value, the “collect and divide” routine is no longer enough. Linear equations have one, none, or infinitely many solutions. Other types can have two.
For , move everything to one side and factor:
Check: and . Both work. The trap is dividing both sides by . For , dividing by gives and silently loses the solution . Moving the terms first gives , which keeps both answers. When factoring is awkward, the quadratic formula practice problems cover the general method.
Absolute values need a different habit: split into cases and check each. For , the case gives , which checks since . The case gives , but then , and an absolute value cannot equal a negative number. That answer is extraneous. The full method is in solving absolute value equations.
Practice problems
0 of 5 solved
- Solve .
Answer:
Subtract from both sides: . Subtract 5: . Divide by 4: . - Solve .
Answer:
Add to both sides: . Add 16: . Divide by 8: . - Solve .
Answer:
Distribute: . Subtract : . Add 8: , so . - Solve .
Answer:
Multiply every term by 4: . Subtract : . Add 8: . - Solve .
Answer:
Simplify each side: . Subtract : . Add 13: . Check: both sides equal 47.
Common questions
Does it matter which side you move the variable to?
No. Both choices give the same answer. Moving the smaller variable term keeps the remaining coefficient positive, which avoids dividing by a negative and prevents sign slips.
What does it mean when you get 0 = 0 while solving?
The two sides are the same expression, so every real number is a solution. It does not mean . A false statement such as means the opposite: no solution exists.
How do you solve variables on both sides when there are parentheses?
Distribute first, then combine like terms on each side, and only then collect the variable terms. Watch negative signs in front of parentheses, since they change every term inside.
How do you solve equations with variables on both sides and fractions?
Multiply every term on both sides by the least common denominator. That turns the equation into whole numbers, and you then solve it the usual way.
What is the first step when the variable is on both sides?
Simplify each side by distributing and combining like terms. After that, subtract one variable term from both sides so the variable appears on only one side.
Can an equation with variables on both sides have two answers?
A linear one cannot: it has one solution, none, or infinitely many. Two answers can appear when the variable is squared or inside an absolute value, because then the equation is no longer linear.