Quick answer

The Excel formulas you’ll use most at work are SUM to add, AVERAGE to average, COUNT and COUNTA to count, IF to decide, SUMIF and COUNTIF to total or count what matches a condition, XLOOKUP or VLOOKUP to look a value up, ROUND to round and TRIM to clean up text. Every formula starts with =, then a function’s name and its arguments in parentheses, such as =SUM(B2:B10).

Excel has hundreds of functions, but office work leans on a few dozen. Below they’re grouped by the job you’re doing, each with an example and, where there is one, a link to a page with the details.

How Excel formulas work

A formula is anything you type that starts with =. A function is a calculation Excel already knows, called by name inside a formula: in =SUM(B2:B10), SUM is the function and B2:B10 is its argument, the value it works on. Arguments go in parentheses, separated by commas, and an argument in square brackets in the syntax, such as [if_not_found], can be left out.

Functions can sit inside each other, and the inner one is worked out first: =ROUND(AVERAGE(B2:B10),1) averages and then rounds. To find any function, click Insert Function (the fx beside the formula bar) or press Shift+F3, and Excel walks you through its arguments; on a Mac, the same keys open the Formula Builder. You can also describe the job in plain words to the function finder, and every function with its own page is on the Excel functions index.

Add, count and average

FunctionWhat it doesExample
SUMAdds numbers=SUM(B2:B10)
AVERAGEAverages numbers=AVERAGE(B2:B10)
MIN, MAXSmallest and largest value=MAX(B2:B10)
COUNTCounts cells that hold numbers=COUNT(B2:B10)
COUNTACounts cells that aren’t empty=COUNTA(A2:A10)
ROUNDRounds to a number of decimals=ROUND(B2*C2,2)

Totals and counts with a condition

FunctionWhat it doesExample
SUMIFAdds the rows that meet one condition=SUMIF(A2:A9,"North",C2:C9)
SUMIFSAdds the rows that meet several conditions=SUMIFS(C2:C9,A2:A9,"North",B2:B9,"Chairs")
COUNTIFCounts the cells that meet one condition=COUNTIF(A2:A9,"North")
COUNTIFSCounts the rows that meet several conditions=COUNTIFS(A2:A9,"North",C2:C9,">1000")
AVERAGEIFAverages the rows that meet one condition=AVERAGEIF(A2:A9,"North",C2:C9)

The same list answers different questions depending on the function:

One list, three questions. SUMIF adds North's sales, COUNTIF counts North's rows, and SUMIFS adds only the rows that are North and Chairs at once: $1,950 and $880. In C13, =SUMIFS(C2:C9,A2:A9,"North",B2:B9,"Chairs") returns $2,830.

Decide

FunctionWhat it doesExample
IFReturns one thing if a test is TRUE, another if it’s FALSE=IF(B2>=1000,"Bonus","No bonus")
ANDTRUE when every test is TRUE=AND(B2>=1000,C2>=4)
ORTRUE when any test is TRUE=OR(B2="Sat",B2="Sun")
IFSPicks the first test that’s TRUE, without nesting=IFS(B2>=90,"A",B2>=80,"B",TRUE,"C")
IFERRORShows something else when a formula gives an error=IFERROR(B2/C2,0)

AND and OR go inside IF when a decision depends on more than one test:

The bonus needs both tests to pass. AND returns TRUE only when sales reach $10,000 and the rating reaches 4, and IF turns that into Yes or No. The rep in row 4 has the sales but not the rating. In D3, =IF(AND(B3>=10000,C3>=4),"Yes","No") returns Yes.

Look up a value

FunctionWhat it doesExample
XLOOKUPFinds a value in one range and returns the matching value from another=XLOOKUP(E2,A2:A9,C2:C9)
VLOOKUPFinds a value in the first column of a table and returns a column by number=VLOOKUP(E2,A2:C9,3,FALSE)
INDEX and MATCHMATCH finds the position, INDEX returns the value there=INDEX(C2:C9,MATCH(E2,A2:A9,0))

XLOOKUP vs VLOOKUP explains which to use, and #N/A in Excel covers a lookup that finds nothing.

Work with text

FunctionWhat it doesExample
TRIMRemoves extra spaces=TRIM(A2)
LEFT, RIGHT, MIDTakes characters from the start, the end or the middle=LEFT(A2,3)
LENCounts characters=LEN(A2)
CONCAT or &Joins text=A2&" "&B2
TEXTJOINJoins text with a separator, skipping blanks=TEXTJOIN(", ",TRUE,A2:D2)
UPPER, LOWER, PROPERChanges capitals=PROPER(A2)

Work with dates

FunctionWhat it doesExample
TODAYToday’s date, updated every day=TODAY()
DATEBuilds a date from a year, month and day=DATE(2027,3,31)
YEAR, MONTH, DAYTakes a date apart=MONTH(A2)
EDATE, EOMONTHMoves by whole months, or to a month’s end=EOMONTH(A2,0)
NETWORKDAYSCounts working days between two dates=NETWORKDAYS(A2,B2)

Subtracting one date from another gives the days between them: =B2-A2.

Which versions have which

Most of these work in every version of Excel. The newer ones need a recent version, which matters when you send a file to someone on an older one:

VersionFunctions it added
Excel 2019IFS, SWITCH, CONCAT, TEXTJOIN, MAXIFS, MINIFS
Excel 2021XLOOKUP, XMATCH, FILTER, SORT, SORTBY, UNIQUE, SEQUENCE, LET
Excel 2024TEXTBEFORE, TEXTAFTER, TEXTSPLIT, VSTACK, HSTACK, LAMBDA

Microsoft 365 has all of them. A function that’s missing in someone’s version shows as #NAME? there, and Does my Excel have it? tells you which versions have a function and what to use in the others.

The free lessons Find and enter any function, Decide with IF, Total by one condition with SUMIF and Look up a value with VLOOKUP practice the functions above. If you’re starting out, how to use Excel covers the basics first.

Frequently asked questions

What are the basic Excel formulas?

SUM, AVERAGE, MIN, MAX and COUNT cover most everyday math, IF makes a decision, and SUMIF and COUNTIF total or count the rows that meet a condition. Add a lookup such as XLOOKUP or VLOOKUP and you can build most office reports.

What's the difference between a formula and a function in Excel?

A formula is anything you type that starts with =, such as =B2*C2. A function is a named calculation used inside a formula, such as SUM in =SUM(B2:B10).

How do I find the right function in Excel?

Click Insert Function, the fx button beside the formula bar, or press Shift+F3, and search by describing what you want to do. Excel lists matching functions and helps you fill in their arguments.

Which Excel functions should I learn first?

Start with SUM, AVERAGE and IF, then SUMIF and COUNTIF, then a lookup such as XLOOKUP or VLOOKUP. Those cover most of the totals, checks and lookups in everyday reports.

Why does a function show #NAME?

The name is misspelled, or the function doesn’t exist in that version of Excel, such as XLOOKUP in Excel 2019. Check the spelling, or use a function the older version has.