Kung Fu MathKung Fu Math数学道場 · Math Dojo
All techniques

Order of operations · Technique guide

Order of Operations: Why Viral Math Puzzles Fool Everyone

By Robert Hansson, Kung Fu Math

A puzzle like (40 − 4²) ÷ 4 spreads across social media and the comments fill with 6, 9, 324 and 1 296. Everyone is confident; almost everyone disagrees. The puzzle is not hard arithmetic — it is a test of one thing: the order in which operations are done.

The rules are few and fixed: brackets first, then powers, then multiplication and division, then addition and subtraction — and equal ranks go left to right. Once those rules are habits, the viral puzzles stop being traps and start being warm-ups.

01

Powers before everything else

A power belongs to the number it sits on, and it is calculated before any adding, subtracting, multiplying or dividing around it. In 40 − 4² the square covers only the 4, so you compute 16 first and subtract afterwards.

This is the single most common trap in viral puzzles. The eye wants to read left to right, but the exponent jumps the queue.

Worked example

(40 − 4²) ÷ 4

  1. → Power first: 4² = 16
  2. → Subtract: 40 − 16 = 24
  3. → Divide: 24 ÷ 4 = 6

Answer: 6

Practice: Try (50 − 5²) ÷ 5, (30 − 3²) ÷ 3 and (100 − 6²) ÷ 8.

02

Multiply and divide before add and subtract

Multiplication and division outrank addition and subtraction. In 7 + 3 × 8 the product 24 is computed first, then the 7 is added. Reading left to right gives 80 — a wrong but very popular answer.

A helpful picture: multiplication glues numbers together more tightly than addition does, so the glued parts are settled first.

Worked example

7 + 3 × 8

  1. → Multiply first: 3 × 8 = 24
  2. → Add: 7 + 24 = 31

Answer: 31

Practice: Try 5 + 4 × 6, 20 − 2 × 7 and 9 + 18 ÷ 3.

03

Same rank? Go left to right

Multiplication and division share the same rank, and so do addition and subtraction. When equals meet, you simply work from left to right. In 60 ÷ 5 × 2 you divide first: 12 × 2 = 24. Multiplying first would give 6 — wrong.

There is no rule that says multiplication always beats division. They are siblings, not rivals.

Worked example

60 ÷ 5 × 2

  1. → Divide first (leftmost): 60 ÷ 5 = 12
  2. → Multiply: 12 × 2 = 24

Answer: 24

Practice: Try 80 ÷ 4 × 5, 36 ÷ 6 × 3 and 100 − 40 + 20.

04

Brackets change everything

Brackets are the strongest signal in mathematics: whatever sits inside them is computed first, before any rank rules apply. 8 + 4 × 5 is 28, but (8 + 4) × 5 is 60. One pair of brackets more than doubled the result.

When a puzzle looks ambiguous, look for the brackets — or the lack of them. They decide the whole story.

Worked example

(8 + 4) × 5

  1. → Brackets first: 8 + 4 = 12
  2. → Multiply: 12 × 5 = 60
  3. → Without brackets it would be 8 + 20 = 28

Answer: 60

Practice: Try (9 − 3) × 4, 2 × (7 + 3) and (12 + 6) ÷ 3.

05

The fraction bar is a hidden bracket

A fraction bar brackets everything above and below it, even when no brackets are drawn. (12 + 8)/4 means (12 + 8) ÷ 4 = 5, not 12 + 8 ÷ 4 = 14. Settle the whole numerator and the whole denominator before dividing.

This is exactly the second trap in the viral puzzle: (40 − 4²)/4 asks you to finish the top, 24, before touching the division.

Worked example

(12 + 8)/4

  1. → Numerator first: 12 + 8 = 20
  2. → Divide: 20 ÷ 4 = 5
  3. → Without the hidden bracket: 12 + 8 ÷ 4 = 14 — wrong

Answer: 5

Practice: Try (30 − 6)/4, (15 + 9)/3 and (50 − 2)/6.

Common mistakes

  • Reading left to right like a sentence. Powers, multiplication and division jump the queue.
  • Squaring after subtracting: (40 − 4)² is not 40 − 4². The square covers only the 4.
  • Forgetting that a fraction bar brackets the whole numerator: (a + b)/c is not a + b/c.
  • Doing multiplication before division when they stand side by side — they share a rank, so go left to right.

Summary

  • Brackets first, then powers, then multiply and divide, then add and subtract.
  • Equal ranks are settled left to right.
  • A fraction bar hides brackets around the numerator and denominator.
  • Viral puzzles test order, not arithmetic — slow down and the trap disappears.

Into the dojo

Reading builds understanding; practice builds speed. Train this in Kung Fu Math — no account needed.