How to sum by year in Excel
Formula (Excel and Google Sheets)
=SUMIFS($C$2:$C$10,$A$2:$A$10,">="&DATE(E2,1,1),$A$2:$A$10,"<="&DATE(E2,12,31))Use SUMIFS with January 1 and December 31 of the year in E2: =SUMIFS($C$2:$C$10,$A$2:$A$10,">="&DATE(E2,1,1),$A$2:$A$10,"<="&DATE(E2,12,31)).
- Result on the example
- one result per row in
F2, filled down toF4 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in F2, filled down to F4. Change any input and the result updates, or edit the formula to experiment.
How it works
DATE turns the year number into its first and last day, and SUMIFS adds the amounts dated between them, both days included. December 31 and January 1 fall in the right years. The locked $ ranges stay put while E2 moves down the list of years.
=SUMIFS($C$2:$C$10,$A$2:$A$10,">="&DATE(E2,1,1),$A$2:$A$10,"<="&DATE(E2,12,31))Result4650
$C$2:$C$109 rows × 1 col: $1,200, $3,450, $1,320, $890, …A range: 9 cells in one column.
$A$2:$A$109 rows × 1 col: 3/14/2024, 11/2/2024, 1/20/2025, 6/8/2025, …A range: 9 cells in one column.
E22024The value in E2.
DATE(E2,1,1)1/1/2024 (45292)DATE: Builds a date from parts.- year
E22024 - month
1 - day
1
- year
">="&DATE(E2,1,1)">=45292"The & operator joins as text.
DATE(E2,12,31)12/31/2024 (45657)DATE: Builds a date from parts.- year
E22024 - month
12 - day
31
- year
"<="&DATE(E2,12,31)"<=45657"The & operator joins as text.
SUMIFS($C$2:$C$10,$A$2:$A$10,">="&DATE(E2,1,1),$A$2:$A$10,"<="&DATE(E2,12,31))4650SUMIFS: Adds values that meet every condition.- sum_range
$C$2:$C$109 rows × 1 col: $1,200, $3,450, $1,320, $890, … - criteria_range1
$A$2:$A$109 rows × 1 col: 3/14/2024, 11/2/2024, 1/20/2025, 6/8/2025, … - criteria1
">="&DATE(E2,1,1)">=45292" - criteria_range2
$A$2:$A$109 rows × 1 col: 3/14/2024, 11/2/2024, 1/20/2025, 6/8/2025, … - criteria2
"<="&DATE(E2,12,31)"<=45657"
- sum_range
In Google Sheets
The same formula works in Google Sheets: =SUMIFS($C$2:$C$10,$A$2:$A$10,">="&DATE(E2,1,1),$A$2:$A$10,"<="&DATE(E2,12,31)). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =SUMPRODUCT((YEAR($A$2:$A$10)=E2)*$C$2:$C$10) | $4,650, $5,760, $5,095 | Shorter: YEAR pulls the year from every date and the test keeps the matching rows. |
Common mistakes
=SUMIF(A2:A10,2025,C2:C10)compares each date with the number 2025, a date in 1905, and returns 0. Build a date range or use YEAR.- The year in E2 must be a number. A year typed as text, or a date formatted to show only the year, gives 0 or the wrong total.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Sum by year
F2, total the amounts dated in the year in E2, then fill down to F4.Questions
How do I sum by fiscal year?
Shift the dates before taking the year. For a year starting July 1: =SUMPRODUCT((YEAR(EDATE($A$2:$A$10,6))=E2)*$C$2:$C$10).
How do I sum by year and category?
Add a pair to SUMIFS: …,$B$2:$B$10,"Software").
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.