Sum by Month Formula

To sum values by month, filter the date column to the first and last day of that month. SUMIFS does it in one formula, and a list of month-start dates lets you fill it down for a full report.

Free, no sign-up required · 5 free generations a day

Last updated

Describe your task, get the formula

Type what you need in plain English, or pick an example below. You get the formula, a step-by-step explanation, and a worked example.

Sum by month formulas

Syntax
=SUMIFS(sum_range, date_range, ">="&month_start, date_range, "<"&EDATE(month_start,1))
=SUMPRODUCT((MONTH(date_range)=month)*(YEAR(date_range)=year)*sum_range)

The SUMIFS version keeps dates from the first day of the month up to, but not including, the first day of the next month. That also works for dates that include a time of day. The SUMPRODUCT version is handy when you only have a month number.

Examples

Total for the month that starts on the date in F2

=SUMIFS($C:$C,$A:$A,">="&F2,$A:$A,"<"&EDATE(F2,1))

Adds column C for every row whose date in column A is on or after F2 and before the same day next month. Fill it down next to a list of month-start dates to build a monthly report.

Total for a month number across all years

=SUMPRODUCT((MONTH($A$2:$A$100)=1)*$C$2:$C$100)

Sums column C where the date falls in January, regardless of the year. Replace 1 with a cell reference to make the month selectable.

Total for one specific month and year

=SUMIFS($C:$C,$A:$A,">="&DATE(2025,3,1),$A:$A,"<"&DATE(2025,4,1))

Builds the first day of March and April 2025 with DATE, which avoids problems with regional date formats typed into the formula.

Common mistakes and how to fix them

The last day of the month is missing

A condition like "<="&EOMONTH(F2,0) leaves out values on the last day when the dates include a time. Use "<" with the first day of the next month instead.

The result is zero

Dates stored as text are not compared as dates. Left-aligned dates are a sign of this; convert them with DATEVALUE or re-enter them in a format your spreadsheet recognizes.

#VALUE! in the SUMPRODUCT version

MONTH fails on text, for example a header cell inside the range. Start the range on the first data row and make sure every cell in it holds a date or is empty.

Frequently asked questions

How do I sum by month and category together?

Add one more pair of arguments to SUMIFS: the category column and the category to match, for example SUMIFS(C:C,A:A,">="&F2,A:A,"<"&EDATE(F2,1),B:B,"West").

Can I do this without a formula?

Yes — a pivot table grouped by months gives the same totals. A formula is better when the report has to update on its own or sit inside a larger model.

Does the formula work in Google Sheets?

Yes. SUMIFS, EDATE, DATE, and SUMPRODUCT behave the same in Excel and Google Sheets.

Don't want to write it by hand?

Describe what you need in plain English and get a ready-to-use formula in seconds.

Try the formula generator