Arithmetic
Order of Operations Beyond PEMDAS
PEMDAS has six letters and describes four tiers. That mismatch is the source of nearly every mistake in this topic.
The idea
Precedence rules are not mathematical facts. They are typesetting conventions, chosen so that the expressions people write most often need the fewest brackets. Multiplication outranks addition because polynomials are everywhere: without the convention, would have to be written as , and nobody would tolerate that.
Once you see the rules as a compression scheme rather than a law, the four tiers make sense as a hierarchy of how strongly an operation binds to the symbols beside it. Exponents bind tightest, then multiplication and division, then addition and subtraction, with grouping symbols available to override any of it.
The reason PEMDAS misleads is that it lists six operations in a row, which invites the reading that multiplication outranks division and that addition outranks subtraction. Neither is true, and neither could be true, for a reason that is worth spelling out.
Reading like a marker means applying the convention to what is written rather than to what was meant. If you write intending , the convention delivers , and the two differ by a factor of . Nobody is being pedantic when they mark that wrong: the notation has one agreed meaning, and a solution that relies on the reader guessing your intent is not a solution. The habit that prevents this is bracketing anything you would have to explain aloud.
When you need it
Order of operations is invisible when it goes right and expensive when it goes wrong. These are the situations where it does the most damage:
- Substituting a negative number into a formula. Working out with requires , and dropping the brackets silently produces .
- Typing an expression into a calculator or spreadsheet. The machine follows the convention exactly, so an omitted bracket around a numerator produces a confidently wrong number.
- Distributing over a bracket. is , and forgetting the second product is a precedence failure, not a careless one.
- Evaluating a formula with a fraction bar written on one line. Anything with a multi-term numerator needs brackets that the printed version did not show.
- Any expression mixing with a bracket, which is where the genuinely ambiguous cases live.
The method
Start with the fact the acronym hides. Division is not a separate operation from multiplication; it is multiplication by a reciprocal. Likewise subtraction is addition of a negative:
Rewrite any chain that way and the ordering question disappears, because multiplication and addition can be reordered freely. Test it on :
Now compare the two possible readings of the original. Left to right gives , which matches. Right to left gives , which does not. The left-to-right rule is not arbitrary: it is the reading that agrees with the reciprocal form. The same argument settles subtraction, where is , matching left-to-right and contradicting the alternative.
Exponents are the exception, and for an equally concrete reason. A stacked exponent groups right to left:
Grouping left to right would be pointless, because is just and could already be written without stacking. Right-to-left grouping is the convention that lets the notation express something it otherwise could not.
The minus sign in front of a power. In , the negation is a multiplication by , so it lives on the multiplication tier — below exponents. The exponent applies to the 3 alone:
This is the one place where the tools genuinely disagree, and it is worth knowing which one you are holding. Python evaluates as , matching the mathematical convention. Excel and Google Sheets evaluate as , because their parsers give the unary minus higher precedence than the power. Neither is a bug; they are different published conventions. The practical consequence is that a formula copied from a worksheet into a spreadsheet can change value silently, so bracket the base explicitly whenever the sign matters.
Invisible grouping symbols. Parentheses are not the only ones. A fraction bar groups its numerator and its denominator separately, a radical groups everything under it, absolute value bars group their contents, and an exponent groups its own expression. That is why is , while the same characters typed on one line as come out as .
The procedure, then:
- Rewrite the awkward parts. Turn divisions into fractions and subtractions into added negatives whenever the expression is long enough to lose track of.
- Work groupings from the inside out, remembering the invisible ones. A nested bracket is finished before its parent is touched.
- Exponents, right to left. Evaluate anything sitting in an exponent before applying it.
- Multiplication and division, left to right. One tier. If the division is written first, it happens first.
- Addition and subtraction, left to right. One tier again.
- Estimate independently. Round everything and redo it in your head. Precedence errors usually change the magnitude, not just the last digit, so a rough check catches them.
Solve a arithmetic problem now
First solution freeThree worked examples
The first exercises the two shared tiers. The second adds a bracket and a negative base. The third is the one built to punish every shortcut at once.
Worked example
- 1
No groupings and no exponents, so go straight to the multiplication-and-division tier. Both operations happen here, in reading order.
- 2
Substitute both results. The expression is now purely additive.
- 3
Work left to right. Doing the addition first, as PEMDAS's letter order suggests, would give 12 − 15 = −3, which is wrong.
- 4
Check by rewriting as added negatives: 12 + (−12) + 3, which can be summed in any order and still gives 3.
Answer
Worked example
- 1
Innermost grouping first. The bracket is a single grouping, so evaluate the subtraction inside it before anything else touches it.
- 2
Now the exponent. The base is the whole bracketed value, including its sign, because the brackets are what the exponent attaches to.
- 3
The expression is now 8 − 3 × 4 ÷ 2. Multiplication and division share a tier, so work left to right: the multiplication is written first.
- 4
Then the division.
- 5
Finally the subtraction. Note that the 3 was never subtracted from the 8 — it belongs to the product.
Answer
Worked example
- 1
The fraction bar is a grouping symbol, so the numerator and the denominator are each finished before the division between them happens. Start with the numerator, where the two minus signs behave differently.
- 2
Add them. The first term is negative because the exponent applied only to the 3; the second is positive because the brackets put the sign inside.
- 3
Now the denominator. Any non-zero number raised to the power zero is 1, and that exponent is evaluated before the multiplication by 2.
- 4
The fraction is therefore seven thirds. Do not convert to a decimal; the final answer stays exact.
- 5
Handle the trailing term separately. Division and multiplication share a tier, so the division is done first because it is written first. Reading it as 6 ÷ (3 · 2) would give 1, which is the trap.
- 6
Subtract, using a common denominator of 3.
- 7
Estimate to check: the fraction is a bit over 2, minus 4, so an answer near −1.7 is expected. −5/3 is −1.67.
Answer
Find the planted mistake
One line below breaks the rules. The final answer looks tidy enough to pass a quick glance, which is exactly how this error survives into marked work.
Evaluate 20 − 6 ÷ 2 × 5 + 3²
One of these lines is wrong. Click it.
Where people go wrong
Doing all multiplication before any division
is , not . The M appearing before the D in the acronym is an artefact of needing a pronounceable word, not a statement about precedence. The same applies to addition and subtraction: is , not .
Losing the brackets around a negative base
When you substitute into , write . Writing asks a different question and answers . This single habit accounts for a large share of the discriminant errors in quadratic formula problems, where is negative more often than not.
Treating a fraction bar as ordinary division
Retyping onto one line as divides only the radical, and then the multiplies rather than divides. The numerator and denominator each need their own brackets: .
Arguing about deliberately ambiguous expressions
has no defensible single answer. Treating implicit multiplication like explicit multiplication gives 16, and giving juxtaposition higher precedence — standard in a lot of scientific typesetting — gives 1. Both camps are applying a real convention consistently. The mathematically useful response is not to pick a side but to write or and remove the question.
Practice
Evaluate each exactly. Where the answer is a fraction, write it as in lowest terms.
Four expressions, four different traps
Answers are checked here — nothing is sent anywhere.
- 1
- 2
- 3
- 4
Where this goes next
The exponent tier is the one with the most hidden structure, and the rules for combining and splitting powers and radicals explain why had to be 1 in the third example rather than 0. Precedence errors also cluster in a handful of recognisable places, catalogued with fixes in the twelve algebra mistakes that quietly cost marks. When an expression is long enough that a slip is likely, the algebra solver evaluates it tier by tier so you can see exactly which step your working diverged at.