Mathematical Order of Operations and Excel

This blog post covers the Mathematical Order of Operations that Microsoft Excel will use to interpret formulas and functions.

In order to enter formulas into Excel worksheets, you have to know how Excel will interpret the formulas you enter. If you are new to Excel math, we highly recommend reading Excel Math Basics on our main website.





There is a TRICK to remember the Order of Operations! Just remember this easy phrase:

Please Excuse My Dear Aunt Sally

If you have an Aunt Suzette (great name) or an Aunt Sarsaparilla (not so great...), then remember that phrase! So, how does this help us understand order of operations for Excel?

The first letter of the words, highlighted in red, represent Parentheses, Exponents, Multiplication, Division, Addition, and Subtraction. And this is the order in which the operations are carried out. All operations are performed from left to right.

So, given any formula, the following describes how the order of operations are performed:

  1. First, go through the formula from left to right and calculate any math inside of parentheses
  2. Go through the formula a second time and calculate any Exponents. The exponent symbol is a caret ^
  3. Go through the formula a third time and calculate Multiplication and/or Division. Multiplication is indicated by * and division by /
  4. Go through the formula one last time and calculate all Addition and/or Subtraction.

Note: Even though the Aunt Sally phrase may imply that Multiplication is done before Division, that is not true. They are performed during the same step, from left to right. The same is true regarding Addition and Subtraction.

Let's practice with a rather complication formula to illustrate each operation: (2*4)+3^2-8/4

  1. Pass 1 - Parentheses: Inside some parentheses we have 2*4, which equals 8. Now our expression reads: 8+3^2-8/4
  2. Pass 2 - Exponents: In our formula we have 3^2, or 3*3 which equals 9. Now our expression reads: 8+9-8/4
  3. Pass 3 - Multiplication and/or Division: 8/4 equals 2, so now our formula reads: 8+9-2
  4. Pass 4 - Addition and/or Subtraction: proceed from left to right and our answer equals 15
You can type =2*4+3^2-8/4 into a cell in an Excel worksheet and Excel will use the Order of Operations properly and display, in the cell, the value of 15.

You can, however, use parentheses to help you from getting confused; i.e. =(2*4)+(3^2)-(8/4).

Lastly, since cell references are typically used in formulas instead of just numbers, let's look at our sample formula in an Excel spreadsheet where the numbers, except the exponent, are stored in cells: A1=2, A2=4, A3=3, and A4=8.

Worksheet sample showing two equations, one with parentheses and one without, but coming up with same answer - illustrating Excel following the Mathematical Order of Operations

As shown in the top part of the image below, we typed the formula two ways: without any parentheses (in cell B1) and with some parentheses (in cell B2). In the lower part of the image, you can see that Excel calculates a value of 15 in both instances.

Cheers!

12 comments:

Josie said...

I don't remember ever learning the Aunt Sally thing in school. It must be new math! But its easy to remember and the examples are very good.

Anonymous said...

This is great. Thx.

Anonymous said...

This is so helpful. Thanks so much. I actually get it now. Great examples by the way. Once again thanks

Blogger Lady said...

THanks. This is the best explanation I can remember reading on this dreadful subject :-)

Jason Bigley said...

I checked all your math and it is all correct. LOL

Anonymous said...

Excelent post, very nice blog.

Lady Gaga Lookalike :-) said...

GOOD JOB!

Anonymous said...

whoever wroe this must be nuts ... ha ha ... actually i spent 15 minutes working some of them out, pretty good fellows

Anonymous said...

I knew I hated math for a reason. You just helped me figure out why. Actually this article helped me so thank you. I still hate math through.

Barclay M. said...

gotta love it! I know I'm the exception but I really like math and did well in school in it. This article was pretty neat. I enjoyed it. Cherio!

Amit said...

I enjoy this article when I must work on Excel. It is very great reminder for me and every body. Thank you!

Ren-Davies said...

I don't remember learning this in school at all! Geez! Good explanation, though :D

Post a Comment