All Excel functions

Order of operations in Excel: how it works

Excel first works out what is in brackets, then powers, then multiplication and division, and only then addition and subtraction. With brackets you set the order yourself.

Start practising hereIn the lesson Order of operations and brackets, free

How does Excel calculate?

Excel follows the same order you learnt at school. First it works out what's in brackets, then powers with ^, then multiplication and division, and only at the end addition and subtraction.

If operations of the same kind are next to each other, such as division and multiplication, Excel calculates from left to right. With brackets, you decide yourself what happens first.

When do you need brackets?

  • You add a percentage to an amount: =A2*(1+B2) gives the amount plus tax.
  • You subtract a discount: =A2*(1-B2) gives the price after the discount.
  • You make an average without a function: =(B2+C2+D2)/3.
  • You divide a total that you first have to add up: =(A2+B2)/C2.

Step by step

D1 contains =A2*(1+B2). Excel first works out 1 + 20% and then multiplies by the price. Change the numbers or the formula and see what happens.

D1
A
B
C
D
E
F
G
H
1
Price
Tax
120
2
100
20%
3
4
5
6
7
8
9
10
Ready

This is how to go about it:

  1. First think about the order you'd calculate in yourself: first 1 plus the tax rate, and then times the price.
  2. Click D1, type an equals sign, the cell with the price and the multiplication sign.=A2*
  3. Put what has to happen first in brackets: 1 plus the rate in B2.=A2*(1+B2
  4. Close the bracket and press Enter. Excel first works out 1 + 0.2 = 1.2 and then multiplies: 120.=A2*(1+B2)

More examples

Without brackets

D1 contains =A2*1+B2. Without brackets, Excel first multiplies A2 by 1, and only then adds 20%, or 0.2: 100.2. That shows the difference brackets make.

D1
A
B
C
D
E
F
G
H
1
Price
Tax
100.2
2
100
20%
3
4
5
6
7
8
9
10
Ready

An average without a function

E1 contains =(A2+B2+C2)/3. First the total in brackets, 42, and then divide by 3.

E1
A
B
C
D
E
F
G
H
1
Test 1
Test 2
Test 3
14
2
14
17
11
3
4
5
6
7
8
9
10
Ready

A price per item

E1 contains =(A2+B2)/C2. First the total cost, 96, and then divide by 4 items: 24 per item. Without brackets, Excel only divides the shipping by 4.

E1
A
B
C
D
E
F
G
H
1
Price
Shipping
Quantity
24
2
90
6
4
3
4
5
6
7
8
9
10
Ready

The order

First brackets, then powers with ^, then multiplication * and division /, and finally addition + and subtraction -. If operations of the same kind sit side by side, Excel works from left to right.

An average without a function

=(B2+C2+D2)/3 divides the total by 3. Without brackets, =B2+C2+D2/3, Excel only divides D2 by 3.

Where it often goes wrong

  • Every bracket you open, you also have to close. Excel colours the pairs, so you can find them easily.
  • A percentage is also a division: 20% is 0.2.
Want to try it yourself?
Practise this in the lesson Order of operations and brackets. It's free.

Start practising here

Frequently asked questions

How do I write a power?

With the caret: =2^3 gives 8. The POWER function does the same: =POWER(2,3).

Read next

Creating a formulaFilling and copying formulasAbsolute references ($)Calculating percentagesWorking with multiple sheets