π SUM Function: The Basic Formula for Calculating Totals in Google Sheets
π What is the SUM function?
The SUM
function is one of the most essential and fundamental functions in Google Sheets.
It allows you to calculate the total of selected numeric cells quickly and efficiently.
For example, if you want to add up the values from A1 to A5, simply enter:
=SUM(A1:A5)
It works exactly like in Excel, making it very familiar for spreadsheet users.
π§ͺ Basic Syntax
=SUM(number1, [number2, ...])
- Each argument can be a number, a cell reference, a range, or a combination.
- You can mix ranges and specific values.
π Example 1: Adding a single range
A | |
---|---|
1 | 10 |
2 | 20 |
3 | 30 |
=SUM(A1:A3)
π Result: 60
π Empty or text cells are ignored.
π Example 2: Summing multiple ranges
A | B | |
---|---|---|
1 | 10 | 5 |
2 | 20 | 15 |
3 | 30 | 25 |
=SUM(A1:A3, B1:B3)
π Result: 105
π Explanation: 60 (from A1:A3) + 45 (from B1:B3)
π Example 3: Mixing values and ranges
=SUM(10, 20, 30, A1:A3)
Assuming A1:A3 = 1, 2, 3
π Result: 10 + 20 + 30 + 1 + 2 + 3 = 66
π Example 4: Using SUM with conditions (no SUMIF)
You can use FILTER
to dynamically sum only values that meet a condition.
=SUM(FILTER(A1:A10, B1:B10="Completed"))
π This sums only the A column values where B equals "Completed"
π Very useful for status-based reports
πΌ Use Case β : Monthly revenue totals
A (Date) | B (Amount) | |
---|---|---|
1 | 2025-07-01 | 100000 |
2 | 2025-07-03 | 250000 |
3 | 2025-07-15 | 400000 |
4 | 2025-08-01 | 300000 |
=SUM(FILTER(B1:B4, TEXT(A1:A4,"yyyy-mm")="2025-07"))
π Result: 750000
(only rows from July)
πΌ Use Case β‘: Summing salaries by department
A (Name) | B (Dept.) | C (Salary) | |
---|---|---|---|
1 | Kim | Sales | 3000000 |
2 | Lee | Marketing | 3200000 |
3 | Park | Sales | 3100000 |
=SUM(FILTER(C1:C3, B1:B3="Sales"))
π Result: 6100000
π You can build conditional sums without SUMIF
β οΈ Things to Watch Out For
Case | Behavior |
---|---|
Blank cells | Ignored |
Text cells | Ignored |
Error cells | Entire function may fail β use with IFERROR or ISNUMBER |
π§© Frequently Combined With
Function | Purpose |
---|---|
SUMIF , SUMIFS | Conditional sums |
ARRAYFORMULA | Apply formulas across ranges |
FILTER | Filter data based on conditions |
IFERROR | Prevent error breakdowns |
QUERY | SQL-like condition-based aggregation |
β Summary
SUM
is the most basic and widely used function in Google Sheets.- It works with direct values, ranges, and filtered results.
- When combined with functions like
FILTER
,ARRAYFORMULA
, andQUERY
,
it becomes a powerful tool for real-time reporting and automation.