In Excel complex formulas can include several operations. Use complex formulas in Excel to calculate more extensive data.
You may have experience working with formulas that contain only one operator, such as 7+9. More complex formulas can contain several mathematical operators, such as 5+2*8. When there's more than one operation in a formula, the order of operations tells Excel which operation to calculate first. To write formulas that will give you the correct answer, you'll need to understand the order of operations.
Optional: Download our practice workbook.
Watch the video below to learn more about complex formulas.
Excel calculates formulas based on the following order of operations:
A mnemonic that can help you remember the order is PEMDAS, or Please Excuse My Dear Aunt Sally.
Click the arrows in the slideshow below to learn how the order of operations is used to calculate formulas in Excel.
While this formula may look complicated, we can use the order of operations step by step to find the right answer.
First, we'll start by calculating anything inside parentheses. In this case, there's only one thing we need to calculate: 6-3=3.
As you can see, the formula already looks simpler. Next, we'll look to see if there are any exponents. There is one: 2^2=4.
Next, we'll solve any multiplication and division, working from left to right. Because the division operation comes before the multiplication, it's calculated first: 3/4=0.75.
Now, we'll solve our remaining multiplication operation: 0.75*4=3.
Next, we'll calculate any addition or subtraction, again working from left to right. Addition comes first: 10+3=13.
Finally, we have one remaining subtraction operation: 13-1=12.
Now we have our answer: 12. And this is the exact same result you would get if you entered the formula into Excel.
In the example below, we'll demonstrate how Excel uses the order of operations to solve a more complex formula. Here, we want to calculate the cost of sales tax for a catering invoice. To do this, we'll write our formula as =(D3+D4+D5)*0.075 in cell D6. This formula will add the prices of our items, then multiply that value by the 7.5% tax rate (which is written as 0.075) to calculate the answer.
Excel follows the order of operations and first adds the values inside the parentheses: (45.80+68.70+159.60) = 274.10. It then multiplies that value by the tax rate: 274.10*0.075. The result will show that the sales tax is $20.56.
It's especially important to follow the order of operations when creating a formula. Otherwise, Excel won't calculate the results accurately. In our example, if the parentheses are not included, the multiplication is calculated first and the result is incorrect. Parentheses are often the best way to define which calculations will be performed first in Excel.