Excel makes it a simple task to perform mathematical operations. Using excel formula syntax, you can calculate and analyze data in your worksheet. Whether you're brand new to spreadsheets or looking to sharpen your skills, understanding excel formulas and functions is the foundation for everything you do in Excel.
As a reminder:
Think of it this way: a formula is any calculation you build in a cell (for example, =A1+B1), while a function is a named shortcut that handles a specific calculation for you (for example, =SUM(A1:A10)). Both rely on the same underlying syntax rules, and once you understand those rules, you can read and write virtually any formula with confidence.
But to use either, you need to know how to write in their own language, which is commonly referred to as operators. And, like any language, operators have their own form of grammar, referred to as Order of Precedence.
Before diving into specific operators, it helps to understand the building blocks that make up every formula. Learning how to read excel formula syntax means recognizing these core components:
The equal sign is the gateway to every formula. Without it, Excel treats your entry as text or a static value. Type = and Excel immediately switches into calculation mode, ready to evaluate whatever comes next.
A function name like SUM or VLOOKUP tells Excel which prebuilt calculation to perform. The name is always followed by parentheses containing one or more arguments, which are the inputs the function needs. Arguments can be cell references, ranges, typed values or even other functions nested inside.
For example, in =AVERAGE(B2:B50), the function name is AVERAGE and the argument is the range B2:B50.
Cell references are how you point a formula to specific data in your worksheet. A single reference like A1 points to one cell, while a range like A1:A10 covers a block of cells. You can also reference cells on other sheets (Sheet2!A1) or in other workbooks.
References can be relative or absolute, which affects how they behave when you copy a formula. We cover this distinction in the Absolute vs. Relative Cell References section below.
Operators are the symbols that tell Excel what type of calculation or comparison to perform. Excel uses three main categories of operators.
To perform basic mathematical operations such as addition, subtraction or multiplication; to combine numbers; and to produce numeric results, use the following arithmetic operators.
Examples:
You can compare two values with the following operators. When two values are compared by using these operators, the result is a logical value, either TRUE or FALSE. These same operators power features like conditional formatting.
Example:
Use the ampersand (&) to join, or concatenate, one or more text strings to produce a single piece of text.
Example:
The order in which a calculation is performed affects the result, so it is important to understand how the order is determined and how you can change it to obtain desired results.
A formula in Excel always begins with an equal sign (=). The equal sign tells Excel that the succeeding characters are part of a formula or function. After the equal sign are the elements to be calculated (the operands), which are separated by calculation operators. Excel calculates from left to right, using the PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction) order of operations.
In other words, it performs calculations in parentheses first, then it checks for multiplication and division, then finally it performs addition and subtraction. Using these rules of math is what makes it possible to do some potentially confusing problems that have many possible results if you do not follow the right order. Knowing that this is how Excel reads math, you need to structure your formulas accordingly.
2+3x4-5/6=?
If this problem were performed just from left to right, the answer would be 2.5. However, your intent might have been very different. Adding parentheses to show which items should be calculated first helps.
(2+(3x4)-5)/6
This same set of numbers with parentheses added calculate to a much different total. 3x4 is calculated first, for a total of 12. Then 2 is added to get 14, from which 5 is subtracted to get 9. Finally, 9 is divided by 6 for a total of 1.5.
Now that you understand operators and the order of operations, you're ready to put that knowledge to work with some of the most widely used basic excel formulas. The table below summarizes seven essential functions you'll encounter in nearly every spreadsheet.
| Function | Syntax | What It Does | Example |
|---|---|---|---|
| SUM | =SUM(range) | Adds all values in a range | =SUM(B2:B50) |
| AVERAGE | =AVERAGE(range) | Returns the arithmetic mean | =AVERAGE(C2:C100) |
| COUNT | =COUNT(range) | Counts cells containing numbers | =COUNT(A1:A20) |
| COUNTA | =COUNTA(range) | Counts all non-empty cells | =COUNTA(A1:A20) |
| MAX / MIN | =MAX(range) / =MIN(range) | Returns the largest or smallest value | =MAX(D2:D30) |
| IF | =IF(condition, value_if_true, value_if_false) | Tests a condition and returns one of two results | =IF(A1>100, "Over", "Under") |
| VLOOKUP | =VLOOKUP(lookup_value, table_array, col_index, [range_lookup]) | Searches the first column of a range and returns a value from a specified column | =VLOOKUP("Widget", A2:D50, 3, FALSE) |
=SUM(range) is the most-used function in Excel. It adds every numeric value in the range you specify. Instead of writing =A1+A2+A3+A4, you can simply write =SUM(A1:A4) and get the same result with far less effort.
=AVERAGE(range) returns the arithmetic mean of the values in a range. It's the go-to function for finding typical values in a dataset, such as average sales per month or average test scores.
=COUNT(range) counts only cells that contain numbers, while =COUNTA(range) counts all non-empty cells regardless of data type. Use COUNT when you need to know how many numeric entries exist and COUNTA when you want to count any cell that isn't blank.
=MAX(range) returns the largest value in a range and =MIN(range) returns the smallest. These functions are useful for quickly identifying highs and lows, such as the highest invoice amount or the lowest temperature reading in a dataset.
=IF(condition, value_if_true, value_if_false) introduces logical testing to your spreadsheets. You provide a condition (like A1>100), and Excel returns one result when the condition is true and a different result when it's false. IF is the foundation for decision-making logic in Excel and can be nested for more complex scenarios.
=VLOOKUP(lookup_value, table_array, col_index, [range_lookup]) searches for a value in the first column of a table and returns a corresponding value from another column. It's one of the most powerful lookup functions in Excel and is commonly used to pull data from reference tables. Set the last argument to FALSE for an exact match.
=CONCATENATE(text1, text2, ...) or the newer =CONCAT(text1, text2, ...) joins multiple text strings into one. For example, =CONCAT(A1, " ", B1) combines a first name and last name with a space between them. You can also use the & operator covered in the Text Concatenation Operator section above to achieve the same result.
One of the most common sources of formula errors happens when you copy a formula to a new cell and the results suddenly look wrong. The reason usually comes down to cell references.
For example, imagine you have a price in column B and a single tax rate in cell E1—a common scenario in Excel finance formulas. Your formula in C2 might be =B2*$E$1. When you copy this formula down the column, B2 adjusts to B3, B4 and so on (relative), but $E$1 stays locked (absolute), ensuring every row uses the same tax rate.
Knowing the syntax is only half the battle. These practical tips will help you write cleaner formulas and avoid common mistakes:
Now that you have the foundation of excel formula syntax, from operators and the order of operations to essential functions and best practices, you're well on your way to building more powerful and accurate spreadsheets. Like any skill, formula writing improves with practice and continued learning.
Pryor Learning offers a range of Excel training courses designed for every skill level, from beginners learning their first SUM function to advanced users tackling complex data analysis. Choose from live seminars, On-Demand courses and the PryorPlus subscription for unlimited access to hundreds of professional development topics.