The order of operations is the agreed sequence for evaluating an expression: parentheses first, then exponents, then multiplication and division, then addition and subtraction. The shorthand is PEMDAS. Following it means everyone gets the same answer from the same expression. The scientific calculator applies these rules for you.
Here is the rule, with examples and the traps that catch people out.
What PEMDAS means
PEMDAS lists the operations in priority order:
- Parentheses: anything inside brackets is worked out first.
- Exponents: powers and roots come next.
- Multiplication and Division: these share a rank, done left to right.
- Addition and Subtraction: these also share a rank, done left to right.
The same rule is called BODMAS or BIDMAS in some countries, with “orders” or “indices” in place of exponents. The order is identical; only the name differs.
A worked example
Take 3 + 4 × 2² − (5 − 1).
- Parentheses: (5 − 1) = 4, leaving 3 + 4 × 2² − 4.
- Exponents: 2² = 4, leaving 3 + 4 × 4 − 4.
- Multiplication: 4 × 4 = 16, leaving 3 + 16 − 4.
- Addition and subtraction, left to right: 3 + 16 = 19, then 19 − 4 = 15.
So the answer is 15. Doing the addition before the multiplication would give a different, wrong result, which is exactly what the order is there to prevent.
The equal-rank trap
The most common mistake is thinking multiplication always beats division, or addition always beats subtraction. They do not. Within each pair, you work left to right in the order the operations appear.
For 8 ÷ 2 × 4, the division comes first, so it is (8 ÷ 2) × 4 = 4 × 4 = 16, not 8 ÷ (2 × 4) = 1. The same applies to 10 − 4 + 2, which is (10 − 4) + 2 = 8, not 10 − (4 + 2) = 4.
When notation is ambiguous
Some expressions are written in a way that PEMDAS alone does not settle, such as 8 ÷ 2(2 + 2). Read strictly left to right it is 16, but some conventions treat the implied multiplication as binding more tightly, giving 1. The honest answer is that the notation is ambiguous, and the fix is to add explicit brackets. A calculator follows a fixed rule, so writing 8 ÷ (2 × (2 + 2)) or (8 ÷ 2) × (2 + 2) makes your intent clear.
Where this comes up
The order of operations underlies almost every calculation:
- Formulas, such as substituting values into the quadratic formula, covered in how to solve a quadratic equation.
- Spreadsheets and code, which apply the same precedence, so an expression behaves as expected.
- Mental arithmetic, where knowing the order stops small slips.
Open the scientific calculator to type an expression with brackets and powers and see it evaluated in the right order.