Sum by Date Range or Month in Excel With SUMIFS
By ExcelReady TeamUpdated 7 min read
The short answer
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.
Key takeaways
- A date range is two conditions on the same date column: on or after the start, and before the end.
- Write the operator in quotes and join the date with &: ">="&DATE(2025,1,1).
- DATE(year, month, day) is safer than typing a date, which other countries may read differently.
- "<"&DATE(2025,2,1) catches all of January 31, including times later that day.
- Point the criteria at cells, like ">="&J2, so the range changes without editing the formula.
On this page+
A SUMIFS date range is two conditions on the same date column: on or after the start date, and before (or on) the end date. With it you can total sales for a month, a quarter, or any two dates a manager types in. This guide is for anyone building monthly reports or facing a date question in an Excel test, and it shows the exact criteria syntax that trips most people up.
How do dates work in SUMIFS criteria?#
Excel stores every date as a number, so you compare dates with the same operators as numbers: >=, <=, < and >. The rule for writing them:
- Put the operator in quotes:
">=". - Join the date outside the quotes with
&:">="&DATE(2025,1,1).
DATE(year, month, day) builds a real date. It's safer than typing ">=1/2/2025", because 1/2/2025 means January 2 in the US but February 1 in the UK and many other countries.
Don't write ">=DATE(2025,1,1)". Inside quotes, DATE is just letters, so nothing matches and the result is 0.
The examples use this order table in A1:D9:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Region | Rep | Amount |
| 2 | 2025-01-02 | West | Marco | 2700 |
| 3 | 2025-01-14 | East | Priya | 950 |
| 4 | 2025-01-31 | East | Sam | 1320 |
| 5 | 2025-02-01 | East | Priya | 1800 |
| 6 | 2025-02-18 | North | Jade | 760 |
| 7 | 2025-02-25 | South | Owen | 3050 |
| 8 | 2025-03-03 | North | Owen | 1480 |
| 9 | 2025-03-22 | East | Sam | 2400 |
The dates are shown as year-month-day here. Your sheet may display them differently, depending on your regional settings.
How to count or sum from a date onwards#
For a one-sided range, such as "on or after Feb 1", use a single condition. To count those orders:
=COUNTIFS(A2:A9,">="&DATE(2025,2,1))The result is 5 (rows 5 to 9). Use ">" instead and the Feb 1 order drops out, giving 4. The same criteria work in SUMIFS, COUNTIF and SUMIF.
How to sum between two dates with SUMIFS#
To total a date range, list the date column twice: once with the start condition and once with the end condition. For January 2025:
=SUMIFS(D2:D9,A2:A9,">="&DATE(2025,1,1),A2:A9,"<"&DATE(2025,2,1))The result is 4,970 (2,700 + 950 + 1,320). Here is what each part does:
| Part | Meaning |
|---|---|
D2:D9 | Add the Amount column |
A2:A9,">="&DATE(2025,1,1) | where the date is Jan 1, 2025 or later |
A2:A9,"<"&DATE(2025,2,1) | and before Feb 1, 2025 |
Why use "<" the 1st of next month?#
"<="&DATE(2025,1,31) gives the same total here, but "<"&DATE(2025,2,1) is the safer habit for two reasons. You never need to know whether a month has 28, 30 or 31 days. And if a date includes a time, such as Jan 31 at 3 PM, Excel stores it as slightly more than Jan 31, so <= would miss it.
How to sum by month with EOMONTH#
To build a monthly summary, put the first day of each month in a column and let EOMONTH find the last day. With Jan 1, Feb 1 and Mar 1, 2025 in F5:F7, type this in G5:
=SUMIFS($D$2:$D$9,$A$2:$A$9,">="&F5,$A$2:$A$9,"<="&EOMONTH(F5,0))Fill down to G7 (Windows: Ctrl+D; Mac: ⌘D). EOMONTH(F5,0) returns the last day of F5's month, so you get:
| Month | Sales |
|---|---|
| Jan 2025 | 4,970 |
| Feb 2025 | 5,610 |
| Mar 2025 | 3,880 |
The three months add up to 14,460, the same as =SUM(D2:D9). To show the month name instead of a full date in F5:F7, give those cells a custom number format of mmm yyyy; the value stays a real date, so SUMIFS still works.
For a quarter, keep the same pattern and move the end three months on. The first quarter of 2025 runs from Jan 1 up to, but not including, Apr 1:
=SUMIFS(D2:D9,A2:A9,">="&DATE(2025,1,1),A2:A9,"<"&DATE(2025,4,1))All eight orders fall in Q1, so this also gives 14,460. The data ranges have $ signs so they stay fixed, while F5 moves down to F6 and F7. For a whole year, use ">="&DATE(2025,1,1) and "<"&DATE(2026,1,1).
How to use start and end dates from cells#
Point the criteria at cells so anyone can change the range without touching the formula. Put a region in J1, a start date in J2 and an end date in J3. To count that region's orders with both days included:
=COUNTIFS(B2:B9,J1,A2:A9,">="&J2,A2:A9,"<="&J3)Swap COUNTIFS for SUMIFS and add the amounts first to get the total. With East, Jan 14 and Feb 18, 2025, =SUMIFS(D2:D9,B2:B9,J1,A2:A9,">="&J2,A2:A9,"<="&J3) gives 950 + 1,320 + 1,800 = 4,070.
You can mix date pairs with any other condition. East sales in February 2025:
=SUMIFS(D2:D9,B2:B9,"East",A2:A9,">="&DATE(2025,2,1),A2:A9,"<"&DATE(2025,3,1))Only the Feb 1 order matches, so the result is 1,800. For many regions and months at once, a PivotTable grouped by month can be quicker; PivotTable vs SUMIFS compares the two.
For a rolling period, use TODAY. The last 30 days, including today:
=SUMIFS(D2:D9,A2:A9,">="&TODAY()-30,A2:A9,"<="&TODAY())Why is SUMIFS with dates returning 0?#
A date SUMIFS that returns 0 usually has the date inside the quotes or dates stored as text. Check these:
- Date or cell inside quotes.
">=J2"and">=DATE(2025,1,1)"are plain text. Write">="&J2. - Dates stored as text. Imported dates often look right but sit on the left of the cell. Test one with
=ISNUMBER(A2): FALSE means text. Convert them with Data > Text to Columns, or=VALUE(A2)in a helper column. - Start and end swapped.
">="&endwith"<="&startmatches nothing. - Typed dates read the wrong way. Use DATE instead of
"1/2/2025". - Ranges of different sizes. Every range must cover the same rows, or you get #VALUE!.
Related guides#
If SUMIFS is new to you, start with how to use SUMIF and COUNTIFS and SUMIFS with multiple conditions. For a quick count of rows that pass one test, COUNTIF criteria examples cover every operator. The SUMIFS function guide has the full syntax. To learn why dates behave like numbers, read why Excel dates are numbers.
Practise it#
Practise dates in criteria in a live spreadsheet: count orders from a date, total January with two conditions, build a monthly summary with EOMONTH, and drive a date range from input cells.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Total the February 2025 sales. Click G2 and use SUMIFS: add D2:D9 where the date in A2:A9 is on or after Feb 1, 2025 and before Mar 1, 2025. Build both dates with DATE.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Amount | |||||||
| 2 | February sales | |||||||
| 3 | ||||||||
| 4 | ||||||||
| 5 | ||||||||
| 6 | ||||||||
| 7 | ||||||||
| 8 | ||||||||
| 9 | ||||||||
| 10 | ||||||||
| 11 | ||||||||
| 12 |
Tip: Two pairs on A2:A9. Each criteria is an operator in quotes, then & and a DATE.
Practise this in a lesson
Frequently asked questions
How do I sum values between two dates in Excel?
Use SUMIFS with two conditions on the date column: =SUMIFS(D2:D9,A2:A9,">="&J2,A2:A9,"<="&J3), where J2 is the start date and J3 the end date. Both days are included.
How do I sum by month in Excel?
Put the first day of the month in a cell, such as F5, and use =SUMIFS(D2:D9,A2:A9,">="&F5,A2:A9,"<="&EOMONTH(F5,0)). EOMONTH(F5,0) is the last day of that month.
Why does my SUMIFS with dates return 0?
The usual causes are a date inside the quotes, like ">=DATE(2025,1,1)", or dates stored as text. Keep only the operator in quotes, and check the dates with ISNUMBER.
How do I sum the last 30 days?
Use TODAY: =SUMIFS(D2:D9,A2:A9,">="&TODAY()-30,A2:A9,"<="&TODAY()). The result updates every day.
Do the dates need to be sorted?
No. SUMIFS checks every row, so the dates can be in any order.