What is the order of operations?
The order of operations is the set of rules that decides which part of an expression to calculate first. Without it, the same expression could give different answers to different people. For example, 3 + 4 × 2 is 11, not 14, because multiplication comes before addition.
PEMDAS, BODMAS and BIDMAS
These are memory aids for the same rule, taught in different countries. They differ only in names, not in math.
| Priority | PEMDAS (US) | BODMAS (UK) | What to do |
|---|---|---|---|
| 1 | Parentheses | Brackets | Work inside the innermost pair first |
| 2 | Exponents | Orders (indices) | Powers and roots, right to left for stacked powers |
| 3 | Multiplication and Division | Division and Multiplication | Equal priority, left to right |
| 4 | Addition and Subtraction | Addition and Subtraction | Equal priority, left to right |
A common trap is reading PEMDAS as “multiplication before division” and “addition before subtraction.” Each pair shares one level, so you go left to right. The letters in the name only list the levels.
How to type an expression
- Use + − × ÷ or the keyboard symbols + - * /.
- Use ^ for exponents, so 2^3 means 2 cubed. You can also write 5².
- Use ( ), [ ] or { } for grouping. They all work the same way.
- Put a minus sign in front of a number or bracket for negatives, such as −3 or −(2 + 1).
- Write a number next to a bracket for multiplication, so 2(3 + 4) means 2 × (3 + 4).
- Use numbers only. For functions such as sin, log and √, use the scientific calculator with steps, and for equations with x, use the linear equation calculator.
Worked examples
Multiplication before addition: 3 + 4 × 2
Multiply first: 4 × 2 = 8. Then add: 3 + 8 = 11.
Parentheses first: (3 + 4) × 2
Work inside the parentheses: 3 + 4 = 7. Then multiply: 7 × 2 = 14. The brackets changed the answer from 11 to 14.
Left to right: 8 ÷ 2 × 4
Division and multiplication have equal priority, so go left to right: 8 ÷ 2 = 4, then 4 × 4 = 16. Doing the multiplication first would wrongly give 1.
Subtraction then addition: 12 − 3 + 2
Go left to right: 12 − 3 = 9, then 9 + 2 = 11. Adding first would wrongly give 7.
With an exponent: 2 + 3² × 4
The exponent comes first: 3² = 9. Then multiply: 9 × 4 = 36. Then add: 2 + 36 = 38.
Several levels together: 20 − 2 × (3 + 4)² ÷ 7
Parentheses: 3 + 4 = 7. Exponent: 7² = 49. Multiplication and division left to right: 2 × 49 = 98, then 98 ÷ 7 = 14. Subtraction: 20 − 14 = 6.
Nested brackets: 2 × [5 + (8 − 3)]
Start with the innermost pair: 8 − 3 = 5. Then 5 + 5 = 10. Then 2 × 10 = 20.
Negative numbers and exponents
A minus sign in front of a number with an exponent is easy to misread. In −3², the exponent applies only to the 3, so the result is −(9) = −9. In (−3)², the brackets make −3 the base, so the result is (−3) × (−3) = 9. Stacked exponents are evaluated from the top down: 2^3^2 = 2^(3^2) = 2^9 = 512, not (2^3)^2 = 64.
The 8 ÷ 2(2 + 2) debate
Expressions like 8 ÷ 2(2 + 2) go viral because they have no single agreed answer. If 2(2 + 2) is treated as ordinary multiplication, you get 8 ÷ 2 × 4 = 16. If it is treated as one grouped unit, you get 8 ÷ 8 = 1. This calculator uses the first convention, with a number next to a bracket having the same priority as ×, and it shows a note whenever your expression could be read both ways. The reliable fix is to write brackets: (8 ÷ 2) × (2 + 2) = 16 or 8 ÷ (2 × (2 + 2)) = 1.
Common mistakes
- Doing all multiplication before all division. They share one level, so go left to right.
- Doing all addition before subtraction. The same left-to-right rule applies.
- Misreading − 3². Without brackets, the exponent is applied before the minus sign.
- Skipping the parentheses. Always simplify the innermost pair first.
- Applying an exponent to more than it touches. In 2 × 3², only the 3 is squared.
For more practice with the pieces, see the exponent and root calculator and the fraction calculator.
Frequently asked questions
What is the order of operations?
The order of operations is the agreed sequence for evaluating an expression: parentheses first, then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. It ensures everyone gets the same answer from the same expression.
What is the difference between PEMDAS and BODMAS?
There is no difference in the math. PEMDAS is the US name (Parentheses, Exponents, Multiplication and Division, Addition and Subtraction). BODMAS and BIDMAS are the UK and Commonwealth names, using brackets and orders or indices. All describe the same four levels of priority.
Do multiplication and division have the same priority?
Yes. They share one level, so you work through them from left to right, whichever appears first. In 8 ÷ 2 × 4, divide first to get 4 × 4 = 16. Addition and subtraction also share a level and are handled left to right.
Why is −3² equal to −9 but (−3)² equal to 9?
Without brackets, the exponent applies only to the 3, so −3² means −(3²) = −9. With brackets, the whole number −3 is squared, so (−3)² = (−3) × (−3) = 9. Brackets change what the exponent touches.
What do you do with nested parentheses?
Work from the innermost pair outward. In 2 × [5 + (8 − 3)], first evaluate (8 − 3) = 5, then the square brackets 5 + 5 = 10, then multiply by 2 to get 20. Square brackets and braces act exactly like parentheses.
How do you evaluate stacked exponents like 2^3^2?
Evaluate exponents from the top down, which means right to left. So 2^3^2 is 2^(3^2) = 2^9 = 512, not (2^3)^2 = 64. Adding brackets removes any doubt about which you mean.
Why do different calculators give different answers for 8 ÷ 2(2 + 2)?
The expression is ambiguous. Treating 2(2 + 2) as ordinary multiplication gives 8 ÷ 2 × 4 = 16, while treating it as one grouped unit gives 8 ÷ 8 = 1. Conventions differ, so write brackets to show which you mean.
More Arithmetic and Fractions calculators
Browse every arithmetic and fractions calculator.
Other calculators
- Quadratic Formula Calculator
- Mean, Median, Mode Calculator
- Pythagorean Theorem Calculator
- Standard Deviation Calculator
- Slope, Distance and Midpoint Calculator
- Linear Equation Calculator
- Area Calculator
- Volume Calculator
- Circle Calculator
- System of Equations Calculator
- Scientific Calculator with Steps
- Z-Score Calculator
- Permutation and Combination Calculator
Related topics on this page: PEMDAS, BODMAS, BIDMAS, parentheses, brackets, exponents, orders and indices, left to right, evaluate an expression, mixed operations, negative numbers