Skip to content

Order of Operations (with Variables)

In this lesson you’ll learn how to evaluate expressions with parentheses, exponents, multiplication/division, and addition/subtraction when variables are involved.

Order of operations (PEMDAS or BODMAS) tells you which part to do first:

  • Parentheses / Brackets first
  • Exponents / Orders (powers, roots) next
  • Multiply / Divide (left to right)
  • Add / Subtract (left to right)

When variables are present, substitute first, then follow the order.

Example: Evaluate 2(3x+4)5x2(3x + 4) - 5x when x=2x = 2

2(3(2)+4)5(2)=2(6+4)10=2(10)10=2010=10\begin{aligned} 2(3(2) + 4) - 5(2) &\\ = 2(6 + 4) - 10 &\\ = 2(10) - 10 &\\ = 20 - 10 &\\ = 10 \end{aligned}

Evaluate 4+3(52y)4 + 3(5 - 2y) when y=1y = 1

4+3(52(1))=4+3(52)=4+3(3)=4+9=13\begin{aligned} 4 + 3(5 - 2(1)) &\\ = 4 + 3(5 - 2) &\\ = 4 + 3(3) &\\ = 4 + 9 &\\ = 13 \end{aligned}

Another: Evaluate 6x22x+76x^2 - 2x + 7 when x=3x = 3

6(3)22(3)+7=6(9)6+7=546+7=55\begin{aligned} 6(3)^2 - 2(3) + 7 &\\ = 6(9) - 6 + 7 &\\ = 54 - 6 + 7 &\\ = 55 \end{aligned}

Order of operations matters in formulas:

  • Total cost = base + rate × hours: 50+18×h50 + 18 \times h (multiply first)
  • Average speed = total distance ÷ total time: 240÷(2+1.5)240 \div (2 + 1.5) (parentheses first)
  • Compound interest preview: P(1+r)tP(1 + r)^t (exponents after parentheses)

Getting the order wrong can lead to wrong budgets, rates, or totals.

Evaluate $5 + 4 \times 3$.
Evaluate $2(6 - 3x)$ when $x = 1$.
Evaluate $10 - 2y + 3y$ when $y = 4$.
Evaluate $4x^2 - 3$ when $x = 2$.
Evaluate $(8 + 2)^2 \div 5$.