Tabular IQ
Back to Function Index

SUM()

Overview

SUM() calculates the total of all numbers in the specified list. This function is one of the most commonly used aggregation functions, useful for calculating totals, running sums, and performing basic arithmetic operations across multiple values.

Function Format

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

Return Value

SUM() returns a numeric value

Examples


// Basic addition
SUM(3, 1, 2) = 6

// Multiple numbers
SUM(3, 1, 4, 2) = 10

// Negative numbers
SUM(-3, 1, -4, 2) = -4

// Additional examples
SUM(0, 0, 0) = 0           // Zero values
SUM(1.5, 2.5) = 4.0        // Decimal numbers
SUM(-10, 10) = 0           // Opposing values
SUM(100, 200, 300) = 600   // Large numbers

Notes

  • Important behaviors:
    • Adds all numbers in the list
    • Handles both positive and negative numbers
    • Works with integers and decimals
    • Returns 0 for empty list
    • Preserves decimal precision
  • Common use cases include:
    • Total calculations
    • Running sums
    • Financial calculations
    • Statistical analysis
    • Data aggregation
  • The function is useful for:
    • Adding multiple values
    • Calculating totals
    • Financial reporting
    • Data analysis
  • Performance considerations:
    • Efficient for large lists
    • Handles null values gracefully
    • Maintains numeric precision
    • Works with various numeric types