Order of operations and parentheses

Formula basics · About 5 minutes

Order of operations and parentheses

A formula does not always work left to right. It multiplies and divides before it adds and subtracts, just like BODMAS or PEMDAS at school.

Exercise 1 of 4 · Worked example

In D2, find Ananya's average of the two papers. Type =(B2+C2)/2 and press Enter.

ABCD
1NamePaper 1Paper 2Average
2Ananya7864 (answer cell)
3Vikram5571
4Farah9084
5Siddharth6248
6Pooja7389

Questions people ask

Does Excel follow PEMDAS or BODMAS?

Mostly. Parentheses come first, then powers (^), then * and /, then + and -. One difference: a minus sign at the start of a number comes before powers, so =-2^2 gives 4, not -4. Write =-(2^2) for -4.

Why does =10+20/2 give 20 and not 15?

Division comes before addition, so 20/2 is worked out first and 10 is added after. Write =(10+20)/2 to get 15.

Can I use square brackets in a formula?

No. Use parentheses for grouping, nested as deep as you need: =((B2+B3)*2)/4.

Does Excel calculate left to right?

Only for signs at the same level. In =20/4*2 it divides first, then multiplies, giving 10.

How do I average two numbers with parentheses?

Add them inside parentheses, then divide: =(B2+C2)/2. Without the parentheses, only C2 is halved.

Theme