PEMDAS and the Order-of-Operations Traps That Catch Everyone

The order of operations is the agreement that lets everyone get the same answer from 8 − 2 × 3. Without it, one person gets 18 and another gets 2. The right answer is 2, and this guide shows exactly why, plus the three places where most people go wrong.

The order, step by step

Work through an expression in this order:

  1. Parentheses and other grouping symbols: brackets, braces, fraction bars, square root signs and absolute value bars.
  2. Exponents and roots.
  3. Multiplication and division, together, from left to right.
  4. Addition and subtraction, together, from left to right.

The memory aid in the US is PEMDAS (“Please Excuse My Dear Aunt Sally”). In the UK and Australia it is BODMAS or BIDMAS. They describe the same rules with different words: B is brackets, O is orders and I is indices, both meaning exponents.

Example Evaluate 8 − 2 × 3

  1. There are no parentheses or exponents.
  2. Multiplication comes before subtraction: 2 × 3 = 6.
  3. Then 8 − 6 = 2.

Trap 1: multiplication does not come before division

PEMDAS lists M before D, but they share one step. You do whichever comes first reading left to right. The same goes for addition and subtraction.

Example Evaluate 24 ÷ 4 × 2

Left to right: 24 ÷ 4 = 6, then 6 × 2 = 12.

Doing the multiplication first gives 24 ÷ 8 = 3, which is wrong.

Example Evaluate 10 − 4 + 3

Left to right: 10 − 4 = 6, then 6 + 3 = 9.

Adding first gives 10 − 7 = 3, which is wrong.

A cleaner way to see it: subtraction is adding a negative, and division is multiplying by a reciprocal. 10 − 4 + 3 is 10 + (−4) + 3, and addition can go in any order. You still get 9.

Trap 2: the negative sign and exponents

An exponent applies only to what sits directly under it. In −3², the exponent belongs to the 3, not to the minus sign.

ExpressionMeansValue
−3²−(3 × 3)−9
(−3)²(−3) × (−3)9
−3³−(3 × 3 × 3)−27
2 × 3²2 × 918
(2 × 3)²6²36

Calculators agree with this rule

Type −3² into a TI-84 or Desmos and you get −9. If you want to square a negative number, put it in parentheses.

Trap 3: hidden grouping

Some grouping symbols don’t look like parentheses but act like them.

  • A fraction bar groups the whole top and the whole bottom. (6 + 4) ÷ (7 − 2) is written as a fraction with 6 + 4 on top and 7 − 2 underneath, and equals 10 ÷ 5 = 2.
  • A square root sign groups everything under it. √(9 + 16) = √25 = 5, which is not √9 + √16 = 7.
  • Absolute value bars group what is inside. |3 − 8| = |−5| = 5.

When you type a fraction into a calculator, add the parentheses yourself. 6 + 4 / 7 − 2 on a calculator gives about 4.57, not 2.

Nested parentheses

When parentheses sit inside other parentheses, start with the innermost pair and work outward.

Example Evaluate 2[5 + 3(4 − 1)²] − 7

  1. Innermost parentheses: 4 − 1 = 3.
  2. Exponent: 3² = 9.
  3. Inside the brackets, multiply first: 3 × 9 = 27, then 5 + 27 = 32.
  4. Multiply: 2 × 32 = 64.
  5. Subtract: 64 − 7 = 57.

Example Evaluate (18 ÷ 3² × 4 − 2) ÷ 3

  1. Inside the parentheses, exponent first: 3² = 9.
  2. Division and multiplication left to right: 18 ÷ 9 = 2, then 2 × 4 = 8.
  3. Subtraction: 8 − 2 = 6.
  4. Outside: 6 ÷ 3 = 2.

Order of operations with variables

The same rules decide how to evaluate expressions when you substitute a value. Put every substituted number in parentheses first. That one habit stops the negative-sign mistake.

Example Evaluate 3x² − 2x + 1 when x = −2

  1. Substitute with parentheses: 3(−2)² − 2(−2) + 1.
  2. Exponent: (−2)² = 4.
  3. Multiply: 3 × 4 = 12 and −2 × (−2) = 4.
  4. Add: 12 + 4 + 1 = 17.

Without the parentheses, 3 × −2² looks like 3 × (−4) = −12, and the whole answer is wrong. This matters again when you evaluate functions and when you solve linear equations, where you undo the operations in reverse order.

The viral problems

Posts like “6 ÷ 2(1 + 2) = ?” go around every year. Under the rules above, 6 ÷ 2 × 3 is worked left to right: 3 × 3 = 9. Some older textbooks treat a number written right next to parentheses as more tightly bound, which gives 6 ÷ 6 = 1. The real lesson is that the expression is badly written. On a test you will never see this ambiguity, because problems use a fraction bar to make the meaning clear.

Try these

  1. Evaluate 12 − 3 × 2 + 4.

    Show answer

    10. Multiply first (3 × 2 = 6), then work left to right: 12 − 6 + 4 = 10.

  2. Evaluate 36 ÷ 6 × 3.

    Show answer

    18. Left to right: 36 ÷ 6 = 6, then 6 × 3 = 18.

  3. Evaluate −2⁴ + (−2)².

    Show answer

    −12. −2⁴ = −16 and (−2)² = 4, so −16 + 4 = −12.

  4. Evaluate 5 + 2[8 − (3 + 1)²] ÷ 4.

    Show answer

    1. (3 + 1)² = 16, 8 − 16 = −8, 2 × (−8) = −16, −16 ÷ 4 = −4, and 5 + (−4) = 1.

  5. Evaluate (4 + 2 × 7) ÷ (10 − 4).

    Show answer

    3. The top is 4 + 14 = 18, the bottom is 6, and 18 ÷ 6 = 3.

  6. Evaluate 2x² − 5x when x = −3.

    Show answer

    33. 2(−3)² − 5(−3) = 2(9) + 15 = 18 + 15 = 33.

If you missed one, write out every step on its own line and compare with the answer. The slip is almost always in one of the three traps above. You can also paste your working into FMS Study and it will point to the exact line that went wrong.

Keep studying

Drafted with help from AI tools. Every example is worked through step by step so you can check it.