Guidelark
  1. Home
  2. Templates

SUMIF and SUMIFS in Google Sheets: A Budgeting Guide

Learn SUMIF and SUMIFS in Google Sheets and Excel with seven budgeting examples, a free practice workbook and fixes for common mistakes.

By Guidelark5 min read
A laptop showing a spreadsheet with highlighted green, yellow and blue cells next to an open notebook and a pen

If you learn one spreadsheet function for your money, make it SUMIFS. It answers the questions a budget is made of: how much did I spend on groceries? How much on eating out this month? How much went on the credit card?

This guide explains SUMIF and SUMIFS in plain words, with seven examples on real-looking spending data. You can download the practice file and try every formula yourself.

Download the free SUMIFS practice workbook (.xlsx)

No sign-up needed. The formulas work the same way in Google Sheets and Excel.

The Practice tab of the workbook, listing seven budgeting questions, the SUMIF or SUMIFS formula that answers each one, and the result

SUMIF: add up the rows that match one condition

SUMIF looks down one column for rows that match a condition, and adds up the amounts in those rows.

=SUMIF(range, criterion, sum_range)
  • range is the column to check, such as the categories
  • criterion is what to look for, such as "Groceries"
  • sum_range is the column to add up, such as the amounts

In plain words: "look in the category column, find every row that says Groceries, and add up the amounts."

SUMIFS: add up the rows that match several conditions

SUMIFS does the same, but with as many conditions as you like. A row is only added if it matches all of them.

=SUMIFS(sum_range, criteria_range1, criterion1, criteria_range2, criterion2, ...)

Notice the order changes. In SUMIFS the column to add comes first. In SUMIF it comes last. Mixing them up is the most common mistake with these functions, and Microsoft's own help page warns about it.

Because SUMIFS works fine with just one condition too, many people use it for everything and never think about SUMIF again.

The practice data

The workbook's Data tab has 20 transactions from September and October 2026, in five columns: Date (A), Category (B), Description (C), Amount (D) and Paid with (E). The rows run from 5 to 24, so every range below is rows 5 to 24.

The Practice tab shows each question, the formula and the result. A yellow "Your turn" column is there for you to type each formula yourself.

Seven examples for your budget

1. Total spent on groceries

=SUMIF(Data!$B$5:$B$24, "Groceries", Data!$D$5:$D$24)

Result: $362.30. Every row whose category is Groceries, across both months.

2. Groceries in October only

=SUMIFS(Data!$D$5:$D$24, Data!$B$5:$B$24, "Groceries",
        Data!$A$5:$A$24, ">="&DATE(2026,10,1),
        Data!$A$5:$A$24, "<"&DATE(2026,11,1))

Result: $158.30. Three conditions: the category is Groceries, the date is on or after October 1, and the date is before November 1. This is the formula behind every monthly budget, and it is exactly how our expense tracker totals each month.

The & joins the comparison sign to the date. Writing ">=2026-10-01" as plain text can fail, depending on your spreadsheet's language settings, so building the date with DATE is the safe way.

3. Every purchase over $50

=SUMIF(Data!$D$5:$D$24, ">50")

Result: $1,387.60. When you leave out the third part, SUMIF adds up the same column it checks. Useful for seeing how much of your spending comes from bigger purchases.

4. Eating out paid by card

=SUMIFS(Data!$D$5:$D$24, Data!$B$5:$B$24, "Eating out", Data!$E$5:$E$24, "Card")

Result: $70.50. Two conditions on two different columns. Note that "Card" only matches cells that say exactly "Card". Rows that say "Debit card" are not included. Text conditions match the whole cell, not part of it, unless you use a wildcard.

5. Anything with "coffee" in the description

=SUMIF(Data!$C$5:$C$24, "*coffee*", Data!$D$5:$D$24)

Result: $21.50. The asterisk * is a wildcard that means "any text". So "*coffee*" matches "Coffee", "Coffee and bagel" and "Coffee with a friend". Upper and lower case don't matter.

This is a quick way to find out how much a habit costs. Try "*uber*" or "*amazon*" on your own data.

6. Everything except rent

=SUMIF(Data!$B$5:$B$24, "<>Rent", Data!$D$5:$D$24)

Result: $754.30. The <> sign means "not equal to". Rent takes a big, fixed share of a small income, so leaving it out shows you how much of your spending you can actually change.

7. A category typed in a cell

=SUMIF(Data!$B$5:$B$24, $B$3, Data!$D$5:$D$24)

Result: $362.30 when cell B3 says Groceries. Instead of typing the category into the formula, you point to a cell. Change B3 to "Transport" and the answer changes to $130.00. This is how budget templates work: one formula, copied down a list of categories.

Adding "this OR that"

SUMIFS only does "and": every condition must match. For "or", add two formulas together:

=SUMIF(Data!$B$5:$B$24, "Groceries", Data!$D$5:$D$24)
 + SUMIF(Data!$B$5:$B$24, "Eating out", Data!$D$5:$D$24)

That gives $437.30: all food, whether bought at a shop or eaten out.

Why your SUMIFS returns the wrong answer

Problem What's going on Fix
Result is 0 The amounts are stored as text, often after pasting from a bank Select the column and format it as a number, or retype one value to check
A category is missing A space or typo, such as "Groceries " with a space at the end Use a dropdown for categories so the spelling is always the same
Error message The ranges are different sizes, such as D5:D24 and B5:B30 Make every range cover the same rows
Dates are ignored The dates are text, not real dates A real date can be formatted as a number. If it won't, retype it
Wrong total after copying The ranges moved when you copied the formula Lock them with $ signs, as in $D$5:$D$24

Where to go next

The same pattern works for other functions you will meet in budgets:

  • COUNTIFS counts the matching rows instead of adding them, such as how many times you ate out this month.
  • AVERAGEIFS gives the average, such as your average grocery shop.
  • MINIFS and MAXIFS give the smallest or largest matching value. They need Google Sheets or Excel 2019 or newer.

To see SUMIFS doing real work, open the free monthly budget template. Its Actual column is one SUMIFS per category.

Frequently asked questions

What is the difference between SUMIF and SUMIFS? SUMIF takes one condition. SUMIFS takes one or more. The order of their parts is also different: the column to add goes last in SUMIF and first in SUMIFS.

Do these formulas work in Excel? Yes. Both work the same way in Google Sheets and in Excel.

How many conditions can SUMIFS take? Excel allows up to 127 pairs of range and condition. A budget rarely needs more than three.

Is SUMIFS case-sensitive? No. "groceries" and "Groceries" match the same rows.

Can I match part of a word? Yes, with wildcards. * stands for any text and ? for a single character. To search for an actual asterisk or question mark, put a ~ in front of it.

This workbook is general information, not financial advice. The example numbers are made up to show the format.

Sources

Published by Guidelark

Guidelark publishes plain-language guides to budgeting, saving and earning on a small income, with the numbers shown. More about this site

Guidelark publishes general education, not personal financial advice. Check the numbers against your own situation before acting.