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.
So =B2 halves C2 first, then adds B2. To add first, put parentheses around that part: =(. Anything in parentheses is worked out first.
Read it as a sentence: "add B2 and C2, then divide by 2". If the sentence has a "then", you probably need parentheses.
Exercise 1 of 4 · Worked example
In D2, find Ananya's average of the two papers. Type =( B2 +C2) /2 and press Enter.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | Paper 1 | Paper 2 | Average |
| 2 | Ananya | 78 | 64 | (answer cell) |
| 3 | Vikram | 55 | 71 | |
| 4 | Farah | 90 | 84 | |
| 5 | Siddharth | 62 | 48 | |
| 6 | Pooja | 73 | 89 |
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 =-( 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 =( to get 15.
Can I use square brackets in a formula?
No. Use parentheses for grouping, nested as deep as you need: =(.
Does Excel calculate left to right?
Only for signs at the same level. In =20 it divides first, then multiplies, giving 10.
How do I average two numbers with parentheses?
Add them inside parentheses, then divide: =(. Without the parentheses, only C2 is halved.