Excel does math for you once you enter a formula
A formula in Excel starts with an equals sign and tells the program to perform a calculation. You type the formula into a cell, press Enter, and Excel shows you the result. The most common formulas add, subtract, multiply, or divide numbers — either numbers you type directly or numbers stored in other cells. Once you enter a formula, you can copy it to other cells and Excel will adjust the cell references automatically, so you do not have to type the same calculation over and over.
The key difference between typing a number and typing a formula is that equals sign at the start. Without it, Excel treats what you type as text or a plain number. With it, Excel knows you want a calculation done.
Key Takeaways
- Every formula starts with an equals sign, followed by the calculation you want — for example, =5+3 or =A1+B1.
- You can reference cells by their letter and number (A1, B2, C3) instead of typing numbers directly, which makes your spreadsheet easier to update.
- Excel has built-in functions like SUM, AVERAGE, and COUNT that perform common calculations on groups of cells without you typing each one.
- When you copy a formula down or across, Excel automatically changes the cell references so each row or column calculates its own data.
How to enter a basic formula with two numbers
Click on the cell where you want the result to appear. Type an equals sign, then the first number, then the operation symbol, then the second number. For addition, use +. For subtraction, use −. For multiplication, use * (the asterisk key). For division, use / (the forward slash). Press Enter when you are done.
For example, to add 10 and 5, click a cell and type =10+5, then press Enter. Excel shows 15 in that cell. To multiply 12 by 3, type =12*3 and press Enter. Excel shows 36.
If you make a mistake, click the cell again and look at the formula bar at the top of the screen — that is where you can see and edit what you typed. Click in the formula bar, fix the mistake, and press Enter.
How to reference cells instead of typing numbers
Referencing a cell means using its address (like A1 or B3) in your formula instead of typing the number itself. This is more powerful than typing numbers directly because when you change the number in that cell later, the formula automatically recalculates.
Each cell has a column letter (A, B, C, and so on from left to right) and a row number (1, 2, 3, and so on from top to bottom). The cell in the top-left corner is A1. The cell to its right is B1. The cell below A1 is A2. Click on a cell to see its address in the name box on the left side of the formula bar.
To write a formula using cell references, type the equals sign, then the first cell address, then the operation, then the second cell address. For example, if the number 10 is in cell A1 and the number 5 is in cell B1, you can type =A1+B1 in cell C1. Excel adds the contents of A1 and B1 and shows the result (15) in C1. If you later change the 10 to 20, the result in C1 automatically becomes 25.
How to use SUM to add a group of cells at once
The SUM function adds up all the numbers in a range of cells without you having to type each cell address individually. A range is a group of cells in a row or column, like A1 through A10.
Click on the cell where you want the total. Type =SUM(, then the first cell address, then a colon, then the last cell address, then a closing parenthesis. For example, to add all the numbers in cells A1 through A10, type =SUM(A1:A10) and press Enter. Excel adds them all up and shows the total.
You can also select the range by clicking and dragging. Type =SUM(, then click on the first cell you want to include, hold down your mouse button, drag to the last cell, and release. Type the closing parenthesis and press Enter. Excel fills in the cell addresses for you.
How to copy a formula to other cells
Once you have entered a formula in one cell, you can copy it to other cells and Excel will adjust the cell references automatically. This saves time when you need the same calculation in multiple rows or columns.
Click on the cell that contains the formula you want to copy. Look at the bottom-right corner of the cell — you will see a small square. Click and drag that square down (to copy the formula to cells below) or to the right (to copy to cells to the right). As you drag, Excel shows you which cells will receive the formula. Release the mouse button when you reach the last cell you want.
For example, if cell C1 contains =A1+B1 and you drag the small square down to C5, Excel automatically changes the formula in C2 to =A2+B2, in C3 to =A3+B3, and so on. Each row calculates its own data.
Common functions beyond SUM
AVERAGE finds the middle value of a group of numbers. Type =AVERAGE(A1:A10) to find the average of cells A1 through A10. COUNT tells you how many cells in a range contain numbers (not text or empty cells). Type =COUNT(A1:A10) to count the numbers in that range.
MAX finds the largest number in a range, and MIN finds the smallest. Type =MAX(A1:A10) to find the highest value, or =MIN(A1:A10) to find the lowest. ROUND rounds a number to a certain number of decimal places. Type =ROUND(A1,2) to round the number in A1 to two decimal places.
All of these functions work the same way: type the function name, an opening parenthesis, the range or cell address, and a closing parenthesis. Press Enter and Excel performs the calculation.
What to do when a formula shows an error
If a cell shows #DIV/0!, you tried to divide by zero (or by an empty cell). Check your formula and make sure the cell you are dividing by contains a number. If a cell shows #REF!, your formula refers to a cell that no longer exists — perhaps you deleted a column or row. Click the cell, look at the formula bar, and fix the cell address.
If a cell shows #NAME?, Excel does not recognize the function name you typed. Check the spelling — function names are case-insensitive, but they must be spelled correctly. If a cell shows #VALUE!, you tried to perform a calculation on text instead of a number. Make sure the cells you are referencing contain numbers, not words.
Click on the cell with the error and look at the formula bar to see exactly what you typed. That is usually where the problem is. Fix the formula and press Enter.
Frequently Asked Questions
Can I use parentheses to control the order of calculations?
Yes. Excel follows standard math order (multiplication and division before addition and subtraction), but you can use parentheses to change that. For example, =2+3*4 equals 14 (because 3*4 is done first), but =(2+3)*4 equals 20 (because 2+3 is done first). Type the parentheses just as you would in a math problem.
What is the difference between a relative reference and an absolute reference?
A relative reference (like A1) changes when you copy the formula to another cell. An absolute reference (like $A$1, with dollar signs) stays the same. If you want a formula to always refer to the same cell no matter where you copy it, use the dollar signs. Type =A1*$B$1 if you want the first part to change but B1 to stay fixed.
Can I write a formula that uses IF to check a condition?
Yes. The IF function checks whether something is true or false and does different things based on the answer. Type =IF(A1>10,"Yes","No") to check if A1 is greater than 10. If it is, the cell shows "Yes". If it is not, the cell shows "No". You can replace the text with numbers or other formulas.
How do I add a percentage to a number in Excel?
Multiply the number by 1 plus the percentage as a decimal. To add 10 percent to the number in A1, type =A1*1.1. To add 25 percent, type =A1*1.25. To subtract a percentage, use 1 minus the percentage instead — for example, =A1*0.9 subtracts 10 percent.
What happens if I press Ctrl+Z after entering a formula?
Ctrl+Z (or Command+Z on a Mac) undoes your last action, including entering a formula. If you accidentally delete a formula or change it and want to go back, press Ctrl+Z to undo. You can undo multiple times by pressing it again and again.