Excel
Formulas and functions
Formulas
Formulas
Create a simple formula in Excel
Applies To
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel 2024 Excel 2024 for Mac Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2016
You can create a simple formula to add, subtract, multiply or divide values in your worksheet. Simple formulas always start with an equal sign (=), followed by constants that are numeric values and calculation operators such as plus (+), minus (-), asterisk (*), or forward slash (/) signs.
The following is an example of a simple formula.
-
On the worksheet, select the cell in which you want to enter the formula.
-
Type the = (equal sign) followed by the constants and operators (up to 8192 characters) that you want to use in the calculation.
For our example, type =1+1.
Notes:
-
Instead of typing the constants into your formula, you can select the cells that contain the values that you want to use and enter the operators in between selecting cells.
-
Following the standard order of mathematical operations, multiplication and division is performed before addition and subtraction.
-
-
Press Enter (Windows) or Return (Mac).
Let's look at another variation of a simple formula. Type =5+2*3 in another cell and press Enter or Return. Excel multiplies the last two numbers and adds the first number to the result.
Use AutoSum
You can use AutoSum to quickly sum a column or row or numbers. Select a cell next to the numbers you want to sum, selectAutoSum on the Home tab, press Enter (Windows) or Return (Mac), and that's it!
When you selectAutoSum, Excel automatically enters a formula (that uses the SUM function) to sum the numbers.
Note:You can also type ALT+= (Windows) or ALT++= (Mac) into a cell, and Excel automatically inserts the SUM function.
Here’s an example. To add the January numbers in this Entertainment budget, select cell B7, the cell immediately below the column of numbers. Then selectAutoSum. A formula appears in cell B7, and Excel highlights the cells you’re totaling.
Press Enter to display the result (95.94) in cell B7. You can also see the formula in the formula bar at the top of the Excel window.
Notes:
-
To get the sum of a column of numbers, select the cell immediately below the last number in the column. To get the sum of a row of numbers, select the cell immediately to the right.
-
Once you create a formula, you can copy it to other cells instead of typing it over and over. For example, if you copy the formula in cell B7 to cell C7, the formula in C7 automatically adjusts to the new location and calculates the numbers in C3:C6.
-
You can also use AutoSum on more than one cell at a time. For example, you could highlight both cell B7 and C7, selectAutoSum, and total both columns at the same time.
Copy the example data in the following table and paste it in cell A1 of a new Excel worksheet. If you need to, you can adjust the column widths to see all the data.
Note:For formulas to show results, select them, press F2, and then press Enter (Windows) or Return (Mac).
Data | ||
---|---|---|
2 | ||
5 | ||
Formula | Description | Result |
=A2+A3 | Adds the values in cells A1 and A2 | =A2+A3 |
=A2-A3 | Subtracts the value in cell A2 from the value in A1 | =A2-A3 |
=A2/A3 | Divides the value in cell A1 by the value in A2 | =A2/A3 |
=A2*A3 | Multiplies the value in cell A1 times the value in A2 | =A2*A3 |
=A2^A3 | Raises the value in cell A1 to the exponential value specified in A2 | =A2^A3 |
Formula | Description | Result |
=5+2 | Adds 5 and 2 | =5+2 |
=5-2 | Subtracts 2 from 5 | =5-2 |
=5/2 | Divides 5 by 2 | =5/2 |
=5*2 | Multiplies 5 times 2 | =5*2 |
=5^2 | Raises 5 to the 2nd power | =5^2 |
Need more help?
You can always ask an expert in the Excel Tech Communityor get support inCommunities.
See Also
Overview of formulas in Excel
SUM function
Need more help?
Want more options?
Discover Community
Explore subscription benefits, browse training courses, learn how to secure your device, and more.
Microsoft 365 subscription benefits
Microsoft 365 training
Microsoft security
Accessibility center
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.