Order of Operations (PEMDAS) with Variables
Apply PEMDAS correctly to algebraic expressions β avoiding the most common mistakes students make when simplifying and evaluating.
Without a consistent order of operations, the same expression gives different answers to different people β math breaks down. The classic "8 Γ· 2(2+2)" debate goes viral online every few years because people apply the rules differently. In real work β spreadsheet formulas, engineering calculations, code β a misapplied order of operations can corrupt an entire analysis. PEMDAS is the grammar of mathematics.
- Apply PEMDAS (Parentheses, Exponents, Multiplication/Division, Addition/Subtraction) in the correct order
- Evaluate algebraic expressions with multiple operations step by step
- Avoid the three most common PEMDAS errors: left-to-right tie-breaking, implied multiplication, and negative exponents
PEMDAS is the universal agreement on the order to evaluate operations:
Parentheses
first
Exponents
second
Mult / Div
left β right
Add / Sub
left β right
Multiplication and division share the same priority β so do addition and subtraction. When two equal-priority operations appear, work left to right.
Step-by-Step Evaluation
Every time you evaluate an expression, work one step at a time and write out each simplification:
Evaluating 3 + 4Β² Γ· 2 β (6 β 2)
| Step | Operation | Result |
|---|---|---|
| 1 | Parentheses: (6β2) | 3 + 4Β² Γ· 2 β 4 |
| 2 | Exponent: 4Β² | 3 + 16 Γ· 2 β 4 |
| 3 | Division: 16Γ·2 | 3 + 8 β 4 |
| 4 | Add/Sub leftβright | 7 |
Simplify: \(5 + 3 \times 4 - 2^2\)
- Exponent: \(2^2 = 4\) β \(5 + 3 \times 4 - 4\)
- Multiply: \(3 \times 4 = 12\) β \(5 + 12 - 4\)
- Add/Subtract left to right: \(17 - 4 = 13\)
Evaluate \(2(x + 3)^2 - 4x\) when \(x = 1\).
- Substitute: \(2(1 + 3)^2 - 4(1)\)
- Parentheses: \(2(4)^2 - 4\)
- Exponent: \(2(16) - 4\)
- Multiply: \(32 - 4\)
- Subtract: \(28\)
A spreadsheet calculates a bonus as: \(B = 0.1 \times (S - 5000)^2 / 1000\) where \(S\) = sales in dollars. Find the bonus when \(S = 7000\).
- Substitute: \(0.1 \times (7000 - 5000)^2 / 1000\)
- Parentheses: \(0.1 \times (2000)^2 / 1000\)
- Exponent: \(0.1 \times 4{,}000{,}000 / 1000\)
- Left-to-right (mult then div): \(400{,}000 / 1000 = 400\)
The bonus at $7,000 in sales is $400.
Evaluate each expression:
- \(12 - 3 \times 2 + 4\)
- \((8 - 3)^2 \div 5\)
- \(3n^2 + 2n - 1\) when \(n = 3\)
βΆ Show Answers
- Multiply first: \(12 - 6 + 4 =\) 10.
- Parentheses: \((5)^2 \div 5 = 25 \div 5 =\) 5.
- \(3(9) + 2(3) - 1 = 27 + 6 - 1 =\) 32.
- Adding before multiplying: \(2 + 3 \times 4\) is NOT \(5 \times 4 = 20\). Multiply first: \(2 + 12 = 14\).
- Forgetting left-to-right for Γ·: \(12 \div 4 \times 3\) is \((12 \div 4) \times 3 = 9\), NOT \(12 \div (4 \times 3) = 1\). Division and multiplication are equal priority β go left to right.
- Applying the exponent to a negative sign: \(-3^2 = -(3^2) = -9\), NOT \((-3)^2 = 9\). The negative sign is only included if it's inside the parentheses.
- PEMDAS order: Parentheses β Exponents β Γ Γ· β + β (each pair left to right).
- Equal-priority operations are resolved left to right β never skip ahead.
- Substitute with parentheses to protect negative values and avoid sign errors.
- Work one step at a time and rewrite the expression after each operation.
Engineers embed formulas in simulation software where order of operations determines whether a structure is modeled safely or dangerously. Financial analysts write Excel formulas where a missing parenthesis can compound interest at the wrong rate across thousands of rows. Both fields require the same discipline: write every formula explicitly, apply PEMDAS consistently, and check by evaluating at known values.
Calculator Connection
The PEMDAS / Order of Operations Calculator shows every step of the simplification process β enter any expression and watch it work through PEMDAS left to right.
Try it with the Calculator
Apply what you've learned with this tool.
Order of Operations with Variables - Quiz
5 questions per attempt Β· Beginner Β· Pass at 70%
Start Quiz β