Skip to main content

Operator Precedence

Operator Precedence

Excel follows mathematical conventions when determining the order of operations used in a calculation. That order is as follows:

Symbol Operator Description Precedence
() Parentheses Change the order of evaluation 1
: , Colon Space Comma Reference operators 2
- Negation Negation 3
% Percentage Percent 4
^ Exponentiation Exponentiation 5
*/ Multiplication Division Multiplication and division 6
+- Addition Subtraction Addition and subtraction 7
& Concatenation Connects two strings of text 8
= < > <= >= <> Comparison Comparison 9

Examples

Formula Result Description
=4+5*6 34 Multiplication then addition
=(4+5)*6 54 Addition in parentheses then multiplication
=4+5/2*6 19 Division then multiplication then addition
=(4+5)/(2*6) 0.75 Multiplication then addition then division
=(4+5)/2*6 27 Addition then division then multiplication
=A10<A11 FALSE Returns TRUE if the value in cell A1 is less than the value in cell A2. Otherwise, it returns FALSE.
="Microsoft"&" Excel" Microsoft Excel Joins the two text strings to produce Microsoft Excel.

If two operations on the same level, such as multiplication and division, occur outside parentheses, Excel performs them in left-to-right order. E.g., 9*5/3=15.

You can change the order of operations by using parentheses. E.g., (3+4)*5=35, where 3+4=7, and 7*5=35.

Operator precedence in Excel is not always the same as mathematical precedence. E.g., =-5^2, which Excel evaluates as (-5)^2, which is 25. However, mathematically, you’d expect -(5^2), which is -25.

Formula Result
=-5^2 25
=(-5)^2 25
=-(5^2) -25
=-5%^2 0.0025

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>