Order of operations calculator
Type an expression with brackets, powers, multiplication, division, addition and subtraction. The calculator does one operation per step in the standard order and rewrites the expression after each one, so you can follow or check homework line by line.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Type the expression, for example
3 + 6 × (5 + 4) ÷ 3 − 2^3.
- Choose fractions or decimals.
- Read the steps: each line names the rule used, the single operation, and the expression after it.
How it works
The expression is read into a tree that follows the usual rules: exponents bind tighter than × and ÷, which bind tighter than + and −; equal ranks group left to right, except powers, which group right to left. At each step the calculator picks an operation whose two operands are already numbers — the deepest brackets first, then exponents, then × ÷, then + −, each from the left — and replaces it by its result.
Worked example
3 + 6 × (5 + 4) ÷ 3 − 2 ^ 3:
- Brackets: 5 + 4 = 9 → 3 + 6 × 9 ÷ 3 − 2 ^ 3
- Exponent: 2 ^ 3 = 8 → 3 + 6 × 9 ÷ 3 − 8
- Multiplication: 6 × 9 = 54 → 3 + 54 ÷ 3 − 8
- Division: 54 ÷ 3 = 18 → 3 + 18 − 8
- Addition: 3 + 18 = 21 → 21 − 8
- Subtraction: 21 − 8 = 13
Common mistakes
- Adding before multiplying: 2 + 3 × 4 is 14, not 20.
- Doing all multiplications before divisions: × and ÷ go strictly left to right.
- Forgetting that a minus sign in front of a power is applied after the power.
Frequently asked questions
What is the order of operations?
Brackets first (innermost first), then exponents, then multiplication and division from left to right, then addition and subtraction from left to right. PEMDAS, BODMAS, BIDMAS and GEMDAS are different names for the same rule.
Does multiplication come before division?
No. They have the same rank and are done from left to right, and the same goes for addition and subtraction. So 8 ÷ 4 × 2 = 2 × 2 = 4, not 8 ÷ 8 = 1.
What is 6 ÷ 2(1 + 2)?
This calculator treats 2(1 + 2) as an ordinary multiplication, so after the bracket it works left to right: 6 ÷ 2 × 3 = 3 × 3 = 9. Some people give implied multiplication a higher rank and get 1, which is why the expression is famous for being ambiguous; write 6 ÷ (2(1 + 2)) if you mean 1.
Why is −3^2 equal to −9?
The exponent applies to 3 before the minus sign, so −3^2 = −(3^2) = −9. To square negative three, write (−3)^2 = 9. Powers also group from the right: 2^3^2 = 2^9 = 512.
Are the results rounded?
No. Every step is done in exact fractions, so 1/3 + 1/6 gives exactly 1/2. In decimal mode the numbers are shown with up to 10 decimal places, but the calculation underneath stays exact.