Order of operations tutorial
When a mathematical expression contains more than one operation, the order you perform them in matters. A wrong order gives a wrong answer. The rules that determine the correct order are called the order of operations — remembered with the acronym PEMDAS.
PEMDAS
Parentheses
Exponents
Multiply / Divide (left to right)
Add / Subtract (left to right)
P — Parentheses first
Any expression inside parentheses (or brackets, or braces) is evaluated before anything outside. Work from the innermost parentheses outward when they are nested.
$\mathbf{(3 + 4) \times 2}$
Inside first: $3 + 4 = 7$
Then multiply: $7 \times 2 = \mathbf{14}$
Wrong order (no parentheses rule): $3 + 4 \times 2 = 3 + 8 = 11$ ✗
E — Exponents
Evaluate all powers and roots before any multiplication, division, addition, or subtraction — unless they are inside parentheses (which go first).
$\mathbf{2 + 3^2 \times 4}$
Exponent first: $3^2 = 9$
Then multiply: $9 \times 4 = 36$
Then add: $2 + 36 = \mathbf{38}$
MD — Multiply and Divide
Multiplication and division share the same priority level. When both appear, work left to right — do whichever comes first from the left.
$\mathbf{2 + 6 \times 3}$
Multiply before adding: $6 \times 3 = 18$
Then add: $2 + 18 = \mathbf{20}$
$\mathbf{12 \div 4 \times 3}$ (left to right)
$12 \div 4 = 3$, then $3 \times 3 = \mathbf{9}$
AS — Add and Subtract
Addition and subtraction are the last operations performed. Like multiplication and division, they share a priority level — work left to right when both appear.
$\mathbf{15 - 8 + 3}$ (left to right)
$15 - 8 = 7$, then $7 + 3 = \mathbf{10}$
Full PEMDAS walk-through
Evaluate: $(2^3 + 4) \times 3 - 10 \div 2$
-
Parentheses: work inside $(2^3 + 4)$
— exponent first: $2^3 = 8$, then add: $8 + 4 = 12$ - Expression so far: $12 \times 3 - 10 \div 2$
-
Multiply/Divide (left to right):
$12 \times 3 = 36$, then $10 \div 2 = 5$ → expression: $36 - 5$ - Subtract: $36 - 5 = \mathbf{31}$
Try a sample problem
Evaluate the expression using PEMDAS. Click Check answer to see the step-by-step solution.