ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Conditional math
  3. How to Sum by Year in Excel

How to Sum by Year in Excel

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

To sum by year in Excel, use SUMIFS with two date conditions: on or after 1 January and before 1 January of the next year. With the year in E2, write =SUMIFS(C2:C8,A2:A8,">="&DATE(E2,1,1),A2:A8,"<"&DATE(E2+1,1,1)). A shorter option is =SUMPRODUCT((YEAR(A2:A8)=E2)*C2:C8), and a PivotTable can group dates by year.

Key takeaways

  • SUMIFS by year needs two conditions on the date column: >= 1 January and < 1 January of the next year.
  • Build the dates with DATE(year,1,1) and join them to the operator with &.
  • SUMPRODUCT((YEAR(dates)=2025)*amounts) is shorter but slower on very large lists.
  • Using < next 1 January, not <= 31 December, keeps dates that include a time.
  • A total of 0 usually means the dates are stored as text.
On this page+
  1. The sample data
  2. How to sum by year with SUMIFS
  3. How to fill the formula down for every year
  4. How to sum by year with SUMPRODUCT and YEAR
  5. How to sum by year with a helper column
  6. How to sum by year with a second condition
  7. How to sum by year with a PivotTable
  8. Why your sum by year returns 0 or an error
  9. Practise it

To sum by year in Excel, add up the amounts whose dates fall between 1 January of that year and 1 January of the next. SUMIFS does this with two date conditions, and it works in every current version of Excel. This guide shows that formula step by step, two shorter alternatives, and how to fix a total that comes back as 0. It is for anyone building yearly reports, budgets or a summary in a job test.

The sample data#

All the examples use this sales list in A1:C8. The dates are real Excel dates, not text.

ABC
1DateRegionAmount
218/11/2024North1,200
307/01/2025South850
422/03/2025North1,430
514/08/2025South990
631/12/2025North610
702/01/2026South1,120
819/02/2026North780

The goal is a small summary: one total per year.

How to sum by year with SUMIFS#

SUMIFS adds the numbers in one range when other ranges meet all your conditions. To sum one year, check the date column twice. Type the year as a plain number, 2025, in E2, then in F2:

Excel formula
=SUMIFS(C2:C8,A2:A8,">="&DATE(E2,1,1),A2:A8,"<"&DATE(E2+1,1,1))

The result is 3,880 (850 + 1,430 + 990 + 610). Here is what each part does:

  • C2:C8 is the range to add, the amounts.
  • A2:A8, ">="&DATE(E2,1,1) keeps dates on or after 1 January 2025.
  • A2:A8, "<"&DATE(E2+1,1,1) keeps dates before 1 January 2026.

DATE(year, month, day) builds a real date from three numbers, so DATE(2025,1,1) is 1 January 2025. The & joins the operator in quotes to that date. Writing ">=DATE(E2,1,1)" all inside the quotes would not work, because Excel would treat it as text. The dates in criteria lesson practises exactly this, and the SUMIFS function guide covers every argument.

Why "before next 1 January" and not "on or before 31 December"#

Dates can carry a time. A sale at 3 pm on 31 December 2025 is stored as 31 December plus a fraction of a day, which is greater than DATE(2025,12,31). A condition of "<="&DATE(E2,12,31) would miss it. "<"&DATE(E2+1,1,1) catches every moment of the last day.

How to fill the formula down for every year#

Put the years in a column, lock the data ranges, and fill down. Type 2024, 2025 and 2026 in E2:E4, then in F2:

Excel formula
=SUMIFS($C$2:$C$8,$A$2:$A$8,">="&DATE(E2,1,1),$A$2:$A$8,"<"&DATE(E2+1,1,1))

Select F2:F4 and press Ctrl+D (⌘D on a Mac):

YearTotal
20241,200
20253,880
20261,900

The $ signs keep the data ranges fixed, while E2 changes to E3 and E4. The three totals add up to 6,980, the sum of the whole list, which is a quick check that no row was missed or counted twice.

How to sum by year with SUMPRODUCT and YEAR#

SUMPRODUCT can test the year directly, which gives a shorter formula:

Excel formula
=SUMPRODUCT((YEAR(A2:A8)=E2)*C2:C8)

YEAR returns the year of each date. (YEAR(A2:A8)=E2) gives TRUE or FALSE for each row, and multiplying by the amounts keeps only the 2025 rows. The result is again 3,880.

SUMPRODUCT works in every version and needs no special keys. On very large lists it can be slower than SUMIFS, and it returns #VALUE! if any cell in the date range holds text. You can't use YEAR inside SUMIFS's criteria range: =SUMIFS(C2:C8,YEAR(A2:A8),2025) is not allowed, because SUMIFS needs a real range.

How to sum by year with a helper column#

A helper column makes the formula simple and the year visible. In D2, type =YEAR(A2) and fill down. Then:

Excel formula
=SUMIF(D2:D8,2025,C2:C8)

The result is 3,880. This is a good choice when other people will read the sheet, or when you also want to filter or sort by year.

How to sum by year with a second condition#

SUMIFS takes more pairs, so add the region after the dates. North sales in 2025:

Excel formula
=SUMIFS(C2:C8,A2:A8,">="&DATE(2025,1,1),A2:A8,"<"&DATE(2026,1,1),B2:B8,"North")

The result is 2,040 (1,430 + 610). The COUNTIFS and SUMIFS lesson builds multi-condition totals like this one step at a time.

The same date pattern works for any period. Change the boundaries to get a sum by month, a sum by week or a sum between any two dates. For a running total from 1 January to today, see the year-to-date total. If your year starts in April or July, work out the fiscal year from a date in a helper column first.

How to sum by year with a PivotTable#

A PivotTable needs no formulas at all:

  1. Click anywhere in the data and choose Insert > PivotTable, then OK.
  2. Drag Date to Rows and Amount to Values.
  3. If Excel doesn't group the dates by itself, right-click any date in the pivot, choose Group, select Years and click OK.

The pivot shows 1,200 for 2024, 3,880 for 2025 and 1,900 for 2026. Click Refresh after the data changes.

Why your sum by year returns 0 or an error#

A total of 0 means no row passed the conditions, and an error means one part of the formula failed. Check these in order:

  1. Dates stored as text. Real dates align right by default. Text dates align left and never match. Convert them with DATEVALUE or Data > Text to Columns.
  2. The year cell holds a date. If E2 contains 1 January 2025 instead of the number 2025, DATE(E2,1,1) gets a year above 9999 and the formula returns #NUM!. Set E2 to General and type 2025.
  3. Operators inside the date. Write ">="&DATE(E2,1,1), not ">=DATE(E2,1,1)".
  4. Ranges of different sizes. SUMIFS returns #VALUE! if C2:C8 and A2:A9 don't match. Make every range cover the same rows.

Practise it#

Practise dates in criteria in a live spreadsheet: you type the formula and it checks it instantly. Then try the exercise on this page, which totals the 2025 sales with SUMIFS and DATE.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Total the 2025 sales. In F2, use SUMIFS on C2:C8 with two conditions on the dates in A2:A8: on or after DATE(E2,1,1) and before DATE(E2+1,1,1).

fx
ABCDEFG
1
Date
Region
Amount
Year
Total
2
45614
North
1200
2025
3
45664
South
850
4
45738
North
1430
5
45883
South
990
6
46022
North
610
7
46024
South
1120
8
46072
North
780
9
10
11

Tip: Start with the amounts, C2:C8. Then add the date column twice: once with ">="&DATE(E2,1,1) and once with "<"&DATE(E2+1,1,1).

Practise this in a lesson

LessonDates in criteria: totals by date range and monthCount and total rows between two dates with COUNTIFS and SUMIFS, build a monthly summary, and drive the date range from input cells.LessonCOUNTIFS and SUMIFSCount and sum with several conditions at once, and learn why SUMIFS puts the sum range first.Function guideSUMIFSTotal values that meet several conditions with SUMIFS. Examples by region, month and number range, common errors, and live practice.

Frequently asked questions

How do I sum values by year in Excel?

+

Use SUMIFS with a start and end date: =SUMIFS(C2:C8,A2:A8,">="&DATE(2025,1,1),A2:A8,"<"&DATE(2026,1,1)). It adds every amount dated in 2025.

Can I use YEAR inside SUMIF?

+

Not on the criteria range. SUMIF and SUMIFS need a real range, not YEAR(A2:A8). Use date boundaries with DATE, SUMPRODUCT with YEAR, or a helper column that holds =YEAR(A2).

How do I sum by year and month in Excel?

+

Use the same SUMIFS pattern with tighter dates: >=DATE(2025,3,1) and <DATE(2025,4,1) gives March 2025. A list of month start dates and EOMONTH makes this easy to fill down.

Why does my sum by year formula return 0?

+

Usually the dates are text, not real dates, or the year cell holds a full date instead of a number like 2025. Check that the dates align right and that the year cell shows 2025 in General format.

How do I sum by year in a PivotTable?

+

Put the date field in Rows and the amount in Values. Right-click a date, choose Group, select Years and click OK.

Sources

  • SUMIFS function - Microsoft Support
  • DATE function - Microsoft Support
  • YEAR function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. The sample data
  2. How to sum by year with SUMIFS
  3. How to fill the formula down for every year
  4. How to sum by year with SUMPRODUCT and YEAR
  5. How to sum by year with a helper column
  6. How to sum by year with a second condition
  7. How to sum by year with a PivotTable
  8. Why your sum by year returns 0 or an error
  9. Practise it

Keep reading

Conditional math· 6 min read

How to Sum by Month in Excel With SUMIFS

To sum by month in Excel, put the first day of the month in a cell, such as D2, and use SUMIFS with two date conditions: =SUMIFS(B2:B8,A2:A8,">="&D2,A2:A8,"<="&EOMONTH(D2,0)). EOMONTH returns the last day of that month, so the formula adds every amount dated from the 1st to the month end. Fill it down for a monthly summary.

Conditional math· 6 min read

How to Sum by Week in Excel

List the first day of each week, then use SUMIFS with two date conditions: =SUMIFS(B:B,A:A,">="&D2,A:A,"<"&D2+7). It adds every amount dated on or after the week start in D2 and before the next week starts. To find the Monday of any date, use =A2-WEEKDAY(A2,2)+1. A pivot table grouped by 7 days also works.

Dates· 6 min read

Year-to-Date Totals in Excel

For a year-to-date sum in Excel, use SUMIFS with two date conditions: on or after 1 January of the current year, and on or before today. The formula is =SUMIFS(C2:C9,A2:A9,">="&DATE(YEAR(F1),1,1),A2:A9,"<="&F1), where A is the date column, C is the amount and F1 holds the as-of date or =TODAY().

More on conditional math

  • Sum the Last 30 Days in Excel With SUMIFS and TODAY
  • How to Use SUMIF in Excel
  • SUMIF Blank and Not Blank Cells in Excel
  • SUMIF Contains Text: Sum by Partial Match
  • SUMIF Greater Than or Less Than a Number
  • SUMIF Not Equal To: Exclude a Value From a Total
All conditional math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free