Guide12 min read

Order of Operations (PEMDAS / BODMAS)

Without a standard order of operations, the expression 2 + 3 × 4 could equal 20 (if you add first) or 14 (if you multiply first). Mathematicians solved this ambiguity centuries ago with a universal agreement — now called PEMDAS in the United States and BODMAS or BEDMAS in many other countries.

This guide walks through every rule, common traps, nested parentheses, and gives you 10 practice problems with full worked solutions. Whether you're a student preparing for a test or refreshing your arithmetic, the order of operations is the single most important rule to get right before tackling algebra.

What Is PEMDAS?

PEMDAS is a mnemonic for the six levels of mathematical priority — the sequence you must follow when evaluating any arithmetic or algebraic expression: Parentheses, Exponents, Multiplication, Division, Addition, Subtraction.

Think of it as a priority queue: operations at the top of the list must be completed before those lower down. When two operations share the same priority level (multiplication and division share level 3; addition and subtraction share level 4), you work left to right — just as you read English text.

The phrase most students use to remember the order is: "Please Excuse My Dear Aunt Sally" — the first letter of each word matches P-E-M-D-A-S.

PriorityOperationPEMDAS LetterDirection
1 (highest)Parentheses (and brackets, braces)PInside → out
2Exponents (and roots, which are fractional exponents)ERight to left*
3MultiplicationMLeft to right
3DivisionDLeft to right (same level as ×)
4AdditionALeft to right
4SubtractionSLeft to right (same level as +)

PEMDAS vs BODMAS vs BEDMAS — International Differences

The same rule has different names around the world, but the underlying mathematics is identical. The differences are purely mnemonic:

PEMDAS (United States): Parentheses → Exponents → Multiplication → Division → Addition → Subtraction.

BODMAS (UK, India, Australia): Brackets → Orders (powers/roots) → Division → Multiplication → Addition → Subtraction. Note: Division appears before Multiplication here, but they remain the same priority level — both evaluated left to right.

BEDMAS (Canada): Brackets → Exponents → Division → Multiplication → Addition → Subtraction. Same rule as BODMAS, different name.

BIDMAS (UK alternative): Brackets → Indices → Division → Multiplication → Addition → Subtraction. "Indices" means exponents/powers.

The most critical point: no matter which acronym you use, the result of any correctly worked expression is the same. The apparent difference between "Multiplication before Division" (PEMDAS) and "Division before Multiplication" (BODMAS) is irrelevant — they're on the same priority level and resolved left to right.

AcronymCountryP/BE/O/IM&DA&S
PEMDASUSAParenthesesExponentsM then D (left→right)A then S (left→right)
BODMASUK/India/AUBracketsOrdersD then M (left→right)A then S (left→right)
BEDMASCanadaBracketsExponentsD then M (left→right)A then S (left→right)
BIDMASUK alt.BracketsIndicesD then M (left→right)A then S (left→right)

Step-by-Step: Applying PEMDAS with Worked Examples

Example 1 — Basic mixed operations: Evaluate 2 + 3 × 4.

Step 1 (Parentheses): None. Step 2 (Exponents): None. Step 3 (Multiplication): 3 × 4 = 12. Rewrite: 2 + 12. Step 4 (Addition): 2 + 12 = 14.

Example 2 — With exponent: Evaluate 3 + 2² × 5 − 1.

Step 1 (P): None. Step 2 (E): 2² = 4. Rewrite: 3 + 4 × 5 − 1. Step 3 (M/D): 4 × 5 = 20. Rewrite: 3 + 20 − 1. Step 4 (A/S): Left to right → 3 + 20 = 23 → 23 − 1 = 22.

Example 3 — Parentheses change everything: Compare 8 ÷ 2(2 + 2) vs (8 ÷ 2)(2 + 2).

For 8 ÷ 2(2 + 2): P first → 2 + 2 = 4. Left to right: 8 ÷ 2 = 4, then 4 × 4 = 16. (This famous internet debate resolves to 16 with standard PEMDAS.) For (8 ÷ 2)(2 + 2): Both parentheses first: 4 × 4 = 16. Same result in this case, but parentheses notation makes the intent unambiguous.

Example 4 — Three-level expression: Evaluate (3 + 5)² ÷ 4 × 2 − 6.

Step 1 (P): 3 + 5 = 8. Rewrite: 8² ÷ 4 × 2 − 6. Step 2 (E): 8² = 64. Rewrite: 64 ÷ 4 × 2 − 6. Step 3 (M/D left to right): 64 ÷ 4 = 16 → 16 × 2 = 32. Rewrite: 32 − 6. Step 4 (S): 32 − 6 = 26.

Nested Parentheses — Working from the Inside Out

When parentheses appear inside other parentheses, always resolve the innermost group first, then work outward. Different bracket types — ( ), [ ], { } — are often used for visual clarity but carry identical mathematical meaning.

Example: Evaluate 3 × {2 + [4 × (1 + 3)]}.

Step 1 — Innermost parentheses: (1 + 3) = 4. Rewrite: 3 × {2 + [4 × 4]}.

Step 2 — Square brackets: [4 × 4] = 16. Rewrite: 3 × {2 + 16}.

Step 3 — Curly braces: {2 + 16} = 18. Rewrite: 3 × 18.

Step 4 — Multiplication: 3 × 18 = 54.

A useful habit: underline the innermost parentheses, compute, rewrite, repeat. Never try to resolve multiple levels in one step — this is where most errors occur.

Exponents and Roots — Common Traps

Trap 1 — Negative base vs negative exponent: −3² ≠ (−3)². Without parentheses, the exponent applies only to 3: −3² = −(3²) = −9. With parentheses: (−3)² = (−3)(−3) = +9. This is one of the most common sign errors in algebra.

Trap 2 — Roots are exponents: √9 is the same as 9^(1/2). Square roots obey the same priority level as exponents — they come before multiplication and division. So 2 × √16 + 1: first √16 = 4, then 2 × 4 = 8, then 8 + 1 = 9.

Trap 3 — Stacked exponents (right-to-left): 2^3^2 means 2^(3²) = 2^9 = 512, not (2³)² = 64. Stacked exponents are evaluated right to left. This is rarely tested at secondary level but matters in computer science.

Trap 4 — Exponent over a fraction: The fraction bar acts as a grouping symbol (like parentheses). In (3 + 5)² / (2 + 2), compute numerator and denominator separately before dividing: 64 / 4 = 16.

Multiplication & Division — Why Left to Right Matters

Many students believe "Multiplication always comes before Division" because M appears before D in PEMDAS. This is a dangerous misreading. Multiplication and division are equal-priority operations — you evaluate them left to right as they appear.

Example showing the difference: 12 ÷ 4 × 3.

Correct (left to right): 12 ÷ 4 = 3, then 3 × 3 = 9.

Incorrect (multiplication first): 4 × 3 = 12, then 12 ÷ 12 = 1. Wrong!

Another example: 100 ÷ 5 ÷ 2. Correct: 100 ÷ 5 = 20, then 20 ÷ 2 = 10. (Not 100 ÷ 10 = 10 — same answer here, but not always.)

The safest habit: whenever you see a chain of × and ÷, scan left to right and process each operation in the order it appears.

Addition & Subtraction — Left to Right (Same Priority)

Just like multiplication and division, addition and subtraction share the same priority level. Work left to right.

Example: 10 − 3 + 2. Correct: 10 − 3 = 7, then 7 + 2 = 9. Incorrect (addition first): 3 + 2 = 5, then 10 − 5 = 5. Wrong!

The reason this matters: subtraction is not commutative or associative. a − b + c ≠ a − (b + c) in general. Always process left to right.

Dealing with negative signs: Think of subtraction as "adding a negative number." So 8 − 5 + 3 can be rewritten as 8 + (−5) + 3. Then order doesn't matter — but this reformulation only works if you're careful to carry the negative sign with its number.

8 Common PEMDAS Mistakes (and How to Avoid Them)

Understanding the rules is one thing; applying them under pressure is another. These are the most frequent errors at every level.

MistakeWrongCorrectWhy
Multiplication before division (left to right)12 ÷ 4 × 3 = 112 ÷ 4 × 3 = 9M and D are equal priority — go left to right
Addition before subtraction (left to right)10 − 3 + 2 = 510 − 3 + 2 = 9A and S are equal priority — go left to right
Forgetting exponent sign−3² = 9−3² = −9Exponent binds to 3, not −3 (use parentheses for −3²=9)
Ignoring fraction bar as grouping(3+5)/2+2 = 6(3+5)/(2+2) = 2Fraction bar groups numerator AND denominator
Skipping steps in nested brackets{2+[3×(1+1)]}Inner first: (1+1)=2 → [3×2]=6 → {2+6}=8Always innermost first
Implicit multiplication after parentheses8÷2(4) = 18÷2×4 = 16Implicit × has same priority as ÷ — go left to right
Root not treated as exponent√4+5 = 3√4+5 = 7√4=2 first (exponent level), then 2+5=7
Applying PEMDAS to equations (both sides)Wrong variable isolationUse inverse operations side by sidePEMDAS is for evaluating expressions, not solving equations

PEMDAS in Algebra — Variables and Expressions

PEMDAS applies to algebraic expressions exactly as it does to numeric ones. The only difference is that you can't always complete the arithmetic when variables are present — but you follow the same evaluation order.

Example: Simplify 3x² + 2(x + 4) − 5x when x = 2.

Step 1: Substitute x = 2 → 3(2²) + 2(2 + 4) − 5(2).

Step 2 (Parentheses): (2 + 4) = 6 → 3(4) + 2(6) − 5(2).

Step 3 (Exponents): 2² = 4 (already done above).

Step 4 (Multiplication): 3 × 4 = 12, 2 × 6 = 12, 5 × 2 = 10 → 12 + 12 − 10.

Step 5 (A/S left to right): 12 + 12 = 24 → 24 − 10 = 14.

When simplifying without substitution, combine like terms after expanding: distribute first (respecting multiplication), then collect like-degree terms. The factoring calculator and polynomial calculator on CalcMulti handle these expansions automatically.

10 Practice Problems with Full Solutions

Problem 1: 5 + 3 × 2 − 1 = ? Solution: 3×2=6 → 5+6−1=10.

Problem 2: (5 + 3) × 2 − 1 = ? Solution: (5+3)=8 → 8×2=16 → 16−1=15.

Problem 3: 4² − 2 × (3 + 1) = ? Solution: (3+1)=4 → 4²=16 → 2×4=8 → 16−8=8.

Problem 4: 3 × 4 ÷ 2 + 1 = ? Solution: left to right → 3×4=12 → 12÷2=6 → 6+1=7.

Problem 5: 2 + {3 × [4 − (1 + 1)]} = ? Solution: (1+1)=2 → [4−2]=2 → {3×2}=6 → 2+6=8.

Problem 6: (−2)³ + 4 × 2 = ? Solution: (−2)³=−8 → 4×2=8 → −8+8=0.

Problem 7: 18 ÷ 3 ÷ 2 × 4 = ? Solution: left to right → 18÷3=6 → 6÷2=3 → 3×4=12.

Problem 8: √(16 + 9) × 2 = ? Solution: (16+9)=25 → √25=5 → 5×2=10.

Problem 9: 100 − 4 × (2 + 3)² ÷ 5 = ? Solution: (2+3)=5 → 5²=25 → 4×25=100 → 100÷5=20 → 100−20=80.

Problem 10: 2³ × 3 − (4 + 1)² ÷ 5 + 7 = ? Solution: 2³=8, (4+1)=5, 5²=25 → 8×3=24 → 25÷5=5 → 24−5+7=26.

How Calculators Handle Order of Operations

Not all calculators follow PEMDAS automatically. Basic four-function calculators (the cheap ones) evaluate left to right — they have no memory for priority. 2 + 3 × 4 gives 20, not 14, on a basic calculator.

Scientific calculators (Casio, Texas Instruments) and all smartphone calculators (iOS, Android) implement the full order of operations. They are safe to use for multi-step expressions.

Spreadsheets (Excel, Google Sheets) also follow standard order of operations. However, the caret ^ for exponents and the placement of negative signs can cause surprises — always use parentheses to be explicit: =(3+5)^2/(2+2).

Programming languages: Python, JavaScript, and most languages follow standard mathematical precedence. However, integer division behaves differently (e.g., 7 // 2 = 3 in Python). When in doubt, use parentheses — they cost nothing and prevent bugs.

The safest rule when using any tool: write your own parentheses explicitly for each intended grouping, rather than relying on operator precedence rules you're uncertain about.

Frequently Asked Questions