Instant digital downloadExcel and Google SheetsSecure card checkout

Excel and Google Sheets how-to

Why your formula gives the wrong number: the order of operations

A2 holds 10 and A3 holds 4. What does =A2-A3*2 give? It is 2, not 12. The same rule explains most formulas that look right and give the wrong number.

ABC
1NumberNo bracketsBrackets
210212
34

Sample data. B2 holds =A2-A3*2 and C2 holds =(A2-A3)*2.

Why it is 2

=A2-A3*2

Multiplication goes first, so A3*2 is 4*2 = 8. Then the subtraction: 10-8 = 2. Reading the formula left to right gives 12, and that is the trap.

The order every formula follows

  1. Brackets ( )
  2. Percent %
  3. Powers ^
  4. Times and divide * and /
  5. Add and take away + and -

This is the order on Microsoft's operator page, which also ranks a negative sign like -1 just before percent. Some people learned it as BEDMAS or PEMDAS.

Brackets change the answer

=(A2-A3)*2

Now the subtraction runs first: 10-4 = 6, then 6*2 = 12.

The classic mistake is an average with no brackets. =A2+A3/2 divides only A3, so it gives 10+2 = 12. What you wanted is:

=(A2+A3)/2

which gives 7.

Same rank runs left to right

* and / have the same rank, and so do + and -. When two of the same rank meet, the left one goes first.

  • =20/2*5 gives 50 (20/2 = 10, then 10*5), not 2.
  • =20-5+3 gives 18 (20-5 = 15, then 15+3), not 12.

The percent trap

You want to add 10% to 100, so you type =100+10%. That gives 100.1, because % only divides its own number by 100: 10% is 0.1, and 100+0.1 is 100.1. To add 10%, multiply:

=100*(1+10%)

which gives 110.

Check a long formula by reading it aloud

=(8-2)*3+1

Brackets: 8-2 = 6. Times: 6*3 = 18. Add: 18+1 = 19. Take the brackets away and =8-2*3+1 gives 3. Same numbers, different answer.

Test yourself

Three questions. The answers are below them.

  1. What does =2+3*4 give?
  2. =4+6/2 should give the average of 4 and 6. It gives 7. Fix it.
  3. What does =2+3^2 give?

Answers: 1) 14: 3*4 = 12, then 2+12. 2) =(4+6)/2, which gives 5. 3) 11: 3^2 = 9, then 2+9.

This topic and this style of question come from the first lesson in our Excel for Beginners Lesson Slides: six editable lessons with practice workbooks, in case you teach this to a class or a team.

Watch it in 33 seconds

Templates with the math already done

Rather skip the formulas? These templates come with every formula built and checked, plus a filled-in sample.

Get one tip like this a month

A free email from VARS Digital with one Excel or Google Sheets fix, tested in both apps. No spam, unsubscribe any time.

By signing up you agree that VARS Digital, 10151 240 Street, Maple Ridge, BC V2W 0G9, Canada (inquiries@varsdigital.app) may email you its newsletter: Excel and Google Sheets tips, updates and news about our templates and lessons. We send a confirmation email first, and nothing else goes out until you click it. Every email has an unsubscribe link, and you can leave any time. Details in our store policies.

More how-tos