The rule
- Parentheses (brackets) first, working from the inside out.
- Exponents (powers and roots).
- Multiplication and Division, together, from left to right.
- Addition and Subtraction, together, from left to right.
In the UK and elsewhere it's taught as BODMAS or BIDMAS (Brackets, Orders or Indices, Division, Multiplication, Addition, Subtraction). It's the same rule with different names.
The trap: M doesn't come before D
PEMDAS makes it look as if multiplication always beats division, and addition always beats subtraction. It doesn't. They are pairs, and within each pair you go left to right.
| Expression | Right | Wrong |
|---|---|---|
| 12 ÷ 3 × 2 | (12 ÷ 3) × 2 = 8 | 12 ÷ (3 × 2) = 2 |
| 10 − 4 + 3 | (10 − 4) + 3 = 9 | 10 − (4 + 3) = 3 |
Worked examples
| Expression | Steps | Answer |
|---|---|---|
| 2 + 3 × 4 | 3 × 4 = 12, then 2 + 12 | 14 |
| (2 + 3) × 4 | 2 + 3 = 5, then 5 × 4 | 20 |
| 3 + 2^3 × 2 | 2^3 = 8, 8 × 2 = 16, 3 + 16 | 19 |
| 20 − 6 ÷ 3 + 1 | 6 ÷ 3 = 2, then 20 − 2 + 1 left to right | 19 |
| −3^2 | the power comes before the minus: −(3^2) | −9 |
| (−3)^2 | the parentheses make the −3 the base | 9 |
| 2^3^2 | powers stack from the top down: 2^(3^2) = 2^9 | 512 |
The famous viral one: 6 ÷ 2(1 + 2)
Following the rule as written, the parentheses give 3, then 6 ÷ 2 × 3 left to right is 9. Some people read "2(1 + 2)" as one stuck-together term and get 1. Both readings exist in older textbooks, which is exactly why mathematicians write it clearly instead: 6 ÷ (2(1 + 2)) or (6 ÷ 2)(1 + 2). Calcist follows the left-to-right rule and gives 9, and its working shows you how it read the sum.
Try it
Type any of the examples into the scientific calculator or the ask bar on the homepage. Calcist shows each step in order, so you can see exactly which part it did first.
Every worked example on this page was checked with Calcist's own engine and an independent reference.