🟩 Sheet Formulas

How to Sum by Month in Google Sheets

Use =SUMIFS(B:B,A:A,">="&DATE(2024,1,1),A:A,"<"&DATE(2024,2,1)) to total column B for every date in column A that falls in January 2024.

=SUMIFS(B:B,A:A,">="&DATE(2024,1,1),A:A,"<"&DATE(2024,2,1))

Sums B where the date in A is on or after the 1st and before the next month's 1st. Change the DATE arguments for other months.

How it works

Summing by month means totalling every row whose date falls between the first of the month and the first of the next month. SUMIFS with two date bounds does this cleanly and is far safer than comparing formatted text. Building the bounds with DATE(year,month,1) and EDATE makes it easy to roll to the next month. To match a month regardless of year, use SUMPRODUCT with MONTH().

Variations

Reference a month-start cell

=SUMIFS(B:B,A:A,">="&D2,A:A,"<"&EDATE(D2,1))

Put the month's first day in D2; EDATE(D2,1) is the next month's first day.

Match a month across any year

=SUMPRODUCT((MONTH(A2:A)=1)*(B2:B))

Totals every January regardless of year (1 = January).

Sum by month and year with a helper

=SUMIF(C2:C,"2024-01",B2:B)

If C holds =TEXT(A2,"yyyy-mm"), a plain SUMIF works.

Examples

ScenarioFormula
January 2024 sales=SUMIFS(B:B,A:A,">="&DATE(2024,1,1),A:A,"<"&DATE(2024,2,1))
Every March, any year=SUMPRODUCT((MONTH(A2:A)=3)*(B2:B))

FAQ

Why use two date bounds instead of matching text?

Real dates are numbers, so >= first-of-month and < first-of-next-month catches every day exactly, with no formatting or timezone surprises.

How do I sum the same month across years?

Use =SUMPRODUCT((MONTH(A2:A)=1)*(B2:B)) — it ignores the year and totals every January.

How do I roll the formula to the next month easily?

Reference a month-start cell and use EDATE(D2,1) for the upper bound so you only change one cell.

Related formulas