Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Use the Order of Operations

An expression with several operations has exactly one value. Work inside groups first, then powers, then multiplication and division from left to right, and last addition and subtraction from left to right.

Recognize the task

One expression mixes several operations: 3+4⋅23 + 4 \cdot 2, 20−12÷4⋅220 - 12 \div 4 \cdot 2, (5−2)2+6÷3(5 - 2)^2 + 6 \div 3, a fraction bar with a sum above or below it. Test: if doing the operations in a different order could give a different number, the order rules decide which one is right.
The order of operations is a convention; the rules it works with, such as how multiplication spreads over a sum and how signs combine, are in the properties of arithmetic operations lesson.

Steps

StepOn 20−12÷4⋅2+(1+2)220 - 12 \div 4 \cdot 2 + (1 + 2)^2
1Work inside grouping symbols. Parentheses, brackets, and the top and bottom of a fraction bar each count as a group. Start with the innermost group.20−12÷4⋅2+3220 - 12 \div 4 \cdot 2 + 3^2
2Evaluate powers. An exponent applies only to the number or group directly in front of it.20−12÷4⋅2+920 - 12 \div 4 \cdot 2 + 9
3Multiply and divide from left to right. Multiplication and division have the same rank: do whichever comes first as you read. Here 12÷4=312 \div 4 = 3, then 3⋅2=63 \cdot 2 = 6.20−6+920 - 6 + 9
4Add and subtract from left to right. Subtracting is adding the opposite (subtraction as inverse addition), so the two share one rank and go strictly left to right.14+9=2314 + 9 = 23

Worked examples

Example 1 · a product inside a sum

two ranks
7+3⋅5−27 + 3 \cdot 5 - 2
multiplication outranks addition
7+15−27 + 15 - 2
multiply first
2020
add and subtract left to right

Example 2 · division and multiplication in a row

left to right
36÷3⋅2−2336 \div 3 \cdot 2 - 2^3
one power, then equal ranks
36÷3⋅2−836 \div 3 \cdot 2 - 8
power first
12⋅2−8=24−812 \cdot 2 - 8 = 24 - 8
divide, then multiply, left to right
1616
subtract last

Example 3 · nested groups and a negative

brackets
−22+3[10−(4−6)2]-2^2 + 3[10 - (4 - 6)^2]
innermost group first
(4−6)2=(−2)2=4(4 - 6)^2 = (-2)^2 = 4
group, then its power
3[10−4]=3⋅6=183[10 - 4] = 3 \cdot 6 = 18
finish the bracket, then multiply
−22=−4-2^2 = -4
the power comes before the minus
−4+18=14-4 + 18 = 14
add last

See it happen

Think of an expression as a tree of operations. Each operation needs finished numbers on both sides before it can run, so the operations deeper in the tree, inside groups and powers, are done first. The rank order, groups, powers, multiplication and division, addition and subtraction, tells you how the tree is built when no parentheses are written, and "left to right" settles ties between operations of the same rank.

Common mistakes

Adding before multiplying

✗ 7+3⋅5=10⋅5=507 + 3 \cdot 5 = 10 \cdot 5 = 50
✓ 7+3⋅5=7+15=227 + 3 \cdot 5 = 7 + 15 = 22

Always multiplying before dividing

✗ 48÷6⋅2=48÷12=448 \div 6 \cdot 2 = 48 \div 12 = 4
✓ left to right: 48÷6⋅2=8⋅2=1648 \div 6 \cdot 2 = 8 \cdot 2 = 16
The letters M and D in PEMDAS share one rank; so do A and S.

Squaring the minus sign

✗ −32=9-3^2 = 9
✓ −32=−(32)=−9-3^2 = -(3^2) = -9; only (−3)2=9(-3)^2 = 9
The product of two negatives is positive by the sign rules, but in −32-3^2 the minus is not part of the base.

Adding before a subtraction on its left

✗ 10−4+3=10−7=310 - 4 + 3 = 10 - 7 = 3
✓ 10−4+3=6+3=910 - 4 + 3 = 6 + 3 = 9