Skip to content

SUM

Adds numbers, cells and ranges. Text and TRUE/FALSE inside a range are ignored.

Syntax

=SUM(, [number2], …)

Math and trigonometry

All versions of Excel.

Try it

Edit the formula in B7 or change the inputs. The sheet recalculates as you type.

B7
A
B
1
Expense
Amount
2
Rent
1,800
3
Utilities
240
4
Software
365
5
Insurance
410
6
Travel
185
7
Total
3,000

B7 =SUM(B2:B6) returns 3000

How SUM works

SUM adds up everything you give it. It is the most used function in Excel, and the one to reach for whenever a column of figures needs a total.

What SUM adds

Each argument can be a single number, a cell reference or a range. SUM adds every number it finds and skips the rest. Inside a range or a cell reference, text, TRUE/FALSE and empty cells are ignored. That is why a header row or a note in the middle of a column doesn't break the total.

Values typed straight into the formula are treated differently. =SUM("30", 10) returns 40, because Excel converts the typed text "30" to a number, and =SUM(TRUE, 1) returns 2. A cell that contains the text "30" is a different case: SUM ignores it. This is the usual reason a total comes out lower than expected, so check for numbers stored as text.

Ranges and several arguments

A range can be a column, a row or a block. =SUM(B2:C9) adds both columns. To add separate areas, list them: =SUM(B2:B9, D2:D9). Whole-column references such as =SUM(B:B) also work and keep covering new rows as you add them, but they must not include the cell that holds the formula, or Excel reports a circular reference.

Errors pass through

If any cell in the range holds an error such as #N/A or #DIV/0!, SUM returns that error. Fix the source cell, or use AGGREGATE with option 6 to total the numbers and skip the errors.

SUM, the plus sign and AutoSum

=B2+B3+B4 gives the same answer for three cells, but it errors if one of them contains text, and it doesn't grow when you insert a row inside the range. SUM does both. The AutoSum button (Alt+= on Windows) writes a SUM formula for you and guesses the range, so check the range it picks.

Related ways to total

  • SUMIF and SUMIFS add only the rows that meet conditions.
  • SUMPRODUCT multiplies matching items before adding, for example quantity times price.
  • SUBTOTAL totals a filtered list and ignores other subtotals in the range.

Each of these costs one function name more than SUM, so use plain SUM when you want everything in the range.

Arguments

number1
The first thing to add: a number, a cell such as B2, or a range such as B2:B9.
number2, …optional
More numbers, cells or ranges, up to 255 arguments in all. Mix them freely: =SUM(B2:B9, D2:D9, 100).

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Total a column

B7 =SUM(B2:B6)

Result: 3000

One range, five cells. Adding a sixth expense inside the range updates the total.

B7
A
B
1
Expense
Amount
2
Rent
1,800
3
Utilities
240
4
Software
365
5
Insurance
410
6
Travel
185
7
Total
3,000

B7 =SUM(B2:B6) returns 3000

Example 2

Add a block of cells

B6 =SUM(B2:C4)

Result: 736

A range can be several columns wide. SUM adds all six cells.

B6
A
B
C
1
Region
Q1
Q2
2
North
120
130
3
South
95
101
4
East
140
150
5
6
Half-year
736

B6 =SUM(B2:C4) returns 736

Example 3

Text and TRUE/FALSE in a range are ignored

C1 =SUM(A1:A5)

Result: 70

A3 holds the text "30" and A4 holds TRUE. SUM skips both and adds 10 + 20 + 40.

C1
A
B
C
1
10
70
2
20
3
30
4
TRUE
5
40

C1 =SUM(A1:A5) returns 70

Example 4

Running total with a mixed reference

C4 =SUM($B$2:B4)

Result: 1245

The start of the range is locked with dollar signs and the end is relative. Copied down, each row totals everything from January to its own month.

C4
A
B
C
1
Month
Sales
Year to date
2
Jan
410
3
Feb
385
4
Mar
450
1245
5
Apr
395
6

C4 =SUM($B$2:B4) returns 1245

Example 5

Share of the total

C2 =B2/SUM($B$2:$B$6)

Result: 60%

SUM supplies the denominator. The dollar signs keep the range fixed when the formula is copied down.

C2
A
B
C
1
Expense
Amount
Share
2
Rent
1800
60%
3
Utilities
240
4
Software
365
5
Insurance
410
6
Travel
185

C2 =B2/SUM($B$2:$B$6) returns 60%

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B9, total the net amounts for all six lines.

Answer in B9.

B9
A
B
C
1
Line
Net
VAT
2
Pallet wrap
240
48
3
Gloves
180
36
4
Labels
95
19
5
Tape
130
26
6
Straps
310
62
7
Cartons
420
84
8
9
Total net
10
Total with VAT

Common mistakes

  • Numbers stored as text are ignored, so the total looks too small. A green triangle in the corner of a cell is the usual sign. Convert them with VALUE, or multiply the column by 1.
  • If any cell in the range holds an error such as #N/A, SUM returns that error. Fix the source, or use AGGREGATE(9, 6, range) to skip errors.
  • SUM counts hidden rows. To total only what a filter leaves visible, use SUBTOTAL(109, range) instead.
  • A range that includes the formula's own cell is a circular reference. Keep the total outside the range, for example =SUM(B2:B9) in B10, not B9.
  • AutoSum guesses the range and stops at the first blank cell. If the data has gaps, check the highlighted range before you press Enter.

Questions people ask

Why is my SUM wrong or zero?

The cells probably hold text that looks like numbers. SUM ignores text in a range. Check for left-aligned values or a green triangle, then convert them with VALUE or Text to Columns.

What is the difference between SUM and the plus sign?

`=B2+B3` adds two cells and returns `#VALUE!` if one holds text. `=SUM(B2:B3)` skips text and adjusts when you insert a row inside the range. Use SUM for ranges.

How do I sum only certain rows?

Use SUMIF for one condition and SUMIFS for several, for example `=SUMIFS(C2:C9, A2:A9, "North")`. For visible rows after a filter, use SUBTOTAL.

How many arguments can SUM take?

Up to 255, each a number, cell or range. A single range can be as large as the sheet, so you rarely need more than a few arguments.

What is the shortcut for SUM?

Select the cell under or beside the numbers and press Alt+= on Windows, or Cmd+Shift+T on Mac. Excel inserts a SUM formula with its guess at the range.

Learn SUM in a real sheet.

SUM is taught in Excel foundations, lesson 5: SUM and ranges. Each lesson is a short, graded exercise like the one above.