To sum values by month in Google Sheets, use SUMIF with a helper column containing month numbers, or use SUMIFS with date range criteria. The simplest formula is =SUMIF(C:C, 1, B:B) where column C has month numbers (1 for January) and column B has the values to sum.
Why SUMIF by Month Is Tricky
Google Sheets’ SUMIF compares text, numbers, or dates directly. If your data has full dates (e.g., 01/15/2025), you cannot just write =SUMIF(A:A, "January", B:B) because the dates are not text strings. The month is hidden inside each date. To sum by month, you need to extract the month from each date, either with a helper column or by using an array formula.
Method 1: Helper Column with MONTH()
This is the clearest and most beginner-friendly approach. Add a new column next to your dates and use the MONTH function to pull out the month number.
- Assume dates are in column A (A2:A100) and amounts in column B (B2:B100).
- In cell C2, enter
=MONTH(A2)and drag down to fill the column. This returns 1 for January, 2 for February, etc. - Now use
SUMIFto sum by that month number. For January, enter=SUMIF(C2:C100, 1, B2:B100). - For February, use
=SUMIF(C2:C100, 2, B2:B100), and so on.
You can also make the criteria dynamic by referencing a cell that contains the month number, e.g., =SUMIF(C2:C100, E1, B2:B100) where E1 has the number 1.
Method 2: SUMIFS with Date Range (No Helper Column)
If you prefer not to add a helper column, use SUMIFS with two criteria: one for the first day of the month and one for the last day. This works because SUMIFS can compare dates directly.
- Assume dates in A2:A100 and amounts in B2:B100.
- In a cell, enter the first day of the month you want, e.g.,
1/1/2025in cell D1. - In cell E1, enter the last day of that month, e.g.,
=EOMONTH(D1,0). - Use the formula:
=SUMIFS(B2:B100, A2:A100, ">="&D1, A2:A100, "<="&E1).
This sums all amounts where the date is on or after the first day and on or before the last day. The EOMONTH function automatically returns the last day of the month, so you never have to count days manually.
Method 3: Using ARRAYFORMULA with SUMIF (Advanced)
You can avoid helper columns entirely with an array formula that creates a virtual month array. This is useful for dashboards where you want a single formula to return sums for all months at once.
- Assume dates in A2:A100 and amounts in B2:B100.
- In cell D1, type the number 1 (for January).
- In cell E1, enter:
=ARRAYFORMULA(SUMIF(MONTH(A2:A100), D1, B2:B100)).
This formula works because MONTH(A2:A100) creates an array of month numbers in memory, and SUMIF can process that array. To get sums for all months, you can drag D1 down or use a single formula like =ARRAYFORMULA(SUMIF(MONTH(A2:A100), ROW(1:12), B2:B100)) which spills results for months 1 through 12.
How to Choose the Right Method
- Helper column – Best for beginners, easy to audit, and works with pivot tables.
- SUMIFS with date range – Best when you already have start and end dates, or when you need to sum by a specific date range (like a quarter).
- ARRAYFORMULA – Best for compact dashboards where you want a single formula and don’t mind a bit of complexity.
Common Problems and Fixes
Problem: The sum is 0. Check that your dates are actually dates, not text. In Google Sheets, a date is a number. Try changing the format of a date cell to Number; if it shows a large number like 45000, it’s a date. If it shows text like “Jan 1”, it’s text and MONTH won’t work. Use =DATEVALUE(A2) to convert text to a date.
Problem: The month number is wrong. MONTH returns 1 for January, 2 for February, etc. If your data uses a fiscal year starting in April, you’ll need to adjust: =MOD(MONTH(A2)-4,12)+1 for an April start.
Problem: The formula returns an error. If you see #VALUE!, your range sizes don’t match. In SUMIF, the sum range must be the same size as the criteria range. Also, avoid using full columns with ARRAYFORMULA because it might slow down the sheet.
Comparing SUMIF, SUMIFS, and QUERY
SUMIF is the simplest but only handles one condition. SUMIFS handles multiple conditions, which is why it’s used for date ranges. For even more flexibility, the QUERY function can group by month directly: =QUERY(A:B, "select month(A), sum(B) where A is not null group by month(A) label month(A) 'Month', sum(B) 'Total'", 1). This returns a table of month numbers and totals. QUERY is powerful but has a steeper learning curve.
Frequently Asked Questions
Can I sum by month name (e.g., “January”) instead of number? Yes. Use a helper column with =TEXT(A2,"MMMM") to get the full month name, then use =SUMIF(C:C, "January", B:B). Be careful with spelling; “January” must match exactly.
How do I sum by month and year together? Use a helper column with =TEXT(A2,"YYYY-MM") to get “2025-01”, then sum by that text. Or use SUMIFS with two date ranges: one for the first day and one for the last day of the specific month/year.
Does SUMIF work with dates in Google Sheets? Yes, but only if you use the correct comparison operators. For example, =SUMIF(A:A, ">="&DATE(2025,1,1), B:B) sums all dates after Jan 1, 2025. To sum a single month, you need a lower and upper bound, which is why SUMIFS is often easier.
My dates include timestamps (e.g., 01/15/2025 14:30:00). Does that matter? No. MONTH extracts the month regardless of time. However, if you use SUMIFS with date ranges, the time part can cause issues if you use = equality. Always use ">=" and "<=" with the end of the month, as shown earlier.
Can I use SUMIF with a drop-down list to choose the month? Yes. Create a data validation drop-down with month numbers (1-12) in a cell, then reference that cell in the criteria: =SUMIF(C:C, D1, B:B) where D1 is the drop-down cell.
Final Tips for Accurate Results
- Always test your formula with a small dataset where you can manually verify the sum.
- Use
EOMONTHto avoid mistakes with months having 30 vs. 31 days. - If your data has blank cells in the date column,
MONTHwill return an error. Wrap it withIFERROR:=IFERROR(MONTH(A2),""). - For large datasets, consider using a pivot table with the date field grouped by month – it’s often faster and requires no formulas.
Related
- Google Sheets SUMIF Blank: How to Sum Empty Cells
- Upwork Data Entry Jobs: Real Pay, Skills, and Pitfalls
- UnitedHealthcare Balance Sheet: Key Figures Explained
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Generate 6 Random Numbers: How It Works & Real UsesTo generate 6 random numbers, use a random number generator (RNG) that produces a sequence with no predictable…
- Excel Add Slicer to Table: Steps, Limits, and TipsTo add a slicer to an Excel table in Microsoft 365 for Windows, select a cell in the…
- Convert k to kg? Quick Answer & Real ExamplesThe quick answer: k is shorthand for kilo, meaning 1,000, so to convert k to kg you simply…
- Excel Data Validation Calendar Drop-Down: What WorksExcel’s Data Validation feature can restrict a cell to valid dates, but in Excel for Microsoft 365 on…
- Multiple Freeze Panes in Excel: What You Can and Can’t DoYou can freeze multiple rows and columns in Excel at the same time, but you cannot create several…
- Excel Data Validation Reference Table Column ExplainedTo use an Excel table column as a data-validation dropdown list, create a defined name that refers to…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.