fxExcelReps

← How-to guides

How to Sum by Month in Excel

To total a month, use SUMIFS with two date conditions: on or after the first day, and on or before the last day. EOMONTH gives the last day of any month, so one formula works for every month in a summary table.

{"cells": {"A1": "Month (any date in it)", "A10": 46031, "A11": 46040, "A12": 46054, "A13": 46060, "A14": 46068, "A15": 46080, "A2": 46023, "A3": 46054, "A4": "January, any year", "A8": "Date", "A9": 46025, "B1": "Total", "B10": 450, "B11": 980, "B12": 1500, "B13": 320, "B14": 700, "B15": 610, "B2": "=SUMIFS(B9:B15,A9:A15,\"\u003e=\"\u0026A2,A9:A15,\"\u003c=\"\u0026EOMONTH(A2,0))", "B3": "=SUMIFS(B9:B15,A9:A15,\"\u003e=\"\u0026A3,A9:A15,\"\u003c=\"\u0026EOMONTH(A3,0))", "B4": "=SUMPRODUCT((MONTH(A9:A15)=1)*B9:B15)", "B8": "Amount", "B9": 1200}, "focus": "B2", "formats": {"A2:A3": {"fmt": "date"}, "A9:A15": {"fmt": "date"}}, "note": "Change a date in column A to move it to another month."}

SUMIFS with EOMONTH

Put the first day of each month in a column; the formula finds the last day itself.

=SUMIFS(B:B, A:A, ">="&E2, A:A, "<="&EOMONTH(E2, 0))The total for the month that starts in E2.
=SUMIFS(B:B, A:A, ">="&DATE(2026,1,1), A:A, "<"&DATE(2026,2,1))January 2026, with the dates typed in.

SUMPRODUCT with MONTH

MONTH works on the whole column at once, so SUMPRODUCT can add up a month across all years.

=SUMPRODUCT((MONTH(A2:A500)=1)*B2:B500)Every January in the list.
=SUMPRODUCT((YEAR(A2:A500)=2026)*(MONTH(A2:A500)=1)*B2:B500)January 2026 only.

A PivotTable

Put the date in Rows and the amount in Values, then right-click a date → Group → Months.

Insert → PivotTableA monthly summary without formulas. See PivotTables.

Common mistakes

The totals are 0
The dates are text, not real dates. Check with =ISNUMBER(A2).
A day is missing at the end of the month
Times are part of the date: 31 Jan 18:00 is after 31 Jan. Use "<"&EOMONTH(E2,0)+1 instead.

Frequently asked questions

How do I sum by year?

The same with whole years: =SUMIFS(B:B, A:A, ">="&DATE(2026,1,1), A:A, "<"&DATE(2027,1,1)).

How do I make a list of months?

=EOMONTH(start, ROW()-2)+1 copied down gives the first day of each month. See EOMONTH.

Can I show the month name next to the total?

Format the date cell with the custom format mmm yyyy.

Practise it

SUMIFSEOMONTHSUMPRODUCTPivotTables

Think you know this?

15 formula tasks, no hints, with a leaderboard. Absolute, relative and mixed references included.

Take the Pro Challenge →

More how-to guides

How to Calculate Age in Excel

Calculate age from a date of birth in Excel with DATEDIF, in years or in years and months, and why subtracting years gives wrong ages.

How to Calculate Days Between Two Dates in Excel

Count days between two dates in Excel by subtracting them, count working days with NETWORKDAYS, and get months or years with DATEDIF.

How to Get the Last Day of the Month in Excel

Get the last day of a month in Excel with EOMONTH, plus the first day of the month, the number of days and the last working day.

How to Calculate Percentage Change in Excel

Calculate the percentage increase or decrease between two numbers in Excel with (new - old) / old, and format the result as a percent.