Order of operations calculator
An order of operations calculator evaluates a typed expression the way the rules require: parentheses first, then exponents, then multiplication and division left to right, then addition and subtraction left to right. Typing 2 + 3 × 4 − 1 below returns 13, not 19, because the multiplication resolves before either the addition or the subtraction runs. The tool below breaks down any expression the same way, one step at a time, and states why each step goes when it does.
- 3 × 4=12multiplication and division happen before addition and subtraction
- 2 + 12=14addition and subtraction happen left to right
- 14 − 1=13addition and subtraction happen left to right
Result13
What PEMDAS and BODMAS actually mean
PEMDAS and BODMAS are the same rule, written with different regional names for the same four levels. Parentheses and Brackets are the same first step; Exponents and Orders are the same second step. The remaining two letters mean the same thing in both: multiplication and division tied together, addition and subtraction tied together. A student taught one acronym sometimes assumes the other describes a different rule — it doesn't. It's the identical order of operations, spelled out with different words for the same two early steps.
The rules, in order
- Parentheses (or brackets) — whatever is inside resolves first, independent of anything outside it. Nested parentheses resolve from the innermost pair outward.
- Exponents (or orders) — powers and roots apply next. A chain of exponents resolves right to left, the one place the order isn't simply left to right.
- Multiplication and division — these share one level, not two, and run in the order they appear, left to right.
- Addition and subtraction — these also share one level, and run left to right the same way.
Where people get it wrong
These are the pemdas rules and bodmas rules most often applied incorrectly — each one loads into the tool above so you can watch the actual order it resolves in.
It looks like the division should finish before the multiplication starts, so a common wrong reading treats it as 100 ÷ (5 × 2), giving 10. Division and multiplication share one precedence level — there's no rule that finishes all the division before any multiplication runs. Read left to right instead: 20 first, then 40.
Squaring looks like it should apply to the whole thing, sign included, so a common wrong reading treats it as (−3)², giving the positive 9. The exponent binds to the 3 alone; the sign applies only after the power has already resolved: 9 first, then -9.
Reading left to right like every other operator gives (2^3)^2, or 64. Chained exponents are the one exception to left-to-right — they resolve right to left, so the rightmost pair goes first: 9, then 512.
Reading strictly left to right — add, then multiply, then subtract — gives 19. Multiplication outranks addition and subtraction no matter where it sits in the expression: 12 resolves first, then the addition and subtraction run left to right to reach 13.
Worked examples
Parentheses override precedence
The parentheses resolve first and independently of each other: 5 and 3. Only once both are reduced does the multiplication run, giving 15. Nothing about which parenthesis appears first matters — both resolve before the operator between them ever runs.
Implicit multiplication
π is a constant, not a variable to solve for, and two values written side by side with nothing between them means multiply: 2π is read the same as 2 × π, giving 6.28318530718. Implicit multiplication follows the exact same precedence as a typed × sign — it isn't a separate, higher-priority rule.
Same precedence, left to right
Subtraction and addition share one precedence level, so with nothing else in the expression to resolve first, this reads left to right exactly as written: 6, then 3. Resolving right to left instead would give a different, wrong answer — which is exactly why the left-to-right rule exists rather than being left to guesswork.
Frequently asked questions
What does PEMDAS stand for?
Parentheses, Exponents, Multiplication and Division, Addition and Subtraction — the order those levels resolve in, with multiplication and division sharing one level and addition and subtraction sharing the other, not four separate steps run one after another.
Is BODMAS the same as PEMDAS?
Yes. BODMAS stands for Brackets, Orders, Division and Multiplication, Addition and Subtraction — the identical rule, just spelled out with different regional names for the same tied levels. Brackets are parentheses, orders are exponents, and nothing about the actual precedence changes between the two.
Does multiplication always happen before division?
No — that's the most common misreading of the acronym. Multiplication and division share one precedence level and resolve in the order they appear, left to right, not multiplication-always-first — the 100 ÷ 5 × 2 example in the mistakes section above resolves to 40 that way, not 10.
Why does exponent chaining resolve right to left instead of left to right?
Because that's the associativity rule for exponents specifically — the rightmost pair of exponents evaluates first, then that result becomes the base for the power above it. Reading a chain of exponents left to right instead gives a different, wrong answer, which the mistakes section above works out both ways.
What order do you solve a negative number raised to a power in?
The exponent applies to the number alone before the sign in front of it does anything — the sign is applied last, after the power has already resolved. The mistakes section above works through exactly this case and shows both the right answer and the commonly wrong one.
Does this calculator solve equations, like solving for x?
No — it evaluates a complete expression once every value in it is already known, the same way a physical calculator does. Isolating an unknown letter in an equation is a different kind of problem, algebra rather than arithmetic evaluation, and this tool doesn't attempt it.
Does implicit multiplication follow the same precedence as a typed multiplication sign?
Yes — writing two values side by side with nothing between them, like a number directly next to π, means multiply, and it resolves at exactly the same precedence level as a typed × sign. It isn't a separate, higher-priority rule; the worked examples section above shows it evaluated in full.
What happens with unbalanced parentheses or an empty input?
Unbalanced parentheses return a plain message saying so rather than a guess at what was meant, and an empty input simply waits for something to be typed rather than showing an error. Both are explicit, plain-language states — never a blank result or a cryptic symbol.