Order of Operations Calculator
Type an expression and get the answer with every PEMDAS step shown — brackets, exponents, multiplication and division, then addition and subtraction.
- Brackets — Subtract: 7 − 2 = 5
- 8 + 3 × 5 ^ 2 ÷ 5
- Exponent: 5 ^ 2 = 25
- 8 + 3 × 25 ÷ 5
- Multiply: 3 × 25 = 75
- 8 + 75 ÷ 5
- Divide: 75 ÷ 5 = 15
- 8 + 15
- Add: 8 + 15 = 23
- 23
How to use this calculator
- Type your expression.
+ − × ÷ ^and brackets all work, and so do*,/andxif they are easier to reach. - Read the answer at the top.
- Open the working panel for the steps. Each line names the operation that ran and shows what the expression looked like afterwards, so you can follow it the way you would on paper.
The steps are the reason to use this rather than a plain calculator. If your own answer differs, the step list shows exactly which line you and it parted company on.
The order of operations, in order
| Stage | Symbols | Direction |
|---|---|---|
| Brackets | ( ) and [ ] | Innermost first |
| Exponents | ^ | Right to left |
| Multiply and divide | × ÷ | Left to right, equal rank |
| Add and subtract | + − | Left to right, equal rank |
The two middle words in each acronym are the source of nearly every mistake. Multiplication and division sit on the same line, as do addition and subtraction — the acronym lists them in an order for pronunciation, not for precedence.
A worked example
Take 8 + 3 × (7 − 2)^2 ÷ 5. The stages run in this order:
- Brackets —
7 − 2 = 5, leaving8 + 3 × 5^2 ÷ 5. - Exponent —
5^2 = 25, leaving8 + 3 × 25 ÷ 5. - Multiply — leftmost of the equal-ranked pair,
3 × 25 = 75. - Divide —
75 ÷ 5 = 15, leaving8 + 15. - Add —
8 + 15 = 23.
Working straight through from left to right instead gives 605 — which is what a basic calculator with no precedence returns, and why the calculator shows that figure beside the correct one.
Expressions people get wrong
| Expression | Common answer | Correct |
|---|---|---|
| 8 ÷ 4 × 2 | 1 | 4 |
| 8 − 3 − 2 | 7 | 3 |
| 2 ^ 3 ^ 2 | 64 | 512 |
| 100 − 5^2 × 2 | 4,950 | 50 |
| 6 ÷ 2(1 + 2) | 1 | 9 |
Each row has the same cause: treating one operator as outranking another of equal rank, or forgetting that exponents run right to left. Paste any of them in above and the steps show where the other answer comes from.