# How to sum by month in Excel

List the first day of each month and use SUMIFS from that date to the month end: `=SUMIFS($C$2:$C$11,$A$2:$A$11,">="&E2,$A$2:$A$11,"<="&EOMONTH(E2,0))`.

**Excel:** `=SUMIFS($C$2:$C$11,$A$2:$A$11,">="&E2,$A$2:$A$11,"<="&EOMONTH(E2,0))` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- |
| Date | Customer | Amount |  | Month | Total |
| 2026-01-06 | Northwind | 1250 |  | 2026-01-01 |  |
| 2026-01-19 | Contoso | 840 |  | 2026-02-01 |  |
| 2026-01-31 | Fabrikam | 2310 |  | 2026-03-01 |  |
| 2026-02-03 | Northwind | 675 |  |  |  |
| 2026-02-14 | Litware | 1980 |  |  |  |
| 2026-02-28 | Contoso | 430 |  |  |  |
| 2026-03-01 | Adatum | 1525 |  |  |  |
| 2026-03-12 | Fabrikam | 960 |  |  |  |
| 2026-03-25 | Northwind | 2140 |  |  |  |
| 2026-04-02 | Contoso | 780 |  |  |  |

Formula in F2, filled to F4: `=SUMIFS($C$2:$C$11,$A$2:$A$11,">="&E2,$A$2:$A$11,"<="&EOMONTH(E2,0))`

Result: $4,400; $3,085; $4,625

## How it works

Each month is a date window: on or after the first day in column E, and on or before `EOMONTH(E2,0)`, the last day of the same month. The `$` signs keep the data ranges fixed while `E2` moves to E3 and E4 as you fill down. The rows dated January 31 and March 1 land in the right months.

## Other ways

- `=SUMPRODUCT((MONTH($A$2:$A$11)=MONTH(E2))*(YEAR($A$2:$A$11)=YEAR(E2))*$C$2:$C$11)`: Compares month and year numbers instead of a date window. Slower on large data.

## Common mistakes

- Testing the month alone (`MONTH(A2:A11)=1`) mixes January 2025 with January 2026. Test the year too, or use the date window.
- If the dates include times, `"<="&EOMONTH(E2,0)` stops at midnight at the start of the last day. Use `"<"&EOMONTH(E2,0)+1` to include the whole day.
- Typing "Jan" in column E gives text, not a date. Enter the first of the month and format it to show the month name.

## Questions

**How do I sum the current month?**

Use TODAY for the window: `=SUMIFS(C2:C11,A2:A11,">="&EOMONTH(TODAY(),-1)+1,A2:A11,"<="&EOMONTH(TODAY(),0))`.

**How do I list every month automatically?**

In Excel 365 or Google Sheets, `=EDATE(DATE(2026,1,1),SEQUENCE(12)-1)` returns the first day of each month of 2026. In Google Sheets, wrap it in ARRAYFORMULA.

**Can I use a PivotTable instead?**

Yes. Put the date in Rows, group it by Months and Years, and put the amount in Values.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/sum-by-month
