Google Sheets

SUMIFS by Month: Total Spending by Category in Sheets

Copy-paste SUMIFS formulas to total spending by month in Google Sheets: this month, last month, any month, and a category-by-month table. Plus fixes.

By Waseem Gul8 min read

In short

To total spending by month in Google Sheets, use SUMIFS with two date conditions: on or after the 1st of the month, and before the 1st of the next month. Add a third condition for the category. EOMONTH(TODAY(),-1)+1 gives the start of the current month, so the total resets itself on the 1st.

To total spending by month in Google Sheets, use SUMIFS with two date conditions: dates on or after the 1st of the month, and dates before the 1st of the next month. Add a third condition to narrow it to one category. Use EOMONTH(TODAY(),-1)+1 as the month start and the total resets itself on the 1st. Copy the formulas below.

Every example assumes an Expenses tab laid out like our free Google Sheets expense tracker template:

ColumnABCD
HeaderDateCategoryAmountNotes
Example03/10/2026Food64.20Groceries

If your columns differ, swap the letters. Nothing else changes.

SUMIFS by month: the formula cheat sheet

Here's every formula in one place. Each one goes in any cell on another tab and reads from the Expenses tab.

What you wantFormula
This month, all categories=SUMIFS(Expenses!C:C, Expenses!A:A, ">="&EOMONTH(TODAY(),-1)+1, Expenses!A:A, "<"&EOMONTH(TODAY(),0)+1)
This month, one category=SUMIFS(Expenses!C:C, Expenses!B:B, "Food", Expenses!A:A, ">="&EOMONTH(TODAY(),-1)+1, Expenses!A:A, "<"&EOMONTH(TODAY(),0)+1)
Last month=SUMIFS(Expenses!C:C, Expenses!A:A, ">="&EOMONTH(TODAY(),-2)+1, Expenses!A:A, "<"&EOMONTH(TODAY(),-1)+1)
A chosen month (date in F1)=SUMIFS(Expenses!C:C, Expenses!A:A, ">="&F1, Expenses!A:A, "<"&EDATE(F1,1))
A fixed month (October 2026)=SUMIFS(Expenses!C:C, Expenses!A:A, ">="&DATE(2026,10,1), Expenses!A:A, "<"&DATE(2026,11,1))
Year to date=SUMIFS(Expenses!C:C, Expenses!A:A, ">="&DATE(YEAR(TODAY()),1,1), Expenses!A:A, "<"&TODAY()+1)

The rest of this guide explains how these work, builds a category-by-month table, and fixes the errors that make SUMIFS return 0.

How SUMIFS works (the 30-second version)

SUMIFS adds the numbers in one range when the matching rows pass every condition you give it:

=SUMIFS(sum_range, criteria_range1, criterion1, [criteria_range2, criterion2, ...])
  • sum_range is what gets added: your Amount column.
  • Each criteria_range and criterion pair is one test. A row is only added if it passes all of them.
  • All the ranges must be the same size. A:A with C:C is fine. A2:A100 with C2:C500 returns an error.

Two details matter for dates:

  1. Comparison operators go in quotes and join to the value with &. Write ">="&F1, not ">=F1". The second version looks for the literal text "F1".
  2. A month is a range of dates, not a number. There's no "month equals 10" test in SUMIFS. You describe the month as "on or after the 1st, and before the 1st of the next month". That's why every formula here has the date column twice.

The header row in row 1 is ignored automatically, because the word "Date" doesn't pass a date test.

How do I use SUMIFS by month in Google Sheets?

You give SUMIFS a start date and an end date for the month. Three functions make those dates for you, so you never type them by hand.

The current month

EOMONTH(date, months) returns the last day of a month. EOMONTH(TODAY(),-1) is the last day of last month, so adding 1 gives the 1st of this month. EOMONTH(TODAY(),0)+1 is the 1st of next month.

=SUMIFS(Expenses!C:C,
  Expenses!A:A, ">="&EOMONTH(TODAY(),-1)+1,
  Expenses!A:A, "<"&EOMONTH(TODAY(),0)+1)

Line breaks inside a formula are fine in Google Sheets (press Ctrl+Enter, or ⌘+Enter on a Mac, while editing). They make long SUMIFS much easier to read.

Why "less than the 1st of next month" instead of "less than or equal to the last day"? If your Date column holds date and time (a Google Form timestamp, for example), "<="&EOMONTH(TODAY(),0) stops at midnight at the start of the last day and quietly drops that day's spending. The "less than next month's 1st" version catches everything.

Last month, or any month back

Shift both EOMONTH offsets down by one for each month you go back:

MonthStartEnd (exclusive)
This monthEOMONTH(TODAY(),-1)+1EOMONTH(TODAY(),0)+1
Last monthEOMONTH(TODAY(),-2)+1EOMONTH(TODAY(),-1)+1
Two months agoEOMONTH(TODAY(),-3)+1EOMONTH(TODAY(),-2)+1

These work across year boundaries. In January, "last month" is December of the previous year, with no extra logic.

A month you pick from a cell

For a report you can flip between months, put the 1st of a month in a cell (say F1 holds 01/09/2026) and point the formula at it:

=SUMIFS(Expenses!C:C, Expenses!A:A, ">="&F1, Expenses!A:A, "<"&EDATE(F1,1))

EDATE(F1,1) is the same day one month later, so the window is exactly September. Format F1 with Format → Number → Custom date and time as "Month yyyy" and it reads "September 2026" while still being a real date.

If people might type any day of the month into F1 (the 17th, say), make the start date safe with EOMONTH(F1,-1)+1 in place of F1.

Add a category

Add one more pair, the Category column and the category name, anywhere after the sum range:

=SUMIFS(Expenses!C:C,
  Expenses!B:B, "Food",
  Expenses!A:A, ">="&EOMONTH(TODAY(),-1)+1,
  Expenses!A:A, "<"&EOMONTH(TODAY(),0)+1)

Better still, point at a cell holding the category name (Expenses!B:B, A2) so you can fill the formula down a list. That's the next section.

Build a spending-by-category-by-month table

This is the table most people are actually after: categories down the side, months across the top, and every cell a total. Make a new tab called Summary and follow these steps.

  1. In A2 downward, type your categories exactly as they appear in the Category dropdown: Food, Transport, Utilities, Rent, Entertainment, Health, Other.
  2. In B1, type the first month you want, as the 1st: 01/01/2026.
  3. In C1, type =EDATE(B1,1) and fill it right to M1. You now have twelve month starts.
  4. Select B1:M1 and format them as "Mmm yyyy" (Format → Number → Custom date and time).
  5. In B2, paste this formula:
=SUMIFS(Expenses!$C:$C, Expenses!$B:$B, $A2, Expenses!$A:$A, ">="&B$1, Expenses!$A:$A, "<"&EDATE(B$1,1))
  1. Fill B2 right to M2, then fill B2:M2 down to your last category.
  2. Add a total row under the categories with =SUM(B2:B8), and a total column with =SUM(B2:M2).

The dollar signs are what make the fill work. $A2 locks the column, so every cell reads its category from column A. B$1 locks the row, so every cell reads its month from row 1.

The result looks like this:

CategoryAug 2026Sep 2026Oct 2026
Food412.80398.15221.40
Transport96.00110.5048.00
Utilities140.25138.900.00
Total649.05647.55269.40

For a quick check that nothing is falling through the gaps, add a row labelled "Uncategorised" using "" as the category: =SUMIFS(Expenses!$C:$C, Expenses!$B:$B, "", Expenses!$A:$A, ">="&B$1, Expenses!$A:$A, "<"&EDATE(B$1,1)). It should stay at zero.

From here, a budget column and a "remaining" column turn the table into a monthly budget. The 50/30/20 budget guide uses the same formula with a Need/Want/Save column in place of Category.

Common errors (and how to fix them)

SUMIFS returns 0: dates stored as text

This is the cause nine times out of ten. A date typed or pasted as text looks like a date but fails every >= and < comparison, so nothing gets added.

How to spot it:

  • Text dates sit on the left of the cell. Real dates sit on the right.
  • =ISNUMBER(A2) returns FALSE for a text date and TRUE for a real one.
  • Changing the format to Number does nothing to a text date. A real date turns into a number like 46315.

How to fix it:

  1. Check File → Settings → Locale. If the spreadsheet is set to United States and you type 20/10/2026, Sheets can't read day 20 as a month and keeps it as text. Set the locale to match how you write dates, then retype the bad ones.
  2. For a column of imported text dates, add a helper column with =DATEVALUE(A2), format it as a date, then copy it and use Edit → Paste special → Values only over the original.
  3. Select the Date column and set Format → Number → Date so new entries are stored as dates.
  4. To stop it happening again, add a rule with Data → Data validation → Is valid date.

The criterion is in quotes

">=F1" compares against the text "F1", so it matches nothing. Put only the operator in quotes: ">="&F1. The same goes for functions: ">="&EOMONTH(TODAY(),-1)+1, never ">=EOMONTH(TODAY(),-1)+1".

Category totals are short

SUMIFS matches category text exactly (ignoring upper and lower case). "Food " with a trailing space is a different category from "Food". Fix it with Data → Data cleanup → Trim whitespace on the Category column, and use a dropdown so the spelling can't drift.

Amounts are ignored

Amounts stored as text are skipped, the same way text dates are. They're usually left-aligned, or carry a currency symbol that was pasted in. Format the column as a number or currency and retype or VALUE() the bad cells.

"Array arguments to SUMIFS are of different size"

Your ranges don't match, for example C2:C100 with A2:A200. Use whole columns (C:C, A:A) everywhere, or the same rows in every range.

Mixed currencies

SUMIFS adds numbers. It doesn't know that 20 in euros and 20 in dollars aren't the same. Keep one currency per spreadsheet, or add a Currency column and include it as another condition.

Why not use MONTH()?

=SUMIFS(C:C, MONTH(A:A), 10) looks natural, but it doesn't work: each criteria range has to be a real range. You can get there with SUMPRODUCT, =SUMPRODUCT((MONTH(A2:A)=10)*(YEAR(A2:A)=2026), C2:C), but blank date cells count as December (their value is 0, which is 30 December 1899). The date-window SUMIFS has no such gap, and it's simpler.

Keep the Date column clean from your phone

Every SUMIFS by month formula in Google Sheets depends on one thing: the Date column holding real dates. Rows typed into the Sheets app on a phone are where text dates and stray spaces usually creep in.

Voice Sheet reads your spreadsheet's columns and turns them into a phone form, with a date picker for Date and your dropdown options for Category, so entries arrive in the same shape as the rest of the sheet. The free plan includes that form and seven Google Sheets templates, including the Personal Finances template these formulas are written for. In the app, the budget dashboard shows this month's spend per category without opening the sheet.

For the full set-up, from columns to dropdowns to sharing, see the complete guide to track expenses in Google Sheets.

Frequently asked questions

How do I sum values by month in Google Sheets?

Use SUMIFS with a date window: =SUMIFS(C:C, A:A, ">="&DATE(2026,10,1), A:A, "<"&DATE(2026,11,1)) adds every amount in column C dated in October 2026. Replace the DATE values with EOMONTH(TODAY(),-1)+1 and EOMONTH(TODAY(),0)+1 to make the total follow the current month, so it resets itself on the 1st with no editing.

Can I use MONTH() inside SUMIFS?

Not directly. SUMIFS needs a range as each criteria range, and MONTH(A:A) returns an array of numbers instead. Use a date window with >= and < instead, which is faster and also keeps different years apart. If you really need MONTH, use SUMPRODUCT, but blank dates count as December there.

Why does my SUMIFS by month return 0?

The usual cause is dates stored as text. Text dates are left-aligned and fail every >= and < test, so nothing is added. Check with =ISNUMBER(A2). Other causes are a criterion written as ">=A1" in quotes instead of ">="&A1, and category names with extra spaces or different spelling.

How do I total spending by category and month at once?

Build a grid with categories down column A and the first day of each month across row 1. In B2, use =SUMIFS(Expenses!$C:$C, Expenses!$B:$B, $A2, Expenses!$A:$A, ">="&B$1, Expenses!$A:$A, "<"&EDATE(B$1,1)), then fill it right and down. The dollar signs keep each reference pointing at the right row or column.

Does SUMIFS by month work in Excel too?

Yes. SUMIFS, EOMONTH, EDATE, DATE and TODAY all work the same way in Microsoft Excel, so these formulas copy across unchanged. Whole-column references like A:A work in both. The only difference you may notice is how each program displays dates, which depends on your regional settings.

  • sumifs
  • google sheets formulas
  • monthly totals
  • spending by category
  • expense tracker
New to Voice Sheet?

Say it, and it's in your Google Sheet.

Voice Sheet adds rows to your Google Sheets by voice, from a pasted list, a home screen widget or a form built from your columns. It works offline and never connects to your bank.

See everything Voice Sheet does →
Voice Sheet — say it, and it's in your Google Sheet

Keep reading

Track it all. Own every row.

Download on the App StoreGet it on Google Play