Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets SUMIF Date Range: Step-by-Step Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To sum values between two dates in Google Sheets, use SUMIFS with a date criterion on each side: =SUMIFS(B2:B100, A2:A100, ">="&DATE(2024,1,1), A2:A100, "<="&DATE(2024,12,31)). That formula adds every number in B where the date in A falls inside the range. SUMIF alone only handles one condition, so for a true date range you need SUMIFS or a SUMIF with a single boundary. The steps below walk through both, plus the date-format traps that cause most wrong answers.

What You'll Need

  • A Google account with access to Google Sheets (desktop browser or the mobile app).
  • A sheet with at least one column of real dates and one column of numbers to add. Real dates, not text that looks like a date.
  • Dates entered in a format Sheets recognises, or built with the DATE function so locale settings cannot misread them.
  • Optional: a helper cell for the start and end date so you can change the range without editing the formula.

Step-by-Step

  1. Check that your dates are real dates. Click a date cell and look at the formula bar. A real date appears as a date (for example 1/15/2024) and aligns right by default. If it aligns left or shows an apostrophe, it is text and will never match a date criterion. Fix it by retyping without the apostrophe, or use DATEVALUE in a helper column.
  2. Set up two boundary cells. In empty cells, say E1 and E2, enter your start and end dates. Type them in the format your sheet expects, or use =DATE(2024,1,1) and =DATE(2024,12,31) to avoid ambiguity between day-first and month-first locales.
  3. Write the SUMIFS formula. Click the cell where the total should appear and enter:
    =SUMIFS(B2:B100, A2:A100, ">="&E1, A2:A100, "<="&E2)
    Here B2:B100 is the sum range, A2:A100 is the date range, and E1/E2 hold the boundaries. The ampersand joins the comparison operator to the cell reference; without it Sheets treats the whole thing as text.
  4. Press Enter and compare the result. Spot-check by filtering the date column to the same range and using the status bar sum at the bottom of the sheet. If the numbers disagree, jump to Troubleshooting.
  5. Decide whether the boundaries are inclusive. The formula above includes both the start and end dates. To exclude the end date, change <= to <. To exclude the start date, change >= to >. Say so in a note next to the formula so future readers know which convention you used.
  6. Use SUMIF for a one-sided range if that is all you need. For everything on or after a date: =SUMIF(A2:A100, ">="&E1, B2:B100). Note the different argument order: SUMIF takes range, criterion, sum range; SUMIFS takes sum range first.
  7. Lock the ranges if you will copy the formula. Change B2:B100 to $B$2:$B$100 and A2:A100 to $A$2:$A$100, or press F4 after selecting each range on desktop. On mobile, type the dollar signs manually.
  8. Test with a deliberately empty range. Set E1 and E2 to dates you know contain no rows. The formula should return 0, not an error. If it errors, the date cells are probably text.
  9. Format the result. If the total shows as a date, the output cell inherited date formatting. Select it and apply Format > Number > Number (labels can differ slightly by version and region).

Common Mistakes

  • Quotes around the cell reference. Writing ">=E1" makes Sheets compare against the literal text E1. You need ">="&E1.
  • Text dates. Imported CSV files and pasted data often arrive as text. SUMIFS silently ignores them, giving a total that is too low rather than an error.
  • Mismatched range sizes. SUMIFS requires the sum range and every criteria range to be the same height. A one-row difference returns #VALUE!.
  • Time stamps. A cell containing 1/15/2024 14:30 is greater than the date 1/15/2024, so an end boundary of 1/15/2024 excludes it. Use < with the next day, or strip times with INT() in a helper column.
  • Confusing SUMIF and SUMIFS argument order. Swapping them returns wrong totals without any error message.
  • Locale mix-ups. 03/04/2024 means different days in different regions. DATE() removes the ambiguity.

Tips

  • Name your boundary cells (Data > Named ranges) so the formula reads SUMIFS(Amounts, Dates, ">="&StartDate, Dates, "<="&EndDate).
  • For month-by-month totals, put the first of each month in a column and use EOMONTH for the end boundary.
  • Use SUMPRODUCT when you need extra conditions that SUMIFS cannot express, such as OR logic across the same column.
  • Keep raw dates in their own column and never overwrite them with formatted text; formatting changes display only, not the underlying value.
  • Add a check cell that counts matching rows with COUNTIFS using the same criteria. If the count is zero, the sum will be zero too and you know the problem is the criteria, not the numbers.

Troubleshooting

The formula returns 0. First confirm the date column is real dates by checking alignment and the formula bar. Then confirm the boundary cells are dates, not text. Finally widen the range to include the whole column temporarily to rule out rows outside B2:B100.

You get #VALUE!. Check that all ranges are the same size and that the sum range contains numbers, not text. Numbers stored as text are ignored by SUMIFS; convert them with Format > Number or VALUE().

The total is close but not exact. Look for time stamps and for rows exactly on the boundary. Adjust <= to < or vice versa and see which total matches your manual filter.

Dates imported from another system will not match. Use a helper column with =DATEVALUE(A2) or =TO_DATE(A2) depending on the source, then point the criteria range at the helper column.

If that did not work, rebuild the formula in a fresh cell using DATE() boundaries typed directly into the formula. If that version works, one of your boundary cells is the problem. If it still fails, the date column itself needs cleaning.

Frequently Asked Questions

Can SUMIF handle a date range on its own?

Only one boundary. SUMIF supports a single criterion, so it can sum everything after a date or everything before one, but not both. Use SUMIFS for a two-sided range.

Does the date range include the start and end dates?

It depends on the operators you write. >= and <= include the boundaries; > and < exclude them.

Why does my SUMIFS ignore some rows?

Almost always because those dates are stored as text, or because they contain a time component that pushes them past the end boundary.

Can I use cell references instead of typing dates in the formula?

Yes, and it is the better approach. Join the operator to the reference with an ampersand: ">="&E1.

Does this work in the Google Sheets mobile app?

Yes. The functions and syntax are the same; you just type the formula manually since the formula helper is more limited on mobile.

How do I sum a whole month?

Set the start boundary to the first of the month and the end boundary to =EOMONTH(start,0), then use <= on the end.