Welcome to our comprehensive guide on using the SUM function in Excel. This is a fundamental tool for calculating the total of values within a range of cells in Excel. In this guide, we'll provide a detailed walkthrough of how to effectively utilize the SUM function in various scenarios. Whether you're looking to sum a column of numbers, calculate a total from a range of cells, or explore advanced tips and error handling techniques, this guide has you covered. By the end of this tutorial, you'll have a solid understanding of how to leverage the SUM function to perform accurate calculations and streamline your Excel workflows.


SUM Function in Excel: Supported versions

  • All versions

SUM Function in Excel: Syntax

Syntax is straightforward: =SUM(number1, [number2], ...). Here, "number1" represents the first number or range to be summed, and you can include up to 255 additional numbers or ranges as arguments by separating them with commas. The square brackets around "number2" indicate that this argument is optional, allowing you to include multiple values if needed. For example, if you want to sum the values in cells A1 to A5, you would use the formula =SUM(A1:A5). This would add up the values in those cells and display the total in the cell where the formula is entered. Understanding the syntax of the SUM function is essential for utilizing its full potential in Excel calculations.

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


Arguments

number1 The first number or numbers you want to add. You can put a static number like 4, a cell reference like B6, or a cell range like B2:B8.
[number2] Optional. The second number or numbers you want to add up to 255 numbers.


Examples

excel

=SUM(number1, [number2], ...)


Here's a breakdown:

  • number1 is the first number or range of cells you want to add.
  • [number2] is an optional argument representing additional numbers or ranges you want to include in the sum. You can include up to 255 arguments in total.

For example, suppose you have a list of numbers in cells A1 to A5 (5, 10, 15, 20, and 25), and you want to find their sum. You would use the following formula:

excel

=SUM(A1:A5)


This formula adds up the values in cells A1 to A5, resulting in a sum of 75. The SUM function can handle both individual cells and ranges of cells, making it a versatile tool for performing calculations in Excel.

Example 1

=SUM(78,84,78,109,85,100)
formula simply sums all numbers in the arguments.

Example 2

=SUM(G3,H3,I3,J3,K3,L3)
formula sums each value in referred cells.

Example 3

=SUM(G3:L3)
formula sums values in each cells in referred range. Any valid range can be used with the SUM function.

SUM-3

Download Workbook


Tips

  • The SUM function ignores the string values. However, please keep in mind that date or time values are serial numbers for Excel, not strings.
  • Excel's AutoSum feature automatically adds the SUM formula by default. To apply the SUM function automatically:
    • Select the range you want to sum as well as empty cell or cells for the SUM
    • Press Alt + = (equal sign while pressing Alt key) combination
  • To calculate the running totals use the SUM function with a mixed reference: How to calculate running totals in Excel Tables

SUM Function in Excel: Issues

#####

The column is too narrow for the result of the function. The solution is to increase the width of the column.

SUM Function in Excel: Error

When using the SUM function in Excel, it's important to note that if any of the referred cells or ranges contain errors, the SUM function will return the same error. This means that if any of the cells being summed contain errors such as #VALUE!, #DIV/0!, #REF!, #NAME?, #NUM!, or #NULL!, the SUM function will result in the same error. It's essential to ensure that the cells or ranges being summed contain valid numerical values for the SUM function to calculate correctly. If you encounter errors in your SUM function, double-check the cells or ranges being referenced to ensure they contain the expected data.