The exact rule calculators, spreadsheets, and math classes use to solve expressions with multiple operations — explained step by step with worked examples.
Published August 29, 2026 · Reviewed by the Ihsabha Editorial Team
Two people can look at the same expression — say, 3 + 4 × 2 — and land on two different answers unless they agree on which operation to do first. Add 3 and 4 to get 7, then multiply by 2, and the answer is 14. Multiply 4 and 2 to get 8 first, then add 3, and the answer is 11. Only one of these is mathematically correct, and the rule that decides it is the order of operations: a fixed sequence every calculator, spreadsheet, and math class follows so that any expression has exactly one correct answer no matter who solves it. This guide covers the full order of operations — commonly remembered as PEMDAS or BODMAS — with worked examples for parentheses, exponents, negative numbers, and the two operations most people get backward, plus the real reason calculators sometimes disagree on tricky expressions like 6÷2(1+2).
The order of operations is the agreed-upon sequence for evaluating a mathematical expression that contains more than one type of operation. In the United States, it's typically remembered with the acronym PEMDAS: Parentheses, Exponents, Multiplication and Division, Addition and Subtraction. In the United Kingdom, Australia, and much of the rest of the world, the same rule is taught as BODMAS (Brackets, Orders, Division and Multiplication, Addition and Subtraction) or BIDMAS (swapping "Orders" for "Indices"). All three acronyms describe the exact same underlying mathematics — only the regional vocabulary changes. "Parentheses" and "Brackets" mean the same grouping symbols, and "Exponents," "Orders," and "Indices" all mean powers and roots. The order itself never changes, regardless of which acronym a textbook happens to use. It's also worth reading Reverse Percentage: How to Find the Original Number if this situation applies to you. Rather than working this out by hand every time, the Scientific Calculator can handle the whole calculation for you.
Rather than four separate steps, the order of operations is really four priority levels, with two of them each containing a tied pair of operations:
The single most common misunderstanding of PEMDAS is treating it as six strictly ranked steps instead of four priority levels with two ties. That distinction is covered in detail further down, since it's the source of more wrong answers than any other part of the rule.
Consider the expression: 5 + 3 × (8 − 3)² ÷ 5
Notice that multiplication and division were handled together, in the order they appeared from left to right, rather than doing every multiplication in the expression before touching any division. That's the detail that trips up most people, and it's worth its own section.
Because the "M" in PEMDAS appears before the "D," many people assume every multiplication in an expression must be completed before any division. That's incorrect — multiplication and division sit at the same priority level and are resolved left to right, in the order they physically appear. Take 20 ÷ 4 × 2: doing the multiplication first (4 × 2 = 8, then 20 ÷ 8 = 2.5) gives a wrong answer. Working left to right instead — 20 ÷ 4 = 5, then 5 × 2 = 10 — gives the correct answer of 10. The acronym's letter order is a memory aid, not a strict ranking between those two operations.
The same tie applies to the last pair. Take 10 − 4 + 3: adding first (4 + 3 = 7, then 10 − 7 = 3) gives a wrong answer. Working left to right — 10 − 4 = 6, then 6 + 3 = 9 — gives the correct answer of 9. As with multiplication and division, addition and subtraction are a tied pair resolved in the order they appear, not addition first because the "A" comes before the "S" in the acronym. If you want to go further, Markup vs. Margin: How to Calculate Each Percentage Correctly explains this point in more depth.
When parentheses sit inside other parentheses or brackets, always resolve the innermost group first and work outward. Take 2 × [(3 + 4) × (5 − 2)]:
Many textbooks use different bracket shapes — ( ), then [ ], then { } — purely to make nested groups easier to read visually; all three carry identical mathematical priority as grouping symbols. You can use the Scientific Calculator to get the result instantly, with no manual math.
Exponents and roots sit at the same priority level, since a root is mathematically equivalent to a fractional exponent — a square root is the same as raising a number to the power of 1/2. Both are evaluated after every set of parentheses is reduced to a single value, and before any multiplication, division, addition, or subtraction touches the result. A square root symbol also acts as an implicit grouping symbol for whatever sits underneath it: in √(9 + 16), the addition inside the root must be completed first (giving √25 = 5) rather than taking the root of 9 alone and adding 16 to it afterward.
This exact expression periodically goes viral because different calculators genuinely return different answers, and the disagreement isn't really about the order of operations — it's about how to interpret implicit multiplication (a number placed directly next to parentheses with no × symbol, like 2(3)). Under strict left-to-right precedence for multiplication and division, the calculation reads: solve the parentheses first (1 + 2 = 3), giving 6 ÷ 2 × 3, then work left to right — 6 ÷ 2 = 3, then 3 × 3 = 9. That's the answer most scientific calculators and standard math convention produce. Some calculators, however, are programmed to treat implicit multiplication (2(3)) as binding more tightly than explicit division, effectively calculating 6 ÷ (2 × 3) = 1 instead. Both interpretations follow internally consistent logic, which is exactly why the expression is considered genuinely ambiguous notation rather than a simple right-or-wrong test — well-written math avoids the ambiguity entirely by inserting an explicit × symbol or an extra set of parentheses.
| Priority | Operation | Common symbols |
|---|---|---|
| 1 (highest) | Parentheses / Brackets | ( ) [ ] { } |
| 2 | Exponents / Roots | x², √x, x^n |
| 3 | Multiplication & Division (left to right) | × ÷ * / |
| 4 (lowest) | Addition & Subtraction (left to right) | + − |
Negative signs are a frequent source of order-of-operations errors, especially combined with exponents. Compare −3² with (−3)²: without parentheses around the negative sign, the exponent applies only to the 3, and the negation is applied last — so −3² = −(3²) = −9. With the negative sign enclosed in parentheses, the exponent applies to the entire quantity −3, so (−3)² = (−3) × (−3) = 9. That one pair of parentheses changes the sign of the final answer entirely, which makes it worth double-checking any expression where a negative number sits directly in front of an exponent. For a deeper look, our guide on How to Calculate a Tip: The Complete Tip Percentage Guide covers this in more detail.
Longer expressions simply chain the same four priority levels together, one pass at a time. Consider: 4² − (12 − 8) × 3 + 18 ÷ 2 × (5 − 3)²
Notice each priority level was fully cleared before moving to the next one, and within Step 3, the two multiplication/division operations were still handled strictly in the order they appeared — first the 4 × 3 on the left side of the expression, then the 18 ÷ 2 × 4 chain on the right. This is exactly the pattern to follow for any expression, no matter how many terms it contains.
A horizontal fraction bar (as opposed to the ÷ symbol) acts as its own grouping symbol, meaning everything above the bar and everything below it must each be fully simplified before the division itself is carried out. For an expression written as (6 + 4) over (2 × 1), the numerator and denominator are each treated as if they were wrapped in invisible parentheses: the numerator simplifies to 10 and the denominator to 2, giving a final value of 5. This is a common source of transcription errors when a fraction is typed into a calculator or a single line of text, since typing "6+4/2×1" without adding explicit parentheses around the numerator and denominator changes the order of operations entirely and produces a different, incorrect result. Whenever a fraction bar is converted into a single-line expression, wrapping the numerator and denominator each in their own parentheses preserves the original meaning. For an instant, practical check, the Scientific Calculator is ready to go.
The order of operations wasn't handed down as a single formal law — it developed gradually as mathematical notation matured, growing out of a practical need for mathematicians to write equations that meant the same thing to every reader without having to spell out every step in words. Grouping symbols like parentheses became standard in printed mathematics by the 16th and 17th centuries, and the convention of treating multiplication as "stronger" than addition — meaning it binds more tightly and should be done first — became widely accepted among mathematicians by the 18th and 19th centuries as algebraic notation spread through published works. The PEMDAS acronym itself is a much more recent teaching device, popularized in American classrooms in the 20th century (often paired with the mnemonic phrase "Please Excuse My Dear Aunt Sally") purely to help students remember an order that mathematicians had already been using in practice for a very long time. BODMAS emerged as the equivalent teaching shorthand in British and Commonwealth curricula, describing the identical underlying convention.
Skip the manual step-by-step work. Ihsabha's Scientific Calculator applies the full order of operations automatically — parentheses, exponents, roots, and left-to-right multiplication, division, addition, and subtraction — so multi-step expressions are solved correctly every time. This naturally leads to a related question, answered in How to Calculate Percentage Off: Discount & Sale Price Formula.
The order of operations isn't confined to the classroom — it's the same rule running silently underneath spreadsheets, programming languages, and financial formulas. Excel and Google Sheets both apply standard PEMDAS precedence when evaluating a formula, which is why =2+3*4 returns 14 rather than 20. Programming languages like Python, JavaScript, and C++ follow the same core precedence for arithmetic operators, though each language also defines additional precedence rules for operators math class never covers, like bitwise operations or logical comparisons. Financial formulas — compound interest, loan amortization, statistical calculations — are frequently written as a single long expression with several operation types combined, and applying the wrong order of operations to any of them silently produces an incorrect number rather than throwing a visible error, which is exactly why using a calculator that reliably applies order of operations correctly matters as much for a spreadsheet-heavy job as it does for a math exam.
Not every calculator handles order of operations the same way, and it's worth knowing the difference before trusting a result. Basic four-function calculators (the kind built into a phone's default calculator app in portrait mode, or a simple desk calculator) typically process operations strictly left to right with no priority given to multiplication, division, or exponents — entering 3 + 4 × 2 on one of these often returns 14, the same wrong-order answer covered earlier. Scientific calculators, by contrast, are built to apply the complete order of operations automatically, correctly prioritizing parentheses and exponents over multiplication and division, and multiplication/division over addition/subtraction, regardless of the order the numbers were typed in. For any expression that mixes more than one type of operation, a scientific calculator is the reliable choice — a basic four-function calculator simply isn't designed to apply the rule at all.
Parentheses, Exponents, Multiplication and Division, Addition and Subtraction. Multiplication/Division share one priority level solved left to right, and Addition/Subtraction share the next level, also solved left to right.
Yes. BODMAS (Brackets, Orders, Division/Multiplication, Addition/Subtraction) and PEMDAS describe the identical mathematical rule using different regional vocabulary — Orders and Exponents both mean powers and roots.
No. Multiplication and division share equal priority and are performed left to right in the order they appear, not multiplication first every time.
Following standard left-to-right precedence for multiplication and division, the answer is 9: solve the parentheses first (6÷2×3), then work left to right (3×3=9). The expression is a known example of notation ambiguity, which is why calculators sometimes disagree.
The order of operations itself is precise — every well-formed expression has exactly one correct answer under the rule. Nearly all of the disagreement people run into comes from one of two places: treating the acronym as six strictly ranked steps instead of four priority levels with two ties, or running into genuinely ambiguous notation like implicit multiplication next to division. Keep the four priority levels straight, work left to right through each tied pair, resolve nested groups from the inside out, and any multi-step expression becomes a mechanical, repeatable process rather than a guessing game.
Work it out instantly with Ihsabha's Percentage Calculator and Percentage Change Calculator. For related reading on Ihsabha's blog, see How to Use a Scientific Calculator: Every Function Explained, Degrees vs. Radians: The Complete Guide to Angle Units and Significant Figures: Rules, Examples & How to Round Correctly.