Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: How Operators are Evaluated.

How Operators are Evaluated

Written by Allen Wyatt (last updated October 30, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


2

The operators in a formula are generally evaluated from left to right. Thus, in the following formula the addition is performed first and then the subtraction:

= C7 + A2 — B3

However, this is not always the case. For instance, Excel will perform any exponentiation first, then multiplication or division, then addition or subtraction, then text concatenation, and finally any comparisons. Thus, in the following formula, the multiplication is performed before the addition, even though the multiplication occurs to the right of the addition:

= C12 + D4 * A1

The order in which operators are evaluated is referred to as precedence. Operators with higher precedence are evaluated before those with lower precedence. The following is the order of evaluation for operators in Excel.

Operator Meaning
 Negative indicator (such as —123)
% Percent
^ Exponent
* and / Multiplication and division
+ and — Addition and subtraction
& Text concatenation
= < > <= >= <> Comparison

As you enter formulas, you will want to remember these rules so you can get the desired results. If you cannot remember them or you want to change the order in which operations are performed, you can use parentheses. For instance, if you wanted the addition to occur before the multiplication in the previous formula, you would enter it like this:

= (C12 + D4) * A1

As you work with formulas in Excel, you will find yourself using parentheses quite often. The reason for this is simple—they remove any confusion about how a formula should be processed by Excel.

As a real-world example, suppose you were developing a formula that applied tax to the sum of two different values. For instance, if you want to take the value in cell F2, add $5.00 to it, and then adjust for tax (assuming 5.25% in your state), the formula would be written as follows:

= (F2 + 5) * 105.25%

For the sake of simplicity, if the value in F2 is $95.00, then the result of this formula would be $105.25. Without the parentheses, however, the result would be $100.26 because Excel would do the multiplication (5 * 105.25%) first and then add the result to the value in F2.

Remember, parentheses remove any confusion that might arise concerning what a formula means.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12060) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: How Operators are Evaluated.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Turning Off Worksheet Tabs

Look at the bottom of a worksheet and chances are you will see tabs for all the worksheets in the current workbook. Want ...

Discover More

Determining If a Workbook is Referenced by Another Workbook

It is a difficult task, in Excel, to determine if a workbook is the target of any external links. This tip examines some ...

Discover More

Forcing Manual Calculation For a Workbook

If you have a large, complex workbook, you may want to make sure that it is always calculated manually instead of ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Retrieving the Last Value in a Column

Need to get at the last value in a column, regardless of how many cells are used within that column? You can apply the ...

Discover More

Generating a Gift Exchange List

Want to figure out how to do a gift exchange for your family or office? There are a variety of ways you can approach the ...

Discover More

Relative References within Named Ranges

Excel is usually more flexible in what you can reference in formulas than is immediately apparent. This tip examines some ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 8?

2021-11-05 18:28:53

TW

What I was taught in school was the phrase - Please Excuse My Dear Aunt Sally (PEMDAS) - Parenthesis, Exponents, Multiplication, Division, Addition, subtraction. Keep in mind that multiplication and division are on the same level and done from left to right, not one before the other. The same goes for addition and subtraction. Knowing the proper order is the only way to achieve the correct answer.


2021-11-01 05:20:23

Alex Bayman

A useful hint to remember mathematical order:

BODMAS - Brackets, Order, Division, Multiplication, Addition, Subtraction

Or alternatively: PODMAS - Parenthesis, Order, Division, Multiplication, Addition, Subtraction

I wish I'd learnt at school but didn't!


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.