SUMIF Function in Google Sheets
SUMIF adds values in a range that meet a condition you specify. Learn the syntax, see practical examples, and fix common errors.
SUMIF(range, criterion, [sum_range]) SUMIF in Google Sheets adds up values in a range where a corresponding cell meets a condition you define. It is the standard way to calculate conditional totals, like summing all sales for a specific region or all amounts above a threshold.
You give SUMIF a range to evaluate, a condition to test against, and optionally a separate range to sum. If you skip the third argument, SUMIF sums the evaluated range itself.
Parameters
| Parameter | Required | Description |
|---|---|---|
range | Yes | The range of cells to evaluate against criterion. |
criterion | Yes | The condition that determines which cells to include. Can be a number, text, expression, or cell reference. Text and expressions must be in quotes. |
sum_range | No | The range of cells to sum. If omitted, SUMIF sums the cells in range directly. sum_range should match the size of range. |
Examples
Sum sales by region
Sum all values in column B where column A contains โEastโ:
=SUMIF(A2:A20, "East", B2:B20)
This checks each cell in A2:A20 for the text โEastโ and adds the corresponding value from B2:B20. If A3 is โEastโ and B3 is 500, that 500 gets included in the total.
Sum values above a threshold
Sum all order amounts greater than 100:
=SUMIF(B2:B50, ">100")
When you omit sum_range, SUMIF sums the values in the first range that meet the condition. The comparison operator and value go together inside a single set of quotes.
Sum with a cell reference as criterion
Use a cell value as the condition instead of hardcoding it:
=SUMIF(A2:A100, D1, B2:B100)
Whatever value is in D1 gets matched against column A. This makes the formula dynamic so you can change the filter without editing the formula.
Common Errors
#VALUE! --- The criterion is malformed or references an invalid value. Make sure comparison operators are inside quotes with the value, like ">100", not > 100 with a space outside quotes.
Unexpected zero --- SUMIF returns 0 if no cells match. This is not an error. Check for extra spaces, typos, or mismatched data types between range and criterion. Text comparisons are not case-sensitive.
Tips
Combine a comparison operator with a cell reference using the ampersand operator: =SUMIF(B2:B50, ">"&D1). This lets you set the threshold in a cell rather than in the formula.
SUMIF handles one condition. If you need multiple conditions (for example, region is โEastโ AND month is โJanuaryโ), use SUMIFS instead.
Want to go deeper?
Check out our full tutorials for step-by-step examples and real-world use cases.
Published February 19, 2026