ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Conditional math
  3. How to Sum by Month in Excel With SUMIFS

How to Sum by Month in Excel With SUMIFS

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

To sum by month in Excel, put the first day of the month in a cell, such as D2, and use SUMIFS with two date conditions: =SUMIFS(B2:B8,A2:A8,">="&D2,A2:A8,"<="&EOMONTH(D2,0)). EOMONTH returns the last day of that month, so the formula adds every amount dated from the 1st to the month end. Fill it down for a monthly summary.

Key takeaways

  • List months as real dates (the 1st of each month), not as text like "Jan".
  • SUMIFS adds the amounts dated on or after the 1st and on or before EOMONTH(D2,0).
  • If your dates include times, use "<"&EOMONTH(D2,0)+1 as the end condition.
  • SUMPRODUCT with MONTH and YEAR works without a month list, but must check the year too.
  • A PivotTable grouped by month gives the same totals without formulas.
On this page+
  1. The sample data
  2. Step 1: List the months as dates
  3. Step 2: Write the SUMIFS formula
  4. Step 3: Fill down for every month
  5. When dates include times
  6. Other ways to sum by month
  7. Why a sum by month formula returns 0
  8. Practise it

To sum by month in Excel, list the first day of each month and use SUMIFS to add every amount dated from that day to the end of the month. EOMONTH finds the month end for you, so one formula works for 28, 30 and 31-day months alike. This guide builds a monthly summary step by step, then shows two other methods: a helper column and a PivotTable.

The sample data#

Every example uses this list of sales by date in A1:B8. The dates are real Excel dates, not text:

AB
1DateAmount
25 Jan 2024400
319 Jan 2024250
431 Jan 2024300
53 Feb 2024150
620 Feb 2024500
72 Mar 2024350
828 Mar 2024200

The monthly totals you should get are: January 950, February 650 and March 550. Together they make 2150, the total of the Amount column. That is a handy check once the summary is built.

Step 1: List the months as dates#

Type the first day of each month in a column, as a real date. The safest way is a formula, because typed dates depend on your regional date order. In D2, type =DATE(2024,1,1). In D3, type =EDATE(D2,1) and fill it down: EDATE adds one month on each row, giving 1 Feb 2024, 1 Mar 2024 and so on.

To make the cells show "Jan 2024" instead of a full date, select them and press Ctrl+1 (Mac: ⌘1), choose Custom, and type mmm yyyy. The cell still holds a date, which is what the formula needs.

Don't type the month as text, like "Jan". SUMIFS can't compare the text "Jan" with a date, so you'd get 0.

Step 2: Write the SUMIFS formula#

SUMIFS adds the numbers that meet every condition you give it. For one month, you need two conditions on the date column: on or after the 1st, and on or before the last day. In E2, type:

Excel formula
=SUMIFS($B$2:$B$8,$A$2:$A$8,">="&D2,$A$2:$A$8,"<="&EOMONTH(D2,0))

Here is what each part does:

PartMeaning
$B$2:$B$8The amounts to add (SUMIFS puts this first)
$A$2:$A$8,">="&D2Dates on or after 1 Jan 2024
$A$2:$A$8,"<="&EOMONTH(D2,0)Dates on or before 31 Jan 2024

EOMONTH(D2,0) returns the last day of the month that D2 is in. The 0 means "this month"; 1 would mean next month. The & joins each operator to a date, so Excel builds criteria like ">=45292" behind the scenes.

The result in E2 is 950 (400 + 250 + 300). The 31 January sale is included because of the <=. See the SUMIFS function guide and the EOMONTH function guide for every argument.

Step 3: Fill down for every month#

Select E2:E4 and fill down (Windows: Ctrl+D; Mac: ⌘D). Because the ranges are locked with $ and D2 is not, each row reads its own month:

DE
1MonthTotal
2Jan 2024950
3Feb 2024650
4Mar 2024550

The totals add up to 2150, matching the Amount column. If they don't, some dates fall outside your month list, or some are stored as text. The same pattern with COUNTIFS counts rows per month instead; see how to count by month.

When dates include times#

If your dates come from a system that adds a time, such as 31 Jan 2024 15:20, the formula above misses those last-day rows. 31 January at 15:20 is later than 31 January at midnight, which is what EOMONTH(D2,0) returns. Use "less than the first day of next month" instead:

Excel formula
=SUMIFS($B$2:$B$8,$A$2:$A$8,">="&D2,$A$2:$A$8,"<"&EOMONTH(D2,0)+1)

EOMONTH(D2,0)+1 is 1 February, and < keeps everything before it, whatever the time. This version works for dates with or without times, so it is a safe habit.

Other ways to sum by month#

SUMIFS with a month list is the most flexible method, but there are two other common approaches.

A helper column. Add a column that turns each date into a month label, such as =TEXT(A2,"yyyy-mm"), which gives "2024-01". Then sum by that label with =SUMIF(C2:C8,"2024-01",B2:B8). This is easy to read, and it is the same as summing by any category; see how to sum by category. The downside is the extra column.

SUMPRODUCT with MONTH and YEAR. This works without a month list:

Excel formula
=SUMPRODUCT((MONTH(A2:A8)=1)*(YEAR(A2:A8)=2024)*B2:B8)

It returns 950. Always include the YEAR test. With MONTH alone, January 2023 and January 2024 would be added together. Note that =SUMIF(MONTH(A2:A8),1,B2:B8) doesn't work, because SUMIF needs a range of cells, not a calculated list.

A PivotTable. Select the data, go to Insert > PivotTable, put Date in Rows and Amount in Values. Recent versions of Excel group the dates by month automatically; if not, right-click a date and choose Group, then Months and Years. This needs no formulas, but it doesn't update until you refresh it.

Why a sum by month formula returns 0#

If a month shows 0 or too little, check these:

  1. Months typed as text. "Jan" is not a date. Use the 1st of the month as a real date.
  2. Dates stored as text. Imported dates often sit on the left of the cell, which shows they are text. Convert them with DATEVALUE or Data > Text to Columns.
  3. A cell reference inside the quotes. Write ">="&D2, not ">=D2".
  4. Dates with times. Use the "<"&EOMONTH(D2,0)+1 version.
  5. Ranges not locked. Without $, the ranges slide down as you fill and skip rows.

For any date range, not just whole months, read how to sum by date range. To add more conditions, such as one region per month, add another pair to SUMIFS; the guide to COUNTIFS and SUMIFS with multiple conditions shows how, and SUMIFS with OR logic covers either-or conditions.

Practise it#

Monthly totals are one of the most common tasks in finance and operations tests. Practise dates in criteria in a live spreadsheet, then build multi-condition totals in the COUNTIFS and SUMIFS lesson. Each lesson checks your formula instantly. To test yourself under time pressure, try the finance Excel test.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

D2 holds 1 January 2024. In E2, use SUMIFS to total the Amount (B2:B8) for dates in A2:A8 from D2 up to the end of that month. Use EOMONTH(D2,0) for the last day.

fx
ABCDEF
1
Date
Amount
Month
Total
2
45296
400
45292
3
45310
250
4
45322
300
5
45325
150
6
45342
500
7
45353
350
8
45379
200
9
10
11

Tip: Sum range first, then A2:A8 with ">="&D2, then A2:A8 again with "<="&EOMONTH(D2,0).

Practise this in a lesson

LessonDates in criteria: totals by date range and monthCount and total rows between two dates with COUNTIFS and SUMIFS, build a monthly summary, and drive the date range from input cells.LessonCOUNTIFS and SUMIFSCount and sum with several conditions at once, and learn why SUMIFS puts the sum range first.Function guideSUMIFSTotal values that meet several conditions with SUMIFS. Examples by region, month and number range, common errors, and live practice.Function guideEOMONTHFind the last day of any month with Excel's EOMONTH for due dates, month totals and days in a month. Examples, pitfalls and a live exercise.

Frequently asked questions

How do I sum values by month in Excel?

+

Put the first day of the month in a cell and use =SUMIFS(B2:B8,A2:A8,">="&D2,A2:A8,"<="&EOMONTH(D2,0)). It adds the amounts in B2:B8 whose dates in A2:A8 fall in that month.

How do I sum by month and year in Excel?

+

The SUMIFS method already includes the year, because D2 holds a full date such as 1 Jan 2024. If you use SUMPRODUCT with MONTH, add a YEAR test as well, or January 2023 and January 2024 are added together.

Can I use SUMIF with the MONTH function?

+

Not directly. SUMIF needs a range, not a calculated array, so =SUMIF(MONTH(A2:A8),1,B2:B8) is rejected. Use SUMIFS with a date range, SUMPRODUCT, or a helper column with the month in it.

Why does my sum by month formula miss the last day?

+

The dates probably include a time. A value like 31 Jan 2024 15:00 is later than 31 Jan at midnight, so "<="&EOMONTH(D2,0) leaves it out. Use "<"&EOMONTH(D2,0)+1 instead.

How do I show the month name next to the total?

+

Keep the real date in the cell and change its number format to mmm yyyy. The cell shows Jan 2024 but still holds a date the formula can use.

Sources

  • SUMIFS function - Microsoft Support
  • EOMONTH function - Microsoft Support
  • Create a PivotTable to analyze worksheet data - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. The sample data
  2. Step 1: List the months as dates
  3. Step 2: Write the SUMIFS formula
  4. Step 3: Fill down for every month
  5. When dates include times
  6. Other ways to sum by month
  7. Why a sum by month formula returns 0
  8. Practise it

Keep reading

Dates· 6 min read

How to Count Dates by Month in Excel

To count dates by month in Excel, use COUNTIFS with a date range: put the first day of the month in E2 and use =COUNTIFS(B2:B100,">="&E2,B2:B100,"<="&EOMONTH(E2,0)). EOMONTH(E2,0) returns the last day of that month. Fill the formula down next to a list of month start dates to build a monthly summary. Add more pairs for extra conditions.

Conditional math· 7 min read

Sum by Date Range or Month in Excel With SUMIFS

To sum between two dates, give SUMIFS the same date column twice: once with ">="&start and once with "<"&end. For January 2025, write =SUMIFS(D2:D9,A2:A9,">="&DATE(2025,1,1),A2:A9,"<"&DATE(2025,2,1)). Keep the operator in quotes and join the date with &. Using "before the 1st of next month" works for every month.

Conditional math· 6 min read

How to Sum by Category in Excel

To sum by category in Excel, list each category once, then use SUMIF next to it: =SUMIF($A$2:$A$8,D2,$B$2:$B$8) adds the amounts in column B for the category named in D2. Fill it down for a full summary. In Excel 2021 or Microsoft 365, =UNIQUE(A2:A8) builds the category list for you, and a PivotTable does the same job without formulas.

More on conditional math

  • How to Use SUMIF in Excel
  • SUMIF Contains Text: Sum by Partial Match
  • SUMIF Greater Than or Less Than a Number
  • SUMIF Not Equal To: Exclude a Value From a Total
  • SUMIFS With OR Logic in Excel
  • Excel Wildcards: *, ? and ~ in COUNTIF and SUMIF
All conditional math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free