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

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

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

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

Last reviewed: