Order of Operations Explained
The order of operations is the universally agreed set of rules that determines which part of a mathematical expression is calculated first. Without these rules, the expression 2 + 3 × 4 would be ambiguous — it could equal 20 (if you add first) or 14 (if you multiply first). PEMDAS (Parentheses, Exponents, Multiplication/Division, Addition/Subtraction) eliminates ambiguity by giving every operation a defined priority rank. The same set of rules is known as BODMAS in the UK and BEDMAS in Canada.
- PEMDAS Is a Universal Agreement: The order of operations is a globally agreed convention that ensures every person solving the same equation arrives at the same answer.
- Brackets First, Always: Parentheses (brackets) always resolve before everything else — use them to control calculation order explicitly.
- Multiplication Does Not Always Happen Before Addition: The common misconception is that × always happens before +. True: in the same tier, left-to-right; but across tiers, the priority hierarchy applies.
The PEMDAS Priority Stack
Think of the order of operations as a priority queue with four levels. Level 1 (highest priority): Parentheses — resolve everything inside brackets first, from innermost to outermost. Level 2: Exponents — evaluate all powers and roots. Level 3: Multiplication and Division — work left-to-right at the same priority level. Level 4 (lowest priority): Addition and Subtraction — work left-to-right at the same level. Within the same priority level, you always resolve left-to-right.
Order of Operations Priority: Incorrect vs. Correct Approach
Safe Math Parser Evaluation
| Symbol | Meaning & Description |
|---|---|
| Expression | Sanitized algebraic text (numbers, operators, trig keywords) |
Filtered: 'sin(pi/4)*sqrt(16)'
Trigonometric & constants rewritten to system counterparts: sin -> Math.sin, pi -> Math.PI, sqrt -> Math.sqrt.
Evaluated Result = 2.82842712474619
Step-by-Step PEMDAS Walkthrough
Problem: Solve 8 + 2³ × (6 - 4) ÷ 4
Step 1 — Parentheses (resolve the bracket first):
Step 2 — Exponents (calculate the power):
Step 3 — Multiplication and Division (left-to-right):
Step 4 — Addition (last):
Common wrong answer: Working purely left-to-right gives 8 + 2 = 10, 10³ = 1000, etc. — completely wrong.
The "BODMAS" vs. "PEMDAS" Difference
| Term | US / Canada | UK / Australia |
|---|---|---|
| B / P | Parentheses | Brackets |
| E / O | Exponents | Orders (powers, roots) |
| D / M | Division | Division (same tier as ×) |
| M / D | Multiplication | Multiplication (same tier as ÷) |
| A / S | Addition | Addition |
| S | Subtraction | Subtraction |
The rules are identical — only the mnemonic differs.
The Recipe Analogy
Think of an expression as a cooking recipe with different preparation steps that must happen in a specific order. You cannot add seasoning (final step) before you have cooked the ingredients (earlier step). Similarly, you cannot add or subtract values in an expression before you have evaluated the multiplications, exponents, and parenthetical groups. The order of operations is the recipe for consistent mathematical results.
- Spreadsheet Formulas: Excel and Google Sheets follow PEMDAS exactly. Writing `=2+3*4` returns 14, not 20. Understanding this prevents systematic spreadsheet errors in financial models.
- Programming: Every programming language (Python, JavaScript, Java) follows PEMDAS. `2 + 3 * 4` returns `14` in all of them. Misunderstanding this causes logic errors in code.
- Financial Calculations: Loan repayment formulas, compound interest equations, and tax bracket calculations all nest multiple operations. PEMDAS ensures the formula resolves correctly every time.
- Scientific Equations: Physics equations like kinetic energy (*KE* = ½*m*·*v*²) require evaluating the exponent before the multiplication — only possible if the order of operations is applied correctly.
- Ignoring Left-to-Right for Same-Tier Operations: Multiplication and division are at the same tier and must be evaluated left-to-right. `12 ÷ 4 × 3 = 3 × 3 = 9` — not `12 ÷ 12 = 1`. The same applies to addition and subtraction.
- Treating "MD" as Multiplication Before Division: PEMDAS's M before D does not mean × has higher priority than ÷. Both are at the same level. The acronym order is just the mnemonic — left-to-right resolves ties.
- Forgetting to Distribute: When a number is outside a bracket, it multiplies everything inside: `3(2 + 4) = 3 × 6 = 18`, not `6 + 4 = 10`.
- Ambiguous Expressions Without Brackets: Some internet "viral math problems" like `8 ÷ 2(2 + 2)` are genuinely ambiguous due to missing brackets. Always add brackets in your own work to eliminate ambiguity.
APEMDAS (American Mnemonic)
PEMDAS stands for Parentheses, Exponents, Multiplication, Division, Addition, Subtraction. The mnemonic is commonly taught in the United States through the memory aid "Please Excuse My Dear Aunt Sally." Despite listing Multiplication before Division, both are at the same priority tier and resolve left-to-right.
BBODMAS (British Mnemonic)
BODMAS stands for Brackets, Orders, Division, Multiplication, Addition, Subtraction — used in the UK, Australia, India, and many Commonwealth countries. Despite listing Division before Multiplication (the reverse of PEMDAS), the rules are identical: both D and M are at the same priority tier and resolve left-to-right. The different ordering of the letters is a mnemonic difference, not a mathematical one.
Quick Reference: Order of Operations Priority
| Priority | Operation | Examples | Left-to-Right Within Tier? |
|---|---|---|---|
| 1 (highest) | Parentheses / Brackets | ( ), [ ], { } | From innermost outward |
| 2 | Exponents / Orders | x², √x, x³ | Yes |
| 3 | Multiplication & Division | × ÷ | Yes — same tier |
| 4 (lowest) | Addition & Subtraction | + − | Yes — same tier |
Key insight: The single most important rule after memorising the hierarchy is the left-to-right rule for same-tier operations. This resolves all ambiguity at the multiplication/division level and at the addition/subtraction level.
Scientific Calculator Sandbox
Tweak variables below to see the formula calculate instantly.
Scientific Calculator
Standard scientific calculator performing trigonometric, logarithmic, and power functions.
Related Educational Guides
What Is a Percentage? Core Math Calculations Explained
Understand what percentages are, how to solve the three core percentage problem types, and why percentages are the universal language of proportion.
How to Calculate Percentage Change: Increase & Decrease Math
Master the percentage change formula, understand the difference between percentage increase and decrease, and learn the asymmetry trap that trips most people up.
Fractions, Decimals, and Percentages: Conversion Rules
Learn how fractions, decimals, and percentages relate to each other, how to convert between all three forms, and when to use each in practice.