Conditional sums and counts
SUMIFS function playground
Adds the values that meet several conditions at once.
The playground runs in your browser. Nothing you type is sent anywhere.
How SUMIFS works
SUMIFS tests each row against every condition. Only rows that pass all of them (AND logic) have their sum_range value added.
Use two conditions on the same column to make a between test, such as dates from 1 Feb up to, but not including, 1 Mar.
Syntax
=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)| Argument | What it means |
|---|---|
sum_rangerequired | The cells to add. Note it comes first, unlike SUMIF. |
criteria_range1required | The first range to test. |
criteria1required | The condition for criteria_range1. |
criteria_range2, criteria2, ...optional | More range/condition pairs. A row is added only if it passes every one. |
Examples
| Formula | What it does | Result |
|---|---|---|
=SUMIFS(F2:F11,B2:B11,I1,D2:D11,I2) | Revenue for the region in I1 and the product in I2. | $6,000.00 |
=SUMIFS(F2:F11,A2:A11,">="&DATE(2026,2,1),A2:A11,"<"&DATE(2026,3,1)) | Revenue for February 2026. | $4,300.00 |
=SUMIFS(E2:E11,C2:C11,"Ana",F2:F11,">1000") | Units Ana sold in sales over 1,000. | 10 |
=SUMIFS(F2:F11,B2:B11,"<>East") | Revenue from every region except East. | $10,150.00 |
Common mistakes
Argument orderIn SUMIFS the sum range comes first; in SUMIF it comes last.
OR conditionsSUMIFS only does AND. For East or West, add two SUMIFS together.
Related functions
Learn more
Download the example workbook (.xlsx)
The workbook has the same sample data and formulas, plus a practice sheet.