Calculation operators and precedence in Excel (2024)

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2013 Excel for iPad Excel Web App Excel for iPhone Excel for Android tablets Excel for Android phones Excel for Windows Phone 10 Excel Mobile More...Less

Operators specify the type of calculation that you want to perform on elements in a formula—such asaddition, subtraction, multiplication, or division. In this article, you'll learn the default order in which operators act upon the elements in a calculation. You'll also learn that how to change this order by using parentheses.

Types of operators

There are four different types of calculation operators: arithmetic, comparison, text concatenation, and reference.

To perform basic mathematical operations such as addition, subtraction, or multiplication—or to combine numbers—and produce numeric results, use the arithmetic operators in this table.

Arithmetic operator

Meaning

Example

+ (plus sign)

Addition

=3+3

– (minus sign)

Subtraction
Negation

=3–1
=–1

* (asterisk)

Multiplication

=3*3

/ (forward slash)

Division

=3/3

% (percent sign)

Percent

=20%

^ (caret)

Exponentiation

=2^3

With the operators in the table below, you can compare two values. When two values are compared by using these operators, the result is a logical value either TRUE or FALSE.

Comparison operator

Meaning

Example

= (equal sign)

Equal to

=A1=B1

> (greater than sign)

Greater than

=A1>B1

< (less than sign)

Less than

=A1<B1

>= (greater than or equal to sign)

Greater than or equal to

=A1>=B1

<= (less than or equal to sign)

Less than or equal to

=A1<=B1

<> (not equal to sign)

Not equal to

=A1<>B1

Use the ampersand (&) to join, or concatenate, one or more text strings to produce a single piece of text.

Text operator

Meaning

Example

& (ampersand)

Connects, or concatenates, two values to produce one continuous text value.

="North"&"wind"

Combine ranges of cells for calculations with theseoperators.

Reference operator

Meaning

Example

: (colon)

Range operator, which produces one reference to all the cells between two references, including the two references.

=SUM(B5:B15)

, (comma)

Union operator, which combines multiple references into one reference.

=SUM(B5:B15,D5:D15)

(space)

Intersection operator, which produces a reference to cells common to the two references.

=SUM(B7:D7 C6:C8)

# (pound)

The # symbol is used in several contexts:

  • Used as part of anerror name.

  • Used to indicate insufficient space to render. In most cases, you can widen the column until the contents display properly.

  • Spilled range operator, which is used to reference an entire range in a dynamic array formula.

  • #VALUE!

  • #####

  • =SUM(A2#)

@ (at)

Reference operator, which is used to indicateimplicit intersection in a formula.

=@A1:A10

=SUM(Table1[@[January]:[December]])

The order in which Excel performs operations in formulas

In some cases, the order in which calculation is performed can affect the return value of the formula, so it's important to understand the order— and how you can change the order to obtain the results you expect to see.

Formulas calculate values in a specific order. A formula in Excel always begins with an equal sign (=). The equal sign tells Excel that the characters that follow constitute a formula. After this equal sign, there can be a series of elements to be calculated (the operands), which are separated by calculation operators. Excel calculates the formula from left to right, according to a specific order for each operator in the formula.

If you combine several operators in a single formula, Excel performs the operations in the order shown in the following table. If a formula contains operators with the same precedence — for example, if a formula contains both a multiplication and division operator — Excel evaluates the operators from left to right.

Operator

Description

: (colon)

(single space)

, (comma)

Reference operators

Negation (as in –1)

%

Percent

^

Exponentiation

* and /

Multiplication and division

+ and –

Addition and subtraction

&

Connects two strings of text (concatenation)

=
< >
<=
>=
<>

Comparison

To change the order of evaluation, enclose in parentheses the part of the formula to be calculated first. For example, the following formula results in the value of 11, because Excel calculates multiplication before addition. The formula first multiplies 2 by 3, and then adds 5 to the result.

=5+2*3

By contrast, if you use parentheses to change the syntax, Excel adds 5 and 2 together and then multiplies the result by 3 to produce 21.

=(5+2)*3

In the example below, the parentheses that enclose the first part of the formula will force Excel to calculate B4+25 first, and then divide the result by the sum of the values in cells D5, E5, and F5.

=(B4+25)/SUM(D5:F5)

Watch this video on Operator order in Excel to learn more.

How Excel converts values in formulas

When you enter a formula, Excel expects specific types of values for each operator. If you enter a different kind of value than is expected, Excel may convert the value.

The formula

Produces

Explanation

= "1"+"2"

3

When you use a plus sign (+), Excel expects numbers in the formula. Even though the quotation marks mean that "1" and "2" are text values, Excel automatically converts the text values to numbers.

= 1+"$4.00"

5

When a formula expects a number, Excel converts text if it is in a format that would usually be accepted for a number.

= "6/1/2001"-"5/1/2001"

31

Excel interprets the text as a date in the mm/dd/yyyy format, converts the dates to serial numbers, and then calculates the difference between them.

=SQRT ("8+1")

#VALUE!

Excel cannot convert the text to a number because the text "8+1" cannot be converted to a number. You can use "9" or "8"+"1" instead of "8+1" to convert the text to a number and return the result of 3.

= "A"&TRUE

ATRUE

When text is expected, Excel converts numbers and logical values such as TRUE and FALSE to text.

Need more help?

You can always ask an expert in the Excel Tech Communityor get support inCommunities.

See Also

Need more help?

Want more options?

Discover Community

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Calculation operators and precedence in Excel (1)

Microsoft 365 subscription benefits

Calculation operators and precedence in Excel (2)

Microsoft 365 training

Calculation operators and precedence in Excel (3)

Microsoft security

Calculation operators and precedence in Excel (4)

Accessibility center

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Calculation operators and precedence in Excel (5)

Ask the Microsoft Community

Calculation operators and precedence in Excel (6)

Microsoft Tech Community

Calculation operators and precedence in Excel (2024)

FAQs

What is the correct order of precedence in formula calculation in Excel? ›

Excel calculates the formulas from left to right according to the operator precedence given below.
  1. Parentheses()
  2. Ranges (:)
  3. Intersection (Space Character)
  4. Unions (,)
  5. Negation (-)
  6. Percent (%)
  7. Exponentiation (^)
  8. Multiplication (*) and Division (/)
Jul 16, 2020

What is precedence of operators in Excel? ›

Operator precedence

If a formula contains operators with the same precedence — for example, if a formula contains both a multiplication and division operator — Excel evaluates the operators from left to right. Operator. Description. : (colon) (single space)

What is the order of calculations in Excel? ›

Excel follows general mathematical rules for calculations, which is Parentheses, Exponents, Multiplication and Division, and Addition and Subtraction, or the acronym PEMDAS (Please Excuse My Dear Aunt Sally).

What is the operator precedence in calculation? ›

An easy way to remember the operator precedence is to remember the word pemdas, which is an acronym for: parentheses, exponents, multiplication, division, addition, subtraction.

Which operator has the highest precedence in Excel? ›

The list of operators in the order from highest to lowest precedence in Excel is as follows:
  • Parentheses: ()
  • Exponentiation: ^
  • Percent: %\
  • Multiplication & Division: * and /
  • Addition & Subtraction: + and -
  • Concatenation: &
  • Comparison: =, <, >, <=, >=, <>
Feb 13, 2024

How does Excel determine which calculation to perform first? ›

In a complex formula, the way excel determines which calculation to perform first is that; It follows the order of operations. When carrying out calculations in excel, if we don't bracket certain operations, excel will use the order of operation called BODMAS to determine which operation to carry out first.

What are the basic calculations in Excel? ›

Examples
Data
FormulaDescriptionResult
=A2+A3Adds the values in cells A1 and A2=A2+A3
=A2-A3Subtracts the value in cell A2 from the value in A1=A2-A3
=A2/A3Divides the value in cell A1 by the value in A2=A2/A3
10 more rows

What are the two basic ways to perform calculations in Excel? ›

There are two basic ways to perform calculations in Excel: Formulas and Functions.

What is operator precedence and examples? ›

Operator precedence describes the order in which operations are performed in an arithmetic expression. Multiplication ( * ) and division ( / ) have higher precedence than addition ( + ) and subtraction ( - ). As in traditional mathematics, multiplication is done first: let x = 100 + 50 * 3; Try it Yourself »

Which operator has the highest precedence? ›

Operator Precedence
PriorityOperator
First (highest)( ) (parentheses, to group expressions)
[ ] (brackets, to concatenate arrays)
Second. (structure field dereference)
[ ] (brackets, to subscript an array)
27 more rows

What is the correct order to do math? ›

The order of operations is the order you use to work out math expressions: parentheses, exponents, multiplication, division, addition, subtraction. All expressions should be simplified in this order.

What is the meaning of precedence in math? ›

Precedence of common operators is generally defined so that "higher-level" operations are performed first (i.e., advanced operations "bind more tightly")/ For simple expressions, operations are typically ordered from highest to lowest in the order: 1. Parenthesization, 2.

What is the priority among (* %) (+ -) and (=) c operators? ›

Precedence of operators

In C, the precedence of * is higher than - and = . Hence, 17 * 6 is evaluated first. Then the expression involving - is evaluated as the precedence of - is higher than that of = . Here's a table of operators precedence from higher to lower.

Top Articles
Latest Posts
Article information

Author: Ouida Strosin DO

Last Updated:

Views: 6344

Rating: 4.6 / 5 (76 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Ouida Strosin DO

Birthday: 1995-04-27

Address: Suite 927 930 Kilback Radial, Candidaville, TN 87795

Phone: +8561498978366

Job: Legacy Manufacturing Specialist

Hobby: Singing, Mountain biking, Water sports, Water sports, Taxidermy, Polo, Pet

Introduction: My name is Ouida Strosin DO, I am a precious, combative, spotless, modern, spotless, beautiful, precious person who loves writing and wants to share my knowledge and understanding with you.