SUM
FunctionAdds all the numbers in a range of cells
Interactive example
Spreadsheet editor
Syntax
=SUM(number1, [number2], ...) Arguments
| Argument | Required | Description |
|---|---|---|
| number1 | Yes | The first number, cell reference, or range you want to sum |
| number2 | No | Additional numbers, cell references, or ranges (up to 255 arguments) |
About
The SUM function adds all numbers in a range of cells. It's one of the most commonly used Excel functions. You can sum individual cells, ranges of cells, or a combination of both. The SUM function automatically ignores empty cells and text values in the calculation.
Examples
=SUM(1,2,3) returns 6 =SUM(A1:A5) sums all values in cells A1 through A5 =SUM(A1,B1,C1) adds the values in cells A1, B1, and C1 =SUM(A1:A5,B1:B5) sums values in both ranges
Notes
The SUM function can handle up to 255 arguments. It ignores logical values (TRUE/FALSE), text, and empty cells. If you need to include logical values in your sum, use the SUMPRODUCT function instead.
Common questions
How many cells can I sum at once?
You can sum up to 255 separate arguments, and each argument can be a range containing many cells. Practically, there's no limit to how many cells you can sum.
What happens if some cells contain text?
SUM ignores text values and empty cells. Only numeric values are included in the calculation.
Can I sum non-contiguous ranges?
Yes, you can sum multiple non-contiguous ranges by separating them with commas. For example: =SUM(A1:A5,C1:C5,E1:E5)