Professional Documents
Culture Documents
Order of Precedence in Calculations
Order of Precedence in Calculations
Introduction
Formulas are mathematical expressions that calculate the value of cell contents. When cells
contain numerical data, you can perform multiple mathematical operations on the cell content as
you require. Formulas can be simple, such as adding two cell values, or quite complex, involving
multiple mathematical operations. When a calculation contains multiple operators, it is important
to control how Excel moves through them to ensure that they are processed in the correct order
for the required result.
Scenario
Aimee at Adventure Works needs to calculate the following formula: ((30+20)-(5*2))/2.
To do this, she needs to understand the Order of Precedence. Let’s explore how Excel calculates
a formula using the Order of Precedence and how a formula should be written to ensure that it
gives a reliable and correct result.
Excel uses eight basic mathematical operators. These are listed in order of importance in the
table below.
An easy way to remember the precedence order is to think of the word BEDMAS. This stands for
Brackets (Parentheses), Exponents, Division, Multiplication, Addition, and Subtraction and lists
the order in which the mathematical symbols are processed.
Let’s explore some examples.
=A4+C10-D15
This is because the two mathematical symbols have the same status, so Excel simply applies
them in the order that they appear in the calculation.
However, the following formula would not be processed from left to right:
=B4-D10/H9
This is because the division symbol has a higher priority than the subtraction symbol in the table
shown. So, Excel first divides D10 by H9 and then subtracts.
However, you should also remember that BEDMAS can be canceled out by using correctly
placed brackets.
=(B4-D10)/H9
When the formula is written in this way, Excel subtracts D10 from B4 as the first step. It then
divides the result by the value in H9. In other words, the mathematical operation inside the
brackets was evaluated before the operation outside the brackets.
A formula can also contain sets of brackets within other brackets. If a calculation contains
brackets inside of brackets, then the expression within the inner set of brackets is processed first.
Excel then moves outside of the first set of brackets to process the rest of the calculation.
=((30+20)-(5*2))/2
is processed as follows:
Where there are two sets of brackets in a calculation, Excel will work through them left to right,
regardless of the symbols contained inside the brackets.
In this case, the addition in the first set of brackets is processed first because it is on the left,
giving an initial subtotal of 50.
=((30+20)-(5*2))/2
The multiplication in the second set of brackets is next because, of the two pairs of brackets, it is
the one on the right.
=((30+20)-(5*2))/2
1. Now that both innermost sets of brackets have been calculated, Excel moves out to the
next pair of brackets, which is a subtraction. At this level, Excel takes the first subtotal of
50 and subtracts the second subtotal of 10 to produce a third subtotal of 40.
=((30+20)-(5*2))/2
1. And finally, when all the elements inside the brackets have been calculated, the division
is processed. Excel takes the third subtotal of 40 and divides it by 2 to give a result of 20.
=((30+20)-(5*2))/2
Conclusion
In this reading, you’ve learned that it is important to know the Order of Precedence in
mathematical operators since Excel will use it by default to decide how to process a calculation.
You have also learned that brackets are used to control how Excel processes a calculation.