The SUM function adds a range of numbers with a single formula

The SUM function is Excel's most basic math tool. Instead of typing =A1+A2+A3+A4 by hand, you write =SUM(A1:A4) and Excel adds all four cells at once. The colon between A1 and A4 means "from A1 through A4" — every cell in between gets included automatically.

You type the formula into any empty cell, press Enter, and Excel shows the total. If you change any of the numbers in that range later, the sum updates on its own. This is why SUM matters: it saves time on repetitive addition and catches changes without you having to recalculate by hand.

Key Takeaways

  • Type =SUM(A1:A4) into an empty cell to add the numbers in cells A1 through A4, then press Enter to see the result.
  • The colon (:) tells Excel to include every cell between the first and last cell you name — you do not have to list each one separately.
  • You can add cells that are not next to each other by separating them with commas: =SUM(A1,A3,A5) adds only those three cells.
  • If you change any number in the range after you write the formula, the sum recalculates when ready without you doing anything.

How to write a basic SUM formula

Open your spreadsheet and click on an empty cell where you want the total to appear. Type an equals sign first — that tells Excel you are writing a formula, not just text. Then type SUM, an opening parenthesis, the first cell you want to add, a colon, the last cell you want to add, and a closing parenthesis.

For example, if your numbers are in cells B2, B3, B4, and B5, you write =SUM(B2:B5). Press Enter. Excel calculates the sum and displays it in that cell. The formula itself stays hidden — you see only the number.

If you click on the cell with the formula later, the formula bar at the top of Excel shows you what formula is inside. This is useful if you need to change the range or check what cells are being added.

Adding cells that are not next to each other

Sometimes your numbers are scattered across the spreadsheet and not in one continuous block. Use commas instead of a colon to add only the cells you choose. For example, =SUM(A1,A5,A10) adds only those three cells and ignores everything in between.

You can also mix ranges and individual cells in one formula. =SUM(A1:A4,A10,A15:A20) adds cells A1 through A4, then A10 by itself, then A15 through A20. Excel processes each part and adds them all together.

What happens when you change a number in the range

One of the main reasons to use SUM instead of typing out addition by hand is that the formula updates automatically. If you have =SUM(B2:B5) in a cell and you later change the value in B3, the sum recalculates when ready. You do not have to rewrite the formula or press any buttons — Excel does it for you.

This automatic update is especially useful in budgets, expense trackers, or any spreadsheet where numbers change regularly. You set up the formula once and it stays correct no matter how many times you edit the data.

Common mistakes and how to avoid them

The most common mistake is forgetting the equals sign at the start. If you type SUM(A1:A4) without the =, Excel treats it as text and does not calculate anything. Always start with =.

Another mistake is using the wrong cell references. If your numbers are in column A but you write =SUM(B1:B5), you are adding the wrong cells. Double-check that the letters and numbers match the cells that actually contain your data. Click on the cells while you are writing the formula if you are unsure — Excel will highlight them so you can see exactly which ones you are including.

Mixing up the colon and comma is also straightforward. Remember: a colon (:) means a range of cells in a row, and a comma (,) separates individual cells or separate ranges. =SUM(A1:A5) is correct for a continuous block. =SUM(A1,A3,A5) is correct for scattered cells.

Using SUM with entire columns or rows

If you want to add every number in an entire column, you can use =SUM(A:A) to add all of column A. Excel ignores empty cells and text, so it only adds the numbers. This is useful when you are not sure how many rows of data you will have or when data gets added over time.

The same works for rows: =SUM(1:1) adds every number in row 1. Be careful with this approach in large spreadsheets — if you accidentally include a header row or a cell with a formula result, it gets added to the total. Usually it is safer to specify the exact range you need, like =SUM(A2:A100).

Checking your formula is correct

After you write a SUM formula, click on the cell that contains it. Look at the formula bar at the top — it shows the formula you typed. The cells included in the formula are usually highlighted with a colored border so you can see at a glance which cells are being added.

If the result looks wrong, check that you used the right cell references and that all the cells you meant to include are actually in the range. You can edit the formula by clicking in the formula bar and making changes, then pressing Enter to recalculate.

Frequently Asked Questions

Can I use SUM to add cells from different sheets in the same workbook?

Yes. Type the sheet name, then an exclamation point, then the cell reference. For example, =SUM(Sheet1!A1:A5,Sheet2!A1:A5) adds the range A1:A5 from Sheet1 and the range A1:A5 from Sheet2. This is useful when your data is organized across multiple sheets.

What if some cells in my range are empty?

SUM ignores empty cells. If you have =SUM(A1:A10) and cells A3 and A7 are blank, Excel adds only the eight cells that contain numbers. This is why SUM is safer than trying to add cells manually — you do not have to worry about accidentally including or excluding blanks.

Can I use SUM with cells that contain text?

SUM ignores text and only adds numbers. If a cell contains "Total" or any other text, SUM skips it. If a cell contains both text and a number, like "5 items", SUM treats it as text and does not add it. Make sure your data cells contain only numbers.

How do I add only cells that meet a certain condition?

Use SUMIF instead of SUM. For example, =SUMIF(A1:A10,">100") adds only the numbers in A1:A10 that are greater than 100. SUMIF lets you set a rule about which cells to include, rather than adding every cell in the range.

What is the difference between SUM and TOTAL?

Excel has SUM, but not a function called TOTAL. If you type =TOTAL(A1:A5), Excel will not recognize it and will show an error. Always use SUM for adding ranges of cells.