Parentheses and order of operations
Excel follows the same order of operations as math. Use parentheses to change it.
Order of operations
Parentheses first, then powers (^), then multiplication and division (* /), and finally addition and subtraction (+ -).
See the difference
=2+3*4 gives 14 (3×4 first). =(2+3)*4 gives 20 (2+3 first). One pair of parentheses changes everything.
A practical example
The average of two numbers: =(A2+B2)/2. Without parentheses, =A2+B2/2 divides only B2 by two — wrong result.
Example
Formula:
=(A2+B2)/2→ result: 7.5
Try it in the simulator
Type =(A2+B2)/2 into C2 and, without parentheses, =A3+B3/2 into C3. Compare the results.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | A | B | Result | |||||||||||||||||||||
| 2 | 5 | 10 | ||||||||||||||||||||||
| 3 | 8 | 4 | ||||||||||||||||||||||
| 4 | ||||||||||||||||||||||||
| 5 | ||||||||||||||||||||||||
| 6 | ||||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |