Order of Operations
Type an expression and watch it collapse one operation at a time, in PEMDAS order.
- 12 × 3 = 6→ 6 + 6
- 26 + 6 = 12→ 12
The order of operations is PEMDAS: Parentheses, Exponents, then Multiplication and Division (left to right), then Addition and Subtraction (left to right). So 6 + 2 × 3 = 12, not 24 — you multiply 2 × 3 = 6 first, then add 6 + 6 = 12. Parentheses always override this order.
What PEMDAS and BODMAS mean
PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction) and BODMAS (Brackets, Orders, Division, Multiplication, Addition, Subtraction) are the same rule with different names — they give identical answers. The letters list four ranks, not six. Multiplication and division sit at one shared rank, and addition and subtraction share the rank below it. When operators of equal rank meet, you work left to right — so 8 ÷ 2 × 4 is (8 ÷ 2) × 4 = 16, not 8 ÷ (2 × 4) = 1.
Four ranks, highest to lowest. × and ÷ share a rank; + and − share the next; equal ranks go left to right. Exponents are right-associative (2^3^2 = 2^9).
Worked example: 2 + 3 × 4² ÷ 8
Nothing is in parentheses, so start with the exponent, then handle × and ÷ left to right, and add last.
- 1 Do parentheses first. There are none here, so move on to the next rank.
- 2 Resolve exponents. 4² = 16, so the expression becomes 2 + 3 × 16 ÷ 8.
- 3 Multiply and divide, left to right. 3 × 16 = 48, then 48 ÷ 8 = 6 — the division is not saved for last.
- 4 Add and subtract, left to right. 2 + 6 = 8, which is the final result.
The four precedence ranks
Multiplication/division share one rank and addition/subtraction share the next; within a rank, evaluate left to right. Exponents are the exception — they associate right to left.
| Rank | Operation | Direction | Example |
|---|---|---|---|
| 1 (highest) | Parentheses ( ) | inner brackets first | (6 + 2) × 3 = 24 |
| 2 | Exponents ^ | right to left | 2 ^ 3 ^ 2 = 2⁹ = 512 |
| 3 | Multiplication × and Division ÷ | left to right | 8 ÷ 2 × 4 = 16 |
| 4 (lowest) | Addition + and Subtraction − | left to right | 10 − 2 − 3 = 5 |
Why 6 + 2 × 3 is 12, not 24
The most common mistake is reading strictly left to right: 6 + 2 = 8, then 8 × 3 = 24. But multiplication outranks addition, so 2 × 3 = 6 happens first, leaving 6 + 6 = 12. If you truly want the addition first, you must write it with parentheses: (6 + 2) × 3 = 24.
The second common trap is assuming multiplication always beats division, or addition always beats subtraction. It does not — each pair shares a single rank, so you simply work left to right. That is why 10 − 2 − 3 = 5 (not 11) and 8 ÷ 2 × 4 = 16 (not 1).