Equations with Variables on Both Sides: How to Solve Them

#8th Grade Math#Expressions and Equations#Equations with Variables on Both Sides
TL;DR
To solve equations with variables on both sides, subtract one x term from both sides, then finish as a two-step equation. Clear fractions or parentheses first, and check the answer.
Bhanzu TeamLast updated on December 2, 202617 min read

Key Points

  • Equations with variables on both sides are linear equations with the unknown on each side of the equals sign, such as 6x+5=2x+216x + 5 = 2x + 21.
  • Subtracting the smaller variable term from both sides keeps the equation balanced and leaves an ordinary two-step equation.
  • The solution is the one input where two expressions give the same output, so 6x+56x + 5 and 2x+212x + 21 both equal 29 when x=4x = 4.
  • An equation whose variable terms cancel has no solution when the leftover reads 6=26 = 2 and infinitely many when it reads 7=77 = 7.
  • Multiplying every term on both sides by the least common denominator clears fractions, and multiplying by 100 clears two-place decimals.

A 1,200-year-old word for balancing

Around 1,200 years ago, a scholar in Baghdad gave this exact move a name.

Muhammad ibn Musa al-Khwarizmi titled his book on equations with two words. The MacTutor History of Mathematics archive explains that one of them, al-muqabala, meant "balancing," the cancelling of matching terms that sit on both sides of an equation. That title gave English the word algebra.

Three bags of marbles plus 4 loose marbles balance one bag plus 10 loose ones, and every bag holds the same number. Lift one bag off each pan and the scale stays level, which leaves two bags against 6 extra marbles, so each bag holds 3.

Physicists use the same move to find when one runner catches another, and economists use it to find where two price plans cost the same.

Balance scale model of equations with variables on both sides, 3x + 4 = x + 10.
A level balance scale with three x bags and 4 marbles on the left pan and one x bag and 10 marbles on the right pan, showing 3x + 4 = x + 10.

What are equations with variables on both sides?

Equations with variables on both sides are linear equations where the unknown, usually xx, appears on each side of the equals sign. You solve them by gathering every xx term on one side. A variable term is a number multiplied by the variable, such as 6x6x, and that number is its coefficient. A plain number such as 5 is a constant, and terms with the same variable, like 6x6x and 2x2x in 6x+5=2x+216x + 5 = 2x + 21, are like terms that combine once they share a side.

In 8th grade, Common Core standard 8.EE.C.7 asks your child to solve linear equations in one variable, including ones with fraction or decimal coefficients and ones that need the distributive property. It builds on the two-step equation word problems of 7th grade, where xx appeared once, as in 3x+5=203x + 5 = 20. Algebra also made up 28 percent of the grade 8 questions on the 2024 National Assessment of Educational Progress (NAEP), more than any other content area, according to the NCES breakdown of NAEP questions.

How do you solve equations with variables on both sides?

Solve them by doing the same thing to both sides until xx stands alone, starting with the smaller xx term. That one move turns the problem into a two-step equation, and these are one family of multi-step equations.

  1. Simplify each side. Use the distributive property to clear parentheses, then combine like terms on the same side.
  2. Collect the variable terms. Subtract (or add) one xx term on both sides so that xx appears on one side only.
  3. Collect the constants. Undo the plain number on the xx side with its inverse operation, on both sides.
  4. Divide both sides by the coefficient of xx.
  5. Check the answer in the original equation.

Here are those steps on 6x+5=2x+216x + 5 = 2x + 21, one move per line, so every change to the equation is easy to follow.

6x+5=2x+216x + 5 = 2x + 21

Subtract 2x2x from both sides, which undoes adding 2x2x.

4x+5=214x + 5 = 21

Subtract 5 from both sides.

4x=164x = 16

Divide both sides by 4.

x=4x = 4

Check.

6(4)+5=29=2(4)+216(4) + 5 = 29 = 2(4) + 21
Step-by-step solution of 6x + 5 = 2x + 21 with the same move made on both sides.
Four stacked lines solving 6x + 5 = 2x + 21, labeled subtract 2x from both sides, subtract 5 from both sides and divide both sides by 4, ending at x = 4.

Either side works, and the answer comes out the same. OpenStax calls choosing the side with the larger coefficient a helpful approach that usually makes the arithmetic easier, since the xx term stays positive (subtracting 6x6x instead leaves −16=−4x-16 = -4x, still x=4x = 4). A common first instinct is to always move xx to the left, and Example 2 shows what that habit costs. A 2015 practice guide from the Institute of Education Sciences (IES) recommends that students learn to choose between strategies like these on purpose.

Some classes teach a shortcut called transposing: move a term across the equals sign and change its sign. That is the balance move written faster. Every version of the method meets one limit. When both sides carry the same coefficient, subtracting removes xx completely, and the leftover line decides the answer.

Why does collecting the x terms work?

Collecting works because each side names the same number, so taking equal amounts from both sides keeps them equal. That rule is the subtraction property of equality, and the balance model pictures it as two pans that stay level when one xx bag leaves each.

Each side is also a rule that turns an input xx into an output, and the solution is the one input where the two rules agree.

xx 6x+56x + 5 2x+212x + 21 Gap (right minus left)
0 5 21 16
1 11 23 12
2 17 25 8
3 23 27 4
4 29 29 0
5 35 31 −4-4

The left side grows by 6 for each step in xx and the right side grows by 2, so the gap shrinks by 6−2=46 - 2 = 4 every step. A gap of 16 closing 4 at a time closes after 16÷4=416 \div 4 = 4 steps. That is the arithmetic of 4x=164x = 16 in disguise.

Two lines meeting at x = 4, where both sides of the equation are equal.
Graph of y = 6x + 5 and y = 2x + 21 for x from 0 to 6 and y from 0 to 45, with the two lines crossing at the point (4, 29).

A table finds this answer only because it is a whole number. The answer to 3x+1=x+83x + 1 = x + 8 is 3.53.5, which no whole-number row shows, so collecting is the route that always works, the one behind solving linear equations of every kind. In high school, this tie-finding locates where a line meets a curve.

Try It Yourself

Tap a move to take the same thing off both pans of the balance, and watch the equation under the scale change with each tap. Keep going until one pan holds only xx bags and the other holds only marbles, then share the marbles equally to find xx. The Hint button suggests a useful next move if you get stuck.

How do you solve equations with fractions and decimals on both sides?

Clear the fractions or decimals first, then solve as usual. For fractions, multiply every term on both sides by the least common denominator (LCD), the smallest number that every denominator divides into. For decimals, multiply every term by a power of 10, such as 10 or 100, whichever turns the longest decimal into a whole number.

34x−1=12x+2\frac{3}{4}x - 1 = \frac{1}{2}x + 2

The LCD of 4 and 2 is 4. Multiply every term on both sides by 4, including the 1 and the 2.

3x−4=2x+83x - 4 = 2x + 8

Subtract 2x2x from both sides, then add 4 to both sides.

x=12x = 12

Check.

34(12)−1=8=12(12)+2\frac{3}{4}(12) - 1 = 8 = \frac{1}{2}(12) + 2

Children who are steady with whole numbers often stall at the first fraction, and the LCD step removes that wall before the algebra starts. The plain numbers are the terms that get skipped (they have no denominator to remind anyone).

Examples of equations with variables on both sides

Example 1

Solve 7x+3=4x+187x + 3 = 4x + 18.

Subtract 4x4x from both sides.

3x+3=183x + 3 = 18

Subtract 3 from both sides.

3x=153x = 15

Divide both sides by 3.

x=5x = 5

Check.

7(5)+3=38=4(5)+187(5) + 3 = 38 = 4(5) + 18

Example 2

Solve 3x−7=8x+133x - 7 = 8x + 13.

The tempting move is to carry 8x8x over to the left and keep its plus sign. That gives 3x+8x−7=133x + 8x - 7 = 13, then 11x=2011x = 20 and x=2011x = \frac{20}{11}.

Checking shows the trouble, since the left side becomes −1711-\frac{17}{11} and the right side 30311\frac{303}{11}. Moving a term across the equals sign is really subtracting it from both sides, so its sign has to change.

The correct method starts on the side with the larger coefficient. Subtract 3x3x from both sides.

−7=5x+13-7 = 5x + 13

Subtract 13 from both sides.

−20=5x-20 = 5x

Divide both sides by 5.

x=−4x = -4

Check.

3(−4)−7=−19=8(−4)+133(-4) - 7 = -19 = 8(-4) + 13

Example 3

Solve 4(2x−3)=5x+94(2x - 3) = 5x + 9.

Distribute the 4 to both terms inside the parentheses.

8x−12=5x+98x - 12 = 5x + 9

Subtract 5x5x from both sides.

3x−12=93x - 12 = 9

Add 12 to both sides.

3x=213x = 21

Divide both sides by 3.

x=7x = 7

Check.

4(2⋅7−3)=44=5(7)+94(2 \cdot 7 - 3) = 44 = 5(7) + 9

Example 4

Solve 23x+4=16x+7\frac{2}{3}x + 4 = \frac{1}{6}x + 7.

The LCD of 3 and 6 is 6. Multiply every term on both sides by 6.

4x+24=x+424x + 24 = x + 42

Subtract xx from both sides, then subtract 24 from both sides.

3x=183x = 18

Divide both sides by 3.

x=6x = 6

Check.

23(6)+4=8=16(6)+7\frac{2}{3}(6) + 4 = 8 = \frac{1}{6}(6) + 7

Example 5

Solve 0.4x+1.5=0.25x+2.70.4x + 1.5 = 0.25x + 2.7.

The longest decimal has two places, so multiply every term on both sides by 100.

40x+150=25x+27040x + 150 = 25x + 270

Subtract 25x25x from both sides, then subtract 150 from both sides.

15x=12015x = 120

Divide both sides by 15.

x=8x = 8

Check.

0.4(8)+1.5=4.7=0.25(8)+2.70.4(8) + 1.5 = 4.7 = 0.25(8) + 2.7

Example 6

Maya has $45 and saves $6 each week. Diego has $93 and saves $2 each week. After how many weeks will they have the same amount?

Let ww stand for the number of weeks.

Words in the problem Math it means
Maya has $45 a starting amount of 45
saves $6 each week 6w6w added to Maya's amount
Diego has $93 and saves $2 each week 93+2w93 + 2w
the same amount ==
after how many weeks solve for ww
45+6w=93+2w45 + 6w = 93 + 2w

Subtract 2w2w from both sides, then subtract 45 from both sides.

4w=484w = 48

Divide both sides by 4.

w=12w = 12

After 12 weeks, each of them has $117.

45+6(12)=117=93+2(12)45 + 6(12) = 117 = 93 + 2(12)

The reason x lands on both sides

An equation gets an xx on each side whenever two amounts growing at different speeds are set equal, and solving it finds the moment they match. Without the method, you would be stuck guessing or filling in a table row by row.

  • Two savers. Maya and Diego in Example 6 start $48 apart and close the gap by $4 a week.
  • Two phone plans. A plan at $20 a month plus $0.10 per text matches one at $5 plus $0.25 per text when 20+0.10t=5+0.25t20 + 0.10t = 5 + 0.25t, which gives t=100t = 100 texts ($30 each).
  • Two runners. A walker with a 300-meter head start at 80 meters per minute meets a runner at 140 meters per minute when 300+80t=140t300 + 80t = 140t, after 5 minutes.

Each story is the same move: set the two amounts equal, then subtract the part both sides share. Later this year, systems of equations word problems turn stories like these into pairs of equations with two unknowns.

What most guides miss about equations with variables on both sides

The last line matters as much as the steps, because when the xx terms cancel, the line that is left tells you how many solutions there are. The Common Core wording lists three possible endings: x=ax = a, a=aa = a, or a=ba = b, where aa and bb are different numbers.

Ending Example What it means
x=0x = 0 5x+7=2x+75x + 7 = 2x + 7 gives 3x=03x = 0 one solution, the number zero
A true statement 3(x+2)+1=3x+73(x + 2) + 1 = 3x + 7 gives 7=77 = 7 every number works
A false statement 2(2x+3)=4x+22(2x + 3) = 4x + 2 gives 6=26 = 2 no number works

This distinction is genuinely confusing, because x=0x = 0 and 0=00 = 0 look almost alike. The first is a real answer, since both sides of 5x+7=2x+75x + 7 = 2x + 7 equal 7 when xx is 0. A line like 0=00 = 0 says nothing about xx at all, so every number passes.

Where do equations with variables on both sides go wrong?

Mistake 1: Removing an x term from one side only

Where it slips in: Step 2, the first collecting move. Children often cross out the matching term, and crossing out feels like a one-side action.

Don't do this: In 9x+2=4x+329x + 2 = 4x + 32, crossing out 4x4x on the right gives 9x+2=329x + 2 = 32 and x=103x = \frac{10}{3}.

The correct way: Subtract 4x4x from both sides to get 5x+2=325x + 2 = 32, then 5x=305x = 30 and x=6x = 6. As a check, 9(6)+2=569(6) + 2 = 56 and 4(6)+32=564(6) + 32 = 56. Writing the subtraction under both sides every time fixes the habit.

Mistake 2: Losing the negative sign on the coefficient

Where it slips in: Collecting on the side with the smaller coefficient, which leaves a negative xx term. Children tend to read the 4 and the 20 as the real numbers and the minus signs as decoration.

Don't do this: In x+14=5x−6x + 14 = 5x - 6, subtracting 5x5x gives −4x+14=−6-4x + 14 = -6, then −4x=−20-4x = -20, and dividing by 4 instead of −4-4 gives x=−5x = -5.

The correct way: Divide both sides by −4-4, and a negative divided by a negative is positive, so x=5x = 5. Collecting on the right instead gives 20=4x20 = 4x with no negatives at all. As a check, 5+14=195 + 14 = 19 and 5(5)−6=195(5) - 6 = 19.

Wrong versus right division by a negative coefficient in equations with variables on both sides.
Side-by-side panels compare the wrong answer x = -5 with the right answer x = 5 for -4x = -20, which comes from x + 14 = 5x - 6.

Mistake 3: Distributing a negative to the first term only

Where it slips in: Any equation with a minus sign in front of parentheses. The −2-2 touches the xx first, and the second term inside feels too far away to need it.

Don't do this: In 10−2(x−3)=x+410 - 2(x - 3) = x + 4, writing 10−2x−310 - 2x - 3 gives 7−2x=x+47 - 2x = x + 4 and x=1x = 1. The check fails, because 10−2(1−3)=1410 - 2(1 - 3) = 14 while 1+4=51 + 4 = 5.

The correct way: Multiply both terms inside by −2-2, so −2(x−3)=−2x+6-2(x - 3) = -2x + 6. Then 16−2x=x+416 - 2x = x + 4, so 12=3x12 = 3x and x=4x = 4. As a check, 10−2(4−3)=810 - 2(4 - 3) = 8 and 4+4=84 + 4 = 8.

Key Takeaways

  • The answer to an equation with xx on both sides is the single input that makes two different expressions produce the same output.
  • Once each side is simplified, one subtraction of an xx term from both sides leaves the two-step kind from 7th grade, unless the xx terms cancel.
  • Fractions and decimals clear only when every term on both sides gets multiplied, including the plain numbers.
  • If the xx terms vanish, a true leftover such as 7=77 = 7 means every number works and a false one such as 6=26 = 2 means none does.
  • For more practice catching a dropped negative in equations with variables on both sides, explore Bhanzu's 8th grade math tutor or algebra classes.

A Practical Next Step

Solve these three equations on paper, then check each answer in the original equation.

  1. 8x−5=3x+308x - 5 = 3x + 30
  2. 2(x+7)=5x−42(x + 7) = 5x - 4
  3. 12x+3=15x+6\frac{1}{2}x + 3 = \frac{1}{5}x + 6

Answers: x=7x = 7, x=6x = 6 and x=10x = 10.

Practice these to solidify your understanding. If you collect on the left in problem 2 and the −3x-3x catches you, return to Mistake 2. Want a live Bhanzu trainer to walk through more equations with variables on both sides problems? Book a free demo class, online globally, or in person at our McKinney, TX center.

Read More

Research Behind This Article

  1. J J O'Connor and E F Robertson, MacTutor History of Mathematics, Abu Ja'far Muhammad ibn Musa Al-Khwarizmi (1999). mathshistory.st-andrews.ac.uk
  2. Common Core State Standards Initiative, Grade 8 Expressions and Equations (2010). thecorestandards.org
  3. National Center for Education Statistics, NAEP Mathematics: Distribution of Mathematics Questions, 2024 (2026). nces.ed.gov
  4. OpenStax, Elementary Algebra 2e, 2.3 Solve Equations with Variables and Constants on Both Sides (2020). openstax.org
  5. Institute of Education Sciences, What Works Clearinghouse, Teaching Strategies for Improving Algebra Knowledge in Middle and High School Students (2015). ies.ed.gov
  6. OpenStax, Elementary Algebra 2e, 2.5 Solve Equations with Fractions or Decimals (2020). openstax.org

Quick Quiz: Check Yourself

Three levels, new numbers every time: solve a two-sided equation, solve one with parentheses or a negative answer, then find the week when two savers have the same amount.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

How do you solve equations with constants on both sides?
Treat them the way you treat the variable terms. Once the xx terms sit on one side, remove the constant on that side from both sides. Step 3 under How do you solve equations with variables on both sides? does exactly this, turning 4x+5=214x + 5 = 21 into 4x=164x = 16.
My child can solve 3x+5=203x + 5 = 20 but gets stuck on equations with variables on both sides. Why?
The only new part is the first move, which subtracts a term containing xx instead of a plain number, and that can feel like breaking a rule. Once your child sees 2x2x as an amount, like 2aweekfor2 a week for x$ weeks, they can solve equations with variables on both sides with steps they already know.
Is solving equations with two variables the same skill?
No. An equation such as x+y=10x + y = 10 has two different unknowns and endless answer pairs, while these equations have one unknown that appears twice.
Does it matter which side I collect the variables on?
Same answer either way, but the larger-coefficient side avoids negatives.
How can I help my child with solving equations with variables on both sides at home?
Ask your child to say each move out loud, such as "subtract 2x2x from both sides," while writing it under both sides. If the trouble is reading word problems or confidence rather than the algebra, the teacher can usually help with that in class. If your child is two grade levels behind on a foundation skill such as integer operations, talk with the teacher first, then consider a tutor.
Can you solve variables on both sides with fractions without clearing them?
Yes. Subtracting 12x\frac{1}{2}x from both sides of 34x−1=12x+2\frac{3}{4}x - 1 = \frac{1}{2}x + 2 leaves 14x−1=2\frac{1}{4}x - 1 = 2. Adding 1 gives 14x=3\frac{1}{4}x = 3, so x=12x = 12, the same answer the LCD gives.
✍️ Written By
Bhanzu Team
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →