FormulaCraft

How to sum values between two dates in Excel and Google Sheets

Topic:SUM & aggregation
Excel & Google Sheets
=SUMIFS(B2:B5,A2:A5,">="&DATE(2024,1,1),A2:A5,"<="&DATE(2024,6,30))

Verified example

Computed by a real spreadsheet engine on the sample data below.

DateSales
2024-01-15500
2024-04-20300
2024-08-10700
2025-01-05400

=SUMIFS(B2:B5,A2:A5,">="&DATE(2024,1,1),A2:A5,"<="&DATE(2024,6,30))0

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Put dates in column A and numeric values in column B.
  2. 2Enter =SUMIFS(B2:B5,A2:A5,">="&DATE(2024,1,1),A2:A5,"<="&DATE(2024,6,30)). The & concatenates the operator string with the date serial number returned by DATE().
  3. 3Press Enter. Rows with dates on or after 2024-01-01 AND on or before 2024-06-30 are included in the sum.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Why does the formula return 0 when I know there are matching dates?

The most common cause is dates stored as text strings rather than real date serial numbers. Try =ISNUMBER(A2) — if FALSE, convert with DATEVALUE().

Can I sum between dates that include a specific month only?

Yes: =SUMPRODUCT((MONTH(A2:A5)=3)*B2:B5) sums all March values regardless of year.

More on SUM & aggregation

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: