### The order of operations

The result of a list of calculations using some or all of the four arithmetic operations – addition, subtraction, multiplication and division – can vary depending on the order in which the calculations are performed.

For example, look at the following calculation.

4 + 4 × 4 – 4 ÷ 4 =

If we perform this calculation from left to right, we get an answer that is incorrect:

4 + 4 is 8, 8 × 4 = 32, 32 – 4 is 28, 28 ÷ 4 is 7
The correct method is to do the multiplication and division first, and then do the subtraction from left to right.

\begin{align} 4+4\times4-4\div4&=4+4\times4-4\div4\\\\ &=4+\color{darkred}{(4\times4)}-\color{darkgreen}{(4\div4)}\\\\ &=4+\color{darkred}{16}-\color{darkgreen}{1}\\\\ &=19 \end{align}

Care must be taken to avoid ambiguity. Brackets override all conventions and are always performed first, from the inside out. Sometimes we insert brackets to remove all doubt.

For example, 4 + (4 × 4) – (4 ÷ 4).

The following conventions are used when working with more than one of the operations in a calculation:

• Perform calculations inside brackets first.
• In the absence of brackets, carry out operations in the following order:
1. powers
2. multiplication and division from left to right
3. addition and subtraction from left to right.

So 8 + 3 × 4 means 8 + (3 × 4).