How can we help you?

When an application computes a formula with multiple operators, it follows strict prioritization rules. Understanding these rules will help you compose correct formulas without errors and get the expected results.

Order of operations

1.First, expressions within parentheses ( ) are evaluated. Within the parentheses, the standard priority rules apply. If the parentheses are nested, calculations start from the innermost parentheses.

2.Then the operations are executed according to their priority (see the table below).

3.Operators with the same priority are calculated from left to right.

An example of calculating a formula

The formula = A1 + B1 * C1 may produce a non-obvious result. Since multiplication (*) has a higher priority than addition (+), B1 * C1 will be calculated first, and then the result will be added to A1. If you wanted to add A1 and B1 first, you must use parentheses: = (A1 + B1) * C1.

Operator priorities

The operators in the table are listed from the highest priority (executed first) to the lowest.

Priority

Operator

Description and example of use

1

()

Parentheses. Forces the order of calculations.

Example: =(A1+5)*B1

2

- (unary)

Unary minus. Denotes a negative number.
Example: =-10 * A1

3

%

Percentage. Calculating percent.
Example: =A1 * 10% (equivalent to =A1 * 0.1)

4

^

Elevation to a degree.
Example: =A1^2 (A1 squared)

5

* and /

Multiplication and division.
Example: =A1/B1*100

6

+ and -

Addition and subtraction.
Example: =A1+B1-C1

7

&

Combining (concatenating) text.
Example: =A1 & " " & B1 (combines text from A1 and B1 over a space)

8

, <>, <, <=, >, >=

Comparison operators. Returns the values True or False.
Example: =A1 > B1, =B5 <> "Completed".

Parentheses

If you are in doubt about the order of calculations or just want to make the formula clearer, feel free to use parentheses. Superfluous brackets will never lead to an error, and their presence will make your logic crystal clear both for the application and for other users.

Was this helpful?
Yes
No
Next
Calculation operators