Create a formula by using a function
Important The calculated results of formulas and some Excel worksheet functions may differ slightly between a Windows PC using x86 or x8664 architecture and a Windows RT PC using ARM architecture. Learn more about the differences.
You can create a formula to calculate values in your worksheet by using a function. For example, the formulas =SUM(A1:A2) and SUM(A1,A2) both use the SUM function to add the values in cells A1 and A2. Formulas always start with an equal sign (=).

Click the cell in which you want to enter the formula.

To start the formula with the function, click Insert Function on the formula bar .
Excel inserts the equal sign (=) for you.

In the Or select a category box, select All.
If you are familiar with the function categories, you can also select a category.
If you're not sure which function to use, you can type a question that describes what you want to do in the Search for a function box (for example, "add numbers" returns the SUM function).
Tip For a list of available functions, see Excel functions (alphabetical) or Excel functions (by category).

In the Select a function box, select the function that you want to use, and then click OK.

In the argument boxes that are displayed for the function you selected, enter the values, text strings, or cell references you want.
Instead of typing cell references, you can also select the cells that you want to reference. Click to minimize the dialog box, select the cells you want to reference, and then click to expand the dialog box again.
Tip For more information about the function and its arguments, click Help on this function.

After you complete the arguments for the formula, click OK.
Tip If you frequently use functions, you can enter your formulas directly on the worksheet. After you type the equal sign (=) and the function name, you can get information about the formula syntax and the function arguments by pressing F1.
Examples
Use the embedded workbook shown here to work with examples of formulas that use a function. You can inspect and change formulas, and enter your own formulas.
Copy the table to cell A1 in a blank worksheet in Excel to work with these examples of formulas that use functions.
Data 

5 
4 

2 
6 

3 
8 

7 
1 

Formula 
Description 
Result 
'=SUM(A:A) 
Adds all numbers in column A 
=SUM(A:A) 
'=AVERAGE(A1:B4) 
Averages all numbers in the range A1:B4 
=AVERAGE(A1:B4) 
To work indepth with this workbook, you can download it to your computer and open it in Excel. For more information, see the article Download an embedded workbook from OneDrive and open it on your computer.