SUM function

The SUM function, one of the math and trig functions, adds all of its arguments.

Syntax: SUM(number1,[number2],...)

For example:

  • =SUM(A2,A3)

  • =SUM(A5,A6, 2)

Argument name

Description

number1    (Required)

The first number you want to add. The number can be like 4, a cell reference like B6, or a cell range like B2:B8.

number2    (Optional)

This is the second number you want to add. You can specify up to 255 additional numbers in this way.

Examples

To use these examples in Excel, select the data in the following table and press Ctrl+C. In Excel, click cell A1 in a new worksheet and press Ctrl+V.

Data

-5

15

30

'5

TRUE

Formula

Description

=SUM(A2,A3)

Adds the value in cells A2 and A3. The result is 10.

=SUM(A2:A4,15)

Adds the values in cells A2 through A4 first, and then adds 15. The result is 55.

=SUM("5", 15, TRUE)

Adds 5, 15 and 1. The text value "5" is first translated into a number, and the logical value TRUE is first translated into the number 1. The result is 21.

=SUM(A5,A6, 2)

Adds the values in cells A5 and A6, and then adds 2 to that result. Because non-numeric values in references aren't translated— the value in cell A5 ('5) and the value in cell A6 (TRUE) are both treated as text—the values in those cells are ignored. The result is 2.

Common Problems

Problem

What went wrong

Some numbers aren't added.

If an argument is a cell range or reference, only numeric values in the reference or range can be added. Empty cells, logical values like TRUE, or text are ignored.

The #Name? error value appears instead of the expected result.

This usually means that the formula is misspelled.

Related

Applies To: Excel 2016 for Mac, Excel 2007, Excel 2013, Excel Online, Excel Starter, Excel 2010, Excel for Mac 2011



Was this information helpful?

Yes No

How can we improve it?

255 characters remaining

To protect your privacy, please do not include contact information in your feedback. Review our privacy policy.

Thank you for your feedback!

Support resources

Change language