The SUM function, one of the math and trig functions, adds values. You can add individual values, cell references or ranges or a mix of all three.
This video is part of a training course called Add numbers in Excel 2013.
Syntax: SUM(number1,[number2],...)
For example:

=SUM(A2:A10)

=SUM(A2:A10, C2:C10)
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. 
number2255 (Optional) 
This is the second number you want to add. You can specify up to 255 numbers in this way. 
Quick Sum with the Status Bar
If you want to quickly get the Sum of a range of cells, all you need to do is select the range and look in the lower righthand side of the Excel window.
This is the Status Bar, and it displays information regarding whatever you have selected, whether it's a single cell or multiple cells. If you rightclick on the Status Bar a feature dialog box will pop out displaying all of the options you can select. Note that it also displays values for your selected range if you have those attributes checked. Learn more about the Status Bar.
Using the AutoSum Wizard
The easiest way to add a SUM formula to your worksheet is to use the AutoSum Wizard. Select an empty cell directly above or below the range that you want to sum, and on the Home or Formula tabs in the Ribbon, press AutoSum > Sum. The AutoSum Wizard will automatically sense the range to be summed and build the formula for you. It can also work horizontally if you select a cell to the left or right of the range to be summed. Note it’s not going to work on noncontiguous ranges (see Example 4).

The AutoSum dialog also lets you select other common functions like:

Average

Count numbers

Max

Min

More functions
Example 2 – AutoSum vertically
The AutoSum Wizard has automatically detected cells B2:B5 as the range to be summed. All you need to do is press Enter to confirm it. If you need add/exclude more cells, you can hold the Shift Key > Arrow key of your choice until your selection matches what you want, and press Enter when you're done.
Intellisense function guide: the SUM(number1,[number2], …) floating tag beneath the function is its Intellisense guide. If you click the SUM or function name, it will turn into a blue hyperlink, which will take you to the Help topic for that function. If you click the individual function elements, their representative pieces in the formula will be highlighted. In this case only B2:B5 would be highlighted since there is only one number reference in this formula. The Intellisense tag will appear for any function.
Example 3 – AutoSum horizontally
Example 4 – Sum noncontiguous cells
The AutoSum Wizard will generally only work for contiguous ranges, so if you have blank rows or columns in your sum range, Excel is going to stop at the first gap. In that case you’d need to SUM by selection, where you add the individual ranges one by one. In this example if you had data in cell B4, Excel would generate =SUM(C2:C6) since it would recognize a contiguous range.
You can quickly select multiple, noncontiguous ranges with Ctrl+LeftClick. First, enter “=SUM(“, then select your different ranges and Excel will automatically add the comma separator between ranges for you. Press enter when you’re done.
TIP: you can use ALT+= to quickly add the SUM function to a cell. Then all you need to do is select your range(s).
Note: you may notice how Excel has highlighted the different function ranges by color, and they match within the formula itself, so C2:C3 is blue, and C5:C6 is red. Excel will do this for all functions, unless the referenced range is on a different worksheet or in a different workbook. For enhanced accessibility with assistive technology, you can use Named Ranges, like “Week1”, “Week2”, etc. and then reference them in your formula:

=SUM(Week1,Week2)
Best Practices
This section will discuss some best practices for working with the SUM functions. Much of this can be applied to working with other functions as well.
The =1+2 or =A+B Method – While you can enter =1+2+3 or =A1+B1+C2 and get fully accurate results, these methods are error prone for several reasons:
Typos – Imagine trying to enter more and/or much larger values like this:

=14598.93+65437.90+78496.23
Then try to validate that your entries are correct. It’s much easier to put these values in individual cells and use a SUM formula. In addition, you can format the values when they’re in cells, making them much more readable then when they’re in a formula.


#VALUE! errors from referencing text instead of numbers.
If you use a formula like:

=A1+B1+C1 or =A1+A2+A3
Try to avoid using the =1+2 or =A+B methodsYour formula can break if there are any nonnumeric (text) values in the referenced cells, which will return a #VALUE! error. SUM will ignore text values and give you the sum of just the numeric values.
SUM ignores text values 

#REF! error from deleting rows or columns
If you delete a row or column, the formula will not update to exclude the deleted row and it will return a #REF! error, where a SUM function will automatically update.

Formulas won't update references when inserting rows or columns
=A+B style formulas won't update when adding columns or rowsIf you insert a row or column, the formula will not update to include the added row, where a SUM function will automatically update (as long as you’re not outside of the range referenced in the formula). This is especially important if you expect your formula to update and it doesn’t, as it will leave you with incomplete results that you might not catch.

SUM with individual Cell References vs. Ranges
Using a formula like:

=SUM(A1,A2,A3,B1,B2,B3)
Is equally error prone when inserting or deleting rows within the referenced range for the same reasons. It’s much better to use individual ranges, like:

=SUM(A1:A3,B1:B3)
Which will update when adding or deleting rows.


Let’s say you want to apply a Percentage Discount to a range of cells that you’ve summed.

=SUM(A2:A14)*25%
Would give you 25% of the summed range, however that hardcodes the 25% in the formula, and it might be hard to find later if you need to change it. You’re much better off putting the 25% in a cell and referencing that instead, where it’s out in the open and easily changed, like this:

=SUM(A2:A14)*E2
To divide instead of multiply you simply replace the “*” with “/”: =SUM(A2:A14)/E2


Adding or Subtracting from a SUM
i. You can easily Add or Subtract from a Sum using + or  like this:

=SUM(A1:A10)+E2

=SUM(A1:A10)E2


Sometimes you need to sum a particular cell on multiple worksheets. It may be tempting to click on each sheet and the cell you want and just use “+” to add the cell values, but that’s tedious and can be error prone, much more so than just trying to construct a formula that only references a single sheet.

i. =Sheet1!A1+Sheet2!A1+Sheet3!A1
You can accomplish this much easier with a 3D or 3Dimensional SUM:

=SUM(Sheet1:Sheet3!A1)
Which will sum the cell A1 in all sheets from Sheet 1 to Sheet 3.
This is particularly helpful in situations where you have a single sheet for each month (JanuaryDecember) and you need to total them on a summary sheet.

=SUM(January:December!A2)
Which will sum cell A2 in each sheet from January through December.
Note: if your worksheets have spaces in their names, like “January Sales”, then you need to use an apostrophe when referencing the sheet names in a formula:

=SUM(‘January Sales:December Sales’!A2)


You can absolutely use SUM with other functions. Here’s an example that creates a monthly average calculation:

=SUM(A2:L2)/COUNTA(A2:L2)


Which takes the SUM of A2:L2 divided by the count of nonblank cells in A2:L2 (May through December are blank).
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. 
Do you have a specific function question?
Help us improve Excel
Do you have suggestions about how we can improve the next version of Excel? If so, please check out the topics at Excel User Voice.