SUMIF formula

Adds up only the values that meet a single condition — like totaling sales for one specific product. For more than one condition at a time, SUMIFS is the formula to reach for instead.

Syntax

=SUMIF(range, criteria, [sum_range])

The range being tested and the sum_range being added must line up row for row and be the same size — a mismatch is the most common reason a SUMIF quietly returns the wrong total instead of an error. If you leave out sum_range, SUMIF sums the same range it tested, which is fine when the values you're checking and totaling are the same column.

Examples

=SUMIF(A:A,"Widget",C:C)

Totals column C for every row where column A says "Widget".

=SUMIF(B2:B50,">100")

Sums only the values in B2:B50 that are greater than 100 — no separate sum range needed since it's checking and summing the same column.

=SUMIF(D2:D50,"<>",E2:E50)

Sums column E only for rows where column D isn't blank, using "<>" to mean "not empty".

Paste your own SUMIF formula and get a plain-English explanation, or describe what you need and let FormulaFixer write it for you.

Explain a SUMIF formula →

More formulas