Google Sheets SUMIF Between Two Dates (Formula & Examples)

How-to basics · Updated November 23, 2026

The simplest formula to sum values between two dates in Google Sheets is =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(2025,1,1), A2:A100, "<="&DATE(2025,1,31)) sums all January 2025 amounts.

Why SUMIFS Instead of SUMIF

SUMIF only accepts a single condition, so it cannot check both a start and end date at once. SUMIFS was designed for multiple criteria and is the standard way to sum between two dates in Google Sheets. The syntax is =SUMIFS(sum_range, criteria_range1, criterion1, [criteria_range2, criterion2, ...]). The sum range comes first, which is the opposite order from SUMIF—a common source of errors when switching between the two.

How to Write the Date Criteria Correctly

Dates must be entered as text strings combined with comparison operators, or as actual date values using the DATE function. The formula =SUMIFS(B2:B100, A2:A100, ">=1/1/2025", A2:A100, "<=1/31/2025") works because Google Sheets interprets the date strings, but it relies on your spreadsheet's locale (US vs. UK date format). To avoid ambiguity, use DATE(2025,1,1) which always means January 1, 2025 regardless of locale. You can also reference a cell containing a date: =SUMIFS(B2:B100, A2:A100, ">="&D1, A2:A100, "<="&E1) where D1 and E1 hold the start and end dates.

Practical Example with a Sales Log

Assume column A has transaction dates, column B has amounts, and rows 2 to 100 contain data. To sum sales between March 1 and March 15, 2025, use:

  • Start date in D1: 3/1/2025
  • End date in E1: 3/15/2025
  • Formula in F1: =SUMIFS(B2:B100, A2:A100, ">="&D1, A2:A100, "<="&E1)

If the data includes dates as text (not true date values), SUMIFS may fail. Ensure column A contains real dates by selecting the column and using Data > Split text to columns or reformatting with Format > Number > Date.

Handling Blank Cells and Errors

If your date range includes blank cells, SUMIFS ignores them automatically. However, if a cell contains text like "N/A", it will not match the criteria, so it is also ignored. If you get a #VALUE! error, check that the criteria are not malformed—for instance, ">="&D1 is correct, but ">= D1" (with a space) is not. Also, ensure the sum range and criteria ranges are the same size; mismatched ranges cause #VALUE! errors.

Using Cell References for Flexible Dates

Rather than hardcoding dates, reference cells so you can change the period without editing the formula. For example, put start date in D1 and end date in E1, then use =SUMIFS(B2:B100, A2:A100, ">="&D1, A2:A100, "<="&E1). This is especially useful in dashboards where you want to update a reporting period quickly. You can also use TODAY() for dynamic ranges, like summing the last 30 days: =SUMIFS(B2:B100, A2:A100, ">="&TODAY()-30, A2:A100, "<="&TODAY()).

Common Problems and Fixes

  • Dates are not recognized: If your dates are left-aligned, they are text. Select the column, go to Data > Split text to columns, then Format > Number > Date.
  • Wrong results with inclusive/exclusive: Using ">" and "<" excludes the boundary dates. Use ">=" and "<=" to include them.
  • Locale issues: If you type ">=1/1/2025", Google Sheets may interpret it as January 1 or January 12 depending on your locale. Always use DATE(2025,1,1).
  • SUMIFS vs. QUERY: For complex conditions, QUERY can be more flexible, but SUMIFS is simpler for a single date range.

Alternatives: SUMPRODUCT and QUERY

SUMPRODUCT can sum between dates without text criteria: =SUMPRODUCT((A2:A100>=D1)*(A2:A100<=E1)*B2:B100). This works because the boolean comparisons return TRUE/FALSE, which multiply to 1/0. QUERY is another option: =QUERY(A1:B100, "select sum(B) where A >= date '"&TEXT(D1,"yyyy-mm-dd")&"' and A <= date '"&TEXT(E1,"yyyy-mm-dd")&"' label sum(B) ''", 1). QUERY requires date formatting as YYYY-MM-DD, which TEXT handles. For most users, SUMIFS is the clearest and fastest.

Frequently Asked Questions

Can I use SUMIF with two dates?

No, SUMIF only supports one condition. You must use SUMIFS, SUMPRODUCT, or QUERY to handle a date range.

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

Check that the dates in your column are actual date values, not text. Also verify that the criteria references are correct—for example, if D1 is empty, the formula will compare against 0. Use Format > Number > Date to confirm.

Does SUMIFS work with dates in different columns?

Yes, you can use multiple criteria ranges. For instance, if you have start dates in column A and end dates in column B, and amounts in column C, you can sum where A>=D1 and B<=E1: =SUMIFS(C2:C100, A2:A100, ">="&D1, B2:B100, "<="&E1).

How do I sum by month between two dates?

Add a helper column with the month using =EOMONTH(A2,0) or =TEXT(A2,"MM/YYYY"), then use SUMIFS with that column as the criteria range. For example, sum all amounts where month equals "01/2025".

What if my dates include times?

If your date cells include time (e.g., 1/1/2025 14:30), the date is stored as a decimal. Using ">=1/1/2025" will include all times on that date, but ">=1/1/2025 00:00" is the same. To exclude times after a certain point, use ">=1/1/2025" and "<2/1/2025" to capture the whole month.

Excel Differences

In Excel, the same SUMIFS syntax works, but dates are handled slightly differently. Excel does not automatically convert text dates in criteria, so you must use DATE(2025,1,1) or cell references. Also, Excel's SUMIFS uses comma separators, same as Google Sheets. The main difference is that Google Sheets may interpret ">=1/1/2025" as text, while Excel requires the DATE function or a cell reference to avoid errors.

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.