← All how-to recipes

How to use SUMIFS (sum with multiple conditions)

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Add up numbers where several conditions are all true — sales for one region AND one product AND a date range.

The formula

AppFormulaNotes
Excel (desktop)=SUMIFS(C2:C10,A2:A10,"East",B2:B10,"Widget")Sum range FIRST, then range/criteria pairs. Note this order is the OPPOSITE of SUMIF.
Google Sheets=SUMIFS(C2:C10,A2:A10,"East",B2:B10,"Widget")Identical.
LibreOffice Calc=SUMIFS(C2:C10,A2:A10,"East",B2:B10,"Widget")Identical.

How it works

SUMIFS starts with the range to add (C, the amounts), then takes as many range/criteria pairs as you need — each row must satisfy EVERY pair. Only rows that are both "East" and "Widget" count: 100 + 25 = 125 (the West-Widget and East-Gadget rows fail one test each). The single most common mistake: SUMIFS puts the sum range FIRST, whereas SUMIF puts it LAST — flipping them silently gives wrong or zero results. Criteria accept comparisons (">100"), wildcards ("Widg*"), and cell references (">"&E1). Add date bounds as two more pairs to sum within a period (see sum-between-two-dates). COUNTIFS and AVERAGEIFS follow the same pattern.

Verified, not just documented

We ran =SUMIFS(C2:C5,A2:A5,"East",B2:B5,"Widget") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 125 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 125 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

SUMIFS — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons