Basic Sum Formula in Excel: How to Add Cells

Formulas & functions · Updated November 21, 2026

If A1:A4 contain 12, 8, 15, and 5, enter =SUM(A1:A4) in an empty cell to add them; the result is 40. The basic Excel sum formula is SUM: put the numbers or cell references inside its parentheses, and Excel calculates their total.

What the SUM formula does

SUM adds numbers and cell references you give it. A colon between two cell addresses means the full rectangular range from the first cell through the last, including both endpoints. For example, a range from A1 to A4 includes A1, A2, A3, and A4. This makes a range formula easier to maintain than typing every number into the calculation.

To see the difference when a value changes, suppose A1:A4 contain 12, 8, 15, and 5, and you replace the 8 in A2 with 10. The formula in the opening example recalculates automatically, and its total becomes 42. You do not need to rewrite the formula each time an input changes.

SUM is a function, so its name is followed by parentheses. The items inside are called arguments. A range is one argument, while separate cells or ranges can be supplied as multiple arguments. In a typical Microsoft 365 installation, commas separate those arguments.

How to enter a basic sum formula

  1. Enter the values you want to add in a worksheet, such as a list of daily expenses in B2:B6.
  2. Select a blank cell where the total should appear. Keeping the result outside the range prevents the formula from including itself.
  3. Type the formula and press Enter. With expenses of 12, 8, 15, 5, and 10 in B2:B6, enter =SUM(B2:B6) in B7; the result is 50.
  4. Check that the selected range covers the intended first and last cells. If you add another expense below the range, update the formula or use a range designed to include that new row.

You can type a formula directly in the cell or select the cell and type it in the formula bar. Excel displays the calculated value in the worksheet and keeps the formula available in the formula bar when you select that cell.

Adding separate cells or ranges

The cells to add do not have to be next to each other. Use commas to list separate cell references or ranges. This is useful when a sheet has subtotals or notes between the values you want in the final total.

Assume B2:B4 contain 10, 20, and 30, while D2:D4 contain 5, 10, and 15. To add both blocks and skip column C, enter =SUM(B2:B4,D2:D4) in D6; the result is 90. The formula adds 10 + 20 + 30 + 5 + 10 + 15.

You can also add individual cells. If A1 contains 7, C1 contains 11, and E1 contains 4, enter =SUM(A1,C1,E1) in G1; the result is 22. Use this form when the values are scattered and there is no useful continuous range. If you have a long list of separate references, consider whether rearranging the data into a clear range would make the worksheet easier to check.

Using AutoSum

AutoSum is Excel’s shortcut for inserting a SUM formula. It is useful when you want a quick total at the end of a row or column and the values are arranged together.

  1. Select the empty cell immediately below a column of numbers, or to the right of a row of numbers.
  2. On Windows, choose Home > Editing > AutoSum, or choose Formulas > Function Library > AutoSum.
  3. Excel proposes a range. Review the highlighted cells before accepting it; adjust the selection if the proposal leaves out a value or includes something unintended.
  4. Press Enter to insert the total.

For example, if A1:A3 contain 4, 6, and 9 and A4 is blank, selecting A4 and choosing AutoSum inserts a formula equivalent to =SUM(A1:A3); the result is 19. On Excel for Mac, use the AutoSum command on the ribbon; its placement can differ by ribbon layout and version. The Windows Alt+= shortcut inserts AutoSum, but keyboard shortcuts can differ on Mac, so the ribbon command is a dependable option there.

AutoSum is not a separate kind of calculation. It creates a regular SUM formula that you can inspect and edit. It may also propose a different range if nearby cells contain other numbers, so always verify the highlighted selection rather than assuming Excel has guessed correctly.

Choosing a range and keeping totals accurate

For a simple list, a range such as B2:B20 is easy to read. When the list grows, a total placed directly below it may not include new rows if the original formula ends at B20. You can extend the range when you add data, or convert the list into an Excel table so its structure can expand as rows are added.

For instance, suppose B2:B5 contain 3, 7, 9, and 11. In B6, =SUM(B2:B5) returns 30. If you later enter 6 in B6, that cell now contains a value rather than the total, so the layout needs another total cell or a range that does not overlap the result. A formula cannot safely include its own cell as part of the sum; that creates a circular reference.

Good worksheet design helps prevent these mistakes. Keep input values together, label the total, and put it outside the range being added. For recurring lists, leave room for new rows or use a table. If a total matters, compare it with a quick manual check of a few entries or with a second calculation before relying on it.

Common reasons a SUM result looks wrong

  • A value is stored as text. SUM generally ignores text in referenced cells, even if the text looks like a number. Imported data can have this issue. Changing a cell’s number format alone changes how it appears, not necessarily the underlying text value. Convert the value to a real number, then check the total again.
  • The range misses a row. A formula ending at B10 will not include B11. Select the formula cell and inspect the colored range references, or edit the range in the formula bar.
  • The total cell is inside the range. Including the result cell in its own sum causes a circular reference. Keep the total outside the cells being added.
  • A cell contains an error. An error such as #VALUE! in a referenced range can cause the SUM result to show an error too. Find and correct the source error rather than assuming the total is merely miscalculated.
  • Rows are hidden. SUM includes values in hidden rows. If you hid rows to focus on part of a list, the total still includes them unless you use a function intended for filtered or hidden data.

To diagnose a surprising result, first confirm the formula’s range, then inspect the source cells for text, errors, and hidden rows. Also check whether any values are outside the selected range. The displayed total can be formatted as currency or a number without changing the underlying calculation.

SUM compared with plus signs and SUBTOTAL

For only two or three cells, plus signs are straightforward. If A1 contains 7, A2 contains 11, and A3 contains 4, enter =A1+A2+A3 in A4; the result is 22. For a longer list, SUM is usually easier to read and update because you can refer to a whole range at once. With plus signs, every cell must be named individually.

SUM and SUBTOTAL serve different purposes when a list is filtered. If A2:A5 contain 10, 20, 30, and 40, enter =SUBTOTAL(9,A2:A5) in A6; the result is 100 when all four rows are visible. The function number 9 requests a sum and excludes rows removed by a filter, but it includes manually hidden rows. To exclude manually hidden rows as well, use function number 109: with the same values and layout, =SUBTOTAL(109,A2:A5) returns 100 when all rows are visible, and will omit manually hidden rows.

Use SUM for an ordinary total that should include every referenced value, whether or not its row is hidden. Choose SUBTOTAL when the displayed total should respond to filtering, such as in a filtered sales list. Understand which rows each calculation includes before using the result.

Frequently Asked Questions

What is the simplest formula to add cells in Excel?
For values in A1:A5, use =SUM(A1:A5) in another cell. Replace A1:A5 with the range containing the numbers you want to total.

How do I sum an entire column?
If column B contains values to add and the result will be placed outside column B, enter =SUM(B:B) in the total cell. It adds numeric entries throughout that column, including entries you may add later. Avoid placing the formula in column B, because then it would include its own cell.

Can SUM add cells that are not next to each other?
Yes. If A1 contains 8 and C1 contains 12, enter =SUM(A1,C1) in E1; the result is 20. Separate the cell references with commas in the formula.

Why does SUM show zero when the cells contain numbers?
The apparent numbers may be stored as text, or the formula may point to the wrong cells. Check that the referenced cells contain numeric values and that the range includes them. A number format by itself does not convert text into a numeric value.

Does SUM include hidden rows?
Yes. SUM includes values in hidden rows if those cells are in its range. For a filtered list where the total should change with the visible rows, use SUBTOTAL instead and choose the function number that matches whether manually hidden rows should count.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.