How to use the SUM function in Excel
Learn to add up numbers in Excel with SUM: ranges, separate cells and AutoSum, plus the mistakes that give wrong totals and a free exercise to practice.
Formulas and functionsProExcel team3 min read
On this page
SUM is the first function most people learn in Excel, and for good reason: almost every report ends with a total. This guide shows you how to write a SUM formula, how to let Excel write it for you, and the small mistakes that quietly give the wrong answer.
What SUM does
SUM adds numbers together. You give it the numbers to add, and it gives you the total:
Each argument can be a single number, a cell like B2, or a range like B2:B7. The square brackets mean the extra arguments are optional, so =SUM(B2:B7) on its own is a complete formula.
Your first SUM formula
Say you track sales for the first six months of the year, with the months in column A and the amounts in column B. You want the total in cell B8.
| A | B | C | |
|---|---|---|---|
| 1 | Month | Sales | |
| 2 | January | 1,200 | |
| 3 | February | 950 | |
| 4 | March | 1,430 | |
| 5 | April | 1,180 | |
| 6 | May | 1,610 | |
| 7 | June | 1,375 | |
| 8 | Total | 7,745 |
- Click cell B8, where the total should go.
- Type
=SUM(to start the formula. - Select cells B2 to B7 with your mouse, or type
B2:B7. The colon means “from B2 to B7”. - Type
)and press Enter.
Excel shows 7,745. The formula is still there: click B8 and you will see =SUM(B2:B7) in the formula bar above the grid.
Add cells that are not next to each other
Separate the cells with commas when they are not in one block. To add only January, March and May:
You can mix single cells and ranges, even ranges in different columns, in the same formula: =SUM(B2:B4, D2:D4, F10).
Let AutoSum write it for you
AutoSum writes the SUM formula in one step. Click the empty cell below a column of numbers and press Alt=, or use the AutoSum button on the Home tab. Excel guesses the range, highlights it and waits. Press Enter if the range is right, or drag over the correct cells first.
AutoSum writes an ordinary SUM formula, so you can edit it afterwards like any other.
Totals that update themselves
The real reason to use SUM instead of a calculator is that the total updates on its own. Change February from 950 to 1,050 and B8 changes to 7,845 straight away. That only works because the formula points at the cells. If you type the numbers into the formula instead, like =1200+950+1430+1180+1610+1375, the total never changes when the data does.
You can also add a whole column with =SUM(B:B). It keeps working when you add new rows, but don’t put that formula inside column B itself, or Excel will warn you about a circular reference.
Mistakes that give the wrong total
- Numbers stored as text. Numbers copied from another system are sometimes text that only looks like a number. SUM skips them without telling you. They usually sit at the left of the cell, often with a small green triangle in the corner. Convert them to numbers so they count.
- The total inside its own range.
=SUM(B2:B8)written in B8 includes itself. Excel shows a circular reference warning instead of a total. - A range that stops too early. If you add a row under the data, a range like
B2:B7will not include it. Insert new rows inside the range, or turn the data into a table so formulas grow with it.
Practice this in ProExcel
Total six months of sales in B8 with SUM, in a real practice sheet.
Open the exerciseFrequently asked questions
Does SUM ignore blank cells and text?
Yes. When SUM adds a range, it skips empty cells and text, including numbers that are stored as text. If a total looks too low, check the range for numbers stored as text.
What is the difference between SUM and AutoSum?
AutoSum is a button and a keyboard shortcut that writes a SUM formula for you. The formula it writes is an ordinary SUM formula, so you can check and edit it like any other.
Can SUM add numbers from another sheet?
Yes. Put the sheet name and an exclamation mark before the range, for example =SUM(January!B2:B7). If the sheet name contains spaces, wrap it in single quotes: =SUM('Sales 2026'!B2:B7).
Practice this with real formulas
ProExcel's free course turns each idea into a formula you type yourself, checked the moment you press Enter. Five minutes a lesson, on your phone or computer.