Skip to main content
MathKit

Order of Operations (PEMDAS)

Updated 2026-10-29

Why is 2 + 3 × 4 equal to 14 and not 20? Because math has an agreed order of operations — a sequence everyone follows so expressions have exactly one correct value.

The rules

  1. Parentheses — anything inside brackets first
  2. Exponents — powers and roots
  3. Multiplication and Division — left to right, equally ranked
  4. Addition and Subtraction — left to right, equally ranked

A common mnemonic is PEMDAS (“Please Excuse My Dear Aunt Sally”). The crucial subtlety: multiplication does not “beat” division, and addition does not “beat” subtraction — each pair is worked left to right.

Worked examples

Example 1: 2 + 3 × 4

Multiplication before addition: 2 + 12 = 14

Example 2: 20 ÷ 4 × 2

Equal rank, so left to right: 20 ÷ 4 = 5, then 5 × 2 = 10 (not 20 ÷ 8 = 2.5)

Example 3: 3 + 2² × (8 − 6)

  • Parentheses: (8 − 6) = 2
  • Exponent: 2² = 4
  • Multiplication: 4 × 2 = 8
  • Addition: 3 + 8 = 11

Example 4: −3² vs (−3)²

−3² = −(3²) = −9, but (−3)² = 9. The exponent applies only to the 3 unless parentheses include the minus sign. This one trips up calculators and students alike.

Nested parentheses: work from the inside out

When brackets sit inside brackets, innermost first. Consider:

2 × (3 + (8 − 5)²)

  • Inner parentheses: (8 − 5) = 3
  • Exponent: 3² = 9
  • Outer parentheses: 3 + 9 = 12
  • Multiplication: 2 × 12 = 24

Complex-looking expressions are just this loop repeated: resolve the innermost group, climb one level out, repeat until nothing remains inside brackets. Nested-work is where most lost marks come from, not from the PEMDAS order itself.

The famous ambiguous case: 6 ÷ 2(1 + 2)

This expression is a social-media classic because calculators disagree:

  • Left-to-right reading (the standard rule): 6 ÷ 2 = 3, then 3 × 3 = 9.
  • Implicit-multiplication-first reading (some calculators and many people): the attached 2(1 + 2) is treated as one unit = 6, so 6 ÷ 6 = 1.

Both answers come from defensible conventions, which is the point: the notation itself is ambiguous when multiplication is implied next to a division. The fix is not to argue — it is to write parentheses: either (6 ÷ 2) × 3 = 9 or 6 ÷ (2 × 3) = 1. When someone else’s expression lacks them, state which convention you assumed. In schoolwork and exams, the left-to-right reading is the expected one.

Negative numbers, exponents, and zero

  • A negative exponent means reciprocal: 2⁻² = 1 ÷ 2² = 1/4 = 0.25.
  • Fractional exponents are roots: 16^(1/2) = 4, because 4² = 16.
  • Zero to any positive power is 1: 7⁰ = 1. (Zero to the zeroth power is usually defined as 1 in schoolwork and on calculators, though it is a convention rather than a proven rule — some advanced texts leave 0⁰ undefined.)
  • With a negative base, even powers turn positive and odd powers stay negative: (−2)² = 4 but (−2)³ = −8.

These behaviors matter when a formula produces a negative base you did not expect — check signs before checking arithmetic.

Common mistakes

  1. Reading PEMDAS as a strict ladder. Multiplication does not always precede division: in 20 ÷ 4 × 2 the division comes first because it is written first. Same pair, left to right.
  2. Sign errors with exponents. −3² is −9. If you mean “negative three, squared”, write (−3)². In typed input, some calculators will parse −3² differently from (−3)².
  3. The implicit-multiplication trap from the section above — attached brackets silently hijacking precedence in both directions. Parenthesize or declare the convention.
  4. Applying the exponent to everything around it. In 2 × 3² the exponent binds only to the 3: 2 × 9 = 18. To square the product, parentheses: (2 × 3)² = 36.
  5. “Distributing” across addition before completing parentheses. In 2 × (5 + 4), compute inside first (9) and multiply (18). Distributing works — 2 × 5 + 2 × 4 = 18 — but it is a step you chose, not a precedence rule.
  6. Skipping trailing operations. After working a division or parenthesized block, any addition or subtraction still waiting at the end must be done, left to right. Stop too early and the answer ends up close enough to look right.

How calculators follow the same rules

Every mainstream calculator implements this convention as its evaluation engine — that is the reason the answers match a careful hand computation. The basic calculator evaluates full expressions with standard precedence, so you can type 2 + 3 × 4 verbatim and get 14; if your mental model says 20, the guide above — not the tool — needs a recheck. For power-and-root steps, the exponent calculator handles 2⁻², fractional exponents, and negative bases the section spelled out. Dialect differences mentioned earlier (implicit multiplication, unary minus handling) are small and usually documented; when in doubt, add parentheses — they cost nothing and remove every ambiguity.

Quick self-checks

Try these, then compare against the walkthroughs.

  1. 6 + 2 × (5 − 3)² ÷ 4 (Parentheses → 2, exponent → 4, multiplication → 8, division → 2, addition → 8.)
  2. 8 + 2 × (12 − 4) ÷ 4 (Parentheses → 8, multiply → 16, divide → 4, add → 12.)
  3. (5 − 2²) × 3 (Exponent before the subtraction inside the parentheses: 5 − 4 = 1, then × 3 → 3.)
  4. 18 ÷ 3 × 2 + 1 (Left to right at division level: 6 × 2 = 12, +1 → 13. Not 18 ÷ 6 = 3, +1 = 4.)

If all four matched, the order is settled in your head; if two or more differed, re-read the worked examples and the mistakes list — the slip is nearly always one of the six above.

Why an order at all?

Without a fixed convention, 2 + 3 × 4 could be 14 or 20 depending on the reader — mathematics would be ambiguous. The chosen order is not “natural”; it is a shared agreement that makes notation compact and communication exact. Calculators, spreadsheets, and programming languages all implement the same convention (with minor dialect differences, e.g. implicit multiplication in some calculators).

Try it yourself

More guides