Google Sheets SUMIF Between Dates: Formula & Examples

How-to basics · Updated November 23, 2026

To sum values in Google Sheets where the date in a range falls between two specific dates, use the SUMIFS function (not SUMIF) with two criteria: =SUMIFS(sum_range, date_range, ">="&start_date, date_range, "<="&end_date). For example, with dates in A2:A100 and amounts in B2:B100, =SUMIFS(B2:B100, A2:A100, ">="&DATE(2024,1,1), A2:A100, "<="&DATE(2024,1,31)) sums all January 2024 amounts.

Why SUMIF Won't Work for Date Ranges

The single-criterion SUMIF function can only test one condition, like "sum amounts where the date is after January 1." To sum between two dates, you need two conditions: date is greater than or equal to the start, AND date is less than or equal to the end. Google Sheets offers SUMIFS specifically for multiple criteria. It works in Excel too, but the syntax is identical, so you can use the same formula in both platforms.

The Exact SUMIFS Formula for Date Ranges

Assume your data has dates in column A (A2:A100) and values in column B (B2:B100). To sum values where the date is between January 1, 2024 and January 31, 2024 inclusive, enter:

=SUMIFS(B2:B100, A2:A100, ">="&DATE(2024,1,1), A2:A100, "<="&DATE(2024,1,31))

This returns the sum of all B values where the corresponding A date is within that range. The DATE function creates a real date value, avoiding text/date mismatches. You can also reference cells containing dates, e.g., =SUMIFS(B2:B100, A2:A100, ">="&E1, A2:A100, "<="&F1) where E1 holds the start date and F1 the end date.

Using Cell References for Start and End Dates

Hardcoding dates in formulas is fine for one-off tasks, but for reusable reports, put the start date in a cell (say G1) and the end date in H1. Then the formula becomes:

=SUMIFS(B2:B100, A2:A100, ">="&G1, A2:A100, "<="&H1)

This way you can change the dates without editing the formula. Note that the ampersand (&) concatenates the comparison operator with the date value. If you omit the quotes around the operator, Google Sheets will treat it as text and fail.

Common Mistakes and How to Avoid Them

  • Using SUMIF instead of SUMIFS – SUMIF only handles one criterion; use SUMIFS for two.
  • Date format confusion – Google Sheets stores dates as serial numbers. Always use DATE() or a cell reference, not text like "2024-01-01". Text won't match numeric dates.
  • Wrong comparison operators – Use ">=" for start and "<=" for end to include both boundary dates. If you want to exclude the start date, use ">" instead.
  • Mismatched ranges – All ranges must be the same size. If sum_range is B2:B100, date_range must be A2:A100, not A2:A99.
  • Hidden rows – SUMIFS ignores hidden rows only if you use the SUBTOTAL function with function number 109; SUMIFS always includes hidden rows.

Alternative: Using QUERY for Date Ranges

If you need more flexibility, the QUERY function can also sum between dates. For the same data, use:

=QUERY(A1:B100, "select sum(B) where A >= date '2024-01-01' and A <= date '2024-01-31' label sum(B) ''")

This returns just the sum. The date keyword forces proper date parsing. QUERY is powerful but has a steeper learning curve. For simple sums, SUMIFS is clearer and faster.

Handling Blank or Text Dates

If your date column contains blank cells or text, SUMIFS will ignore them because they don't meet the numeric comparison. However, if you have dates stored as text (e.g., "Jan 1, 2024"), they won't match. To fix, convert text to dates using DATEVALUE in a helper column, or use VALUE to coerce. For example, with text dates in C2:C100, add a helper column D with =DATEVALUE(C2) and drag down, then sum using D as the date range.

Frequently Asked Questions

Can I use SUMIF with a date range if I only have one criterion?

No, because a date range inherently has two boundaries. You could use SUMIF with a single condition like ">=start" but that sums everything after the start, not between. Use SUMIFS for both boundaries.

What if my dates are in a different column than my values?

That's fine. The formula references separate ranges. For example, dates in C2:C100 and values in D2:D100: =SUMIFS(D2:D100, C2:C100, ">="&DATE(2024,1,1), C2:C100, "<="&DATE(2024,1,31)).

How do I sum by month without specifying dates each time?

Use the EOMONTH function to auto-calculate month ends. For a date in E1 (e.g., 1/15/2024), sum that month with: =SUMIFS(B2:B100, A2:A100, ">="&EOMONTH(E1,-1)+1, A2:A100, "<="&EOMONTH(E1,0)). This gets the first and last day of the month.

Why does my formula return 0 even though there are matching dates?

Most likely your dates are text. Check the cell format – if the date is left-aligned, it's text. Use DATEVALUE to convert, or re-enter as actual dates. Also ensure your comparison operators are inside quotes and concatenated with &.

Can I sum between dates and another condition, like a product category?

Yes, SUMIFS supports multiple criteria. For example, with products in C2:C100, dates in A2:A100, values in B2:B100, to sum "Apples" in January: =SUMIFS(B2:B100, A2:A100, ">="&DATE(2024,1,1), A2:A100, "<="&DATE(2024,1,31), C2:C100, "Apples").

Does this work in Excel the same way?

Yes, SUMIFS works identically in Excel for Microsoft 365. The only difference is that Excel also has SUMIFS, but the function name is the same. Array formulas are not needed.

Final Tips for Reliable Date Sums

Always format your date column as Date (Format > Number > Date) to avoid ambiguity. Use the DATE function or cell references for criteria to keep formulas dynamic. Test with a small dataset to confirm the result matches manual counting. If you need to sum across multiple sheets, consider using SUMPRODUCT or QUERY with a union, but for a single sheet, SUMIFS is the cleanest solution.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.