Available in:All versions (Works in Excel 2007, every later version, Microsoft 365 and Excel for the web)Examples need Excel 2021 or laterCategory:Date & time

YEAR

JAAR in Dutch Excel

Returns the year of a date as a four-digit number, from 1900 to 9999.

Difficulty rating 1 of 5. One argument and one answer; the trap is that it needs a real date, and text that only looks like one fails or is read differently per regional setting.

Last updated: 13 October 2026

See the worked examples

Sheet excerpt: C2 holds the formula
RowABC
1Entry no.Posting dateYear
225-049831 Dec 202520252025=YEAR(B2)=YEAR(B2)
326-00022 Jan 2026
426-001115 Jan 2026
Formula cell (C2)Input

Result: 2025

=YEAR(B2)
=YEAR(B2)

What YEAR does and when to use it

What it does: it returns the year of a date as a plain number, for example 2025 from 14 March 2025.

When to use it: when you need the year as a value to group, filter or compare on, to build year-month period keys with MONTH, or for financial years that do not start in January. To only show the year in a cell, use a number format such as yyyy so the value stays a date. For totals per year in a large table, SUMIFS with date bounds is faster than YEAR on every row.

How Excel evaluates it

Excel reads serial_number:

  • a number is treated as a count of days since 1 January 1900, and Excel works out which calendar year that day falls in; any time fraction is ignored
  • text is first read as a date using the regional setting
  • a number outside Excel's date range returns #NUM!

The result is a whole number between 1900 and 9999.

Watch out: In a Dutch setting the text 31-03-2026 is read as 31 March 2026, but in a US setting the same text fails because there is no month 31, and YEAR returns #VALUE!.

Mental model

A date stamp with three rings: YEAR reads only the outer ring and ignores where the other two are set.

Terms used on this page: range, cell

YEAR(serial_number)
YEAR(serial_number)
Arguments
ArgumentTypeMeaning
serial_numberRequiredThe date whose year you want, as a real date value.

Return value:A number: the year of the date

Formulas use commas (,) between arguments, as in English Excel. Formulas use semicolons (;) between arguments, as in Dutch Excel. Formulas use commas (,) between arguments, as in English Excel; Dutch Excel uses semicolons (;).

Worked examples

Beginner

Year of each entry for the cut-off test

You test the cut-off around year end 31 December 2025. In the XAF export every entry must belong to the year of its posting date, and reading the year off by eye goes wrong around New Year. You add a column with the year of each entry date.

Sheet excerpt: C2 holds the formula
RowABCD
1Entry no.Posting dateYear
225-049831 Dec 202520252025=YEAR(B2)=YEAR(B2)
326-00022 Jan 2026
426-001115 Jan 2026
5
Formula cell (C2)Input

Formula in C2

=YEAR(B2)
=YEAR(B2)

Result: 20252025

Step by step
  1. Excel reads B2. It holds 31 December 2025, stored as serial number 46022.
  2. It works out which calendar year day 46022 falls in: 2025, on its last day.
  3. YEAR returns the number 2025, so entry 25-0498 belongs to the audit year.
  4. Copied down, C3 reads 2 January 2026 (46024), only two days later, and returns 2026. C4 (15 January 2026) returns 2026 as well. Those two entries fall outside the audit year.

Watch out: If column C shows a date such as 17-07-1905, the cell carries a date format. The value 2025 is correct; set the format to General.

More on this example: why it works

Why it works

A date is one number, and YEAR maps it to the calendar year it belongs to, so two entries two days apart land in different years exactly as the calendar says. The result is a number, so you can filter, sort or compare on it.

Intermediate

Financial year for a client with a year ending 30 June

Your client Veldhuis Installatie BV has a broken financial year from 1 July to 30 June, named after the year in which it ends, so 1 July 2025 belongs to financial year 2026. For the cut-off test you give every journal line from the XAF its financial year. The shift in months sits in E1, and the formula is copied down column C.

Sheet excerpt: C2 holds the formula
RowABCDEF
1Posting dateAmountFinancial yearShift (months)66
21 Jul 2025€8,400.00€ 8.400,0020262026=YEAR(EDATE(A2, $E$1))=YEAR(EDATE(A2; $E$1))
330 Jun 2025€15,250.00€ 15.250,00
418 Mar 2026€2,735.00€ 2.735,00
530 Jun 2026€4,960.00€ 4.960,00
61 Jul 2026€1,180.00€ 1.180,00
7
Formula cell (C2)Input

Formula in C2

=YEAR(EDATE(A2, $E$1))
=YEAR(EDATE(A2; $E$1))

Result: 20262026

Step by step
  1. Excel evaluates EDATE first. A2 is 1 July 2025 (45839); six months later is 1 January 2026, serial number 46023.
  2. YEAR reads 1 January 2026 and returns 2026. The first day of the financial year belongs to financial year 2026.
  3. C3: 30 June 2025 plus six months is 30 December 2025, so YEAR returns 2025. One day earlier in the data, one financial year earlier in the result.
  4. Without EDATE, YEAR(A2) and YEAR(A3) would both return 2025, and the July line would land in the wrong financial year.
  5. The other rows follow the same steps:

    • C4: 18 March 2026 becomes 18 September 2026, so 2026
    • C5: 30 June 2026 becomes 30 December 2026, so 2026
    • C6: 1 July 2026 becomes 1 January 2027, so 2027

Watch out: If the financial year is named after the year in which it starts (July 2025 is financial year 2025), the shift is -6, not 6. Test with a July date and a June date before copying down.

More on this example: why it works, 1 variation

Why it works

Shifting every date forward by six months moves 1 July to 1 January, so the financial year boundary lines up with the calendar year boundary and YEAR can read it off. The $ signs keep every copy pointing at E1, so one change to the shift updates the whole column.

Variations

=YEAR(A2) + (MONTH(A2) >= 7)
=YEAR(A2) + (MONTH(A2) >= 7)

The same result without EDATE: TRUE counts as 1, so dates from July onward add a year. Clear for a fixed July start, but the start month is hard-coded.

Advanced

Revenue of the audit year to reconcile with the trial balance

The XAF export of account 8000 Omzet holds lines from three calendar years. You type the audit year into F1 and want the total of that year in F2, to reconcile with the trial balance without a helper column with the year of each line.

Sheet excerpt: F2 holds the formula
RowABCDEFG
1Posting dateEntry no.CreditYear20252025
231 Dec 202424-0498€6,100.00€ 6.100,00Total€65,100.00€ 65.100,00=SUM((YEAR(A2:A8) = F1) * C2:C8)=SUM((YEAR(A2:A8) = F1) * C2:C8)
314 Jan 202525-0031€18,400.00€ 18.400,00
430 Jun 202525-0214€22,650.00€ 22.650,00
530 Dec 202525-0455€9,800.00€ 9.800,00
631 Dec 202525-0461€14,250.00€ 14.250,00
72 Jan 202626-0003€7,300.00€ 7.300,00
83 Jan 202626-0004€11,900.00€ 11.900,00
9
Formula cell (F2)Input

Formula in F2

=SUM((YEAR(A2:A8) = F1) * C2:C8)
=SUM((YEAR(A2:A8) = F1) * C2:C8)

Result: €65,100.00€ 65.100,00

Step by step
  1. Excel evaluates the innermost part first. YEAR runs on each of the seven dates and returns an array: 2024, 2025, 2025, 2025, 2025, 2026, 2026.
  2. Each year is compared with F1, 2025: FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE. Note A2 (31 December 2024) and A6 (31 December 2025): the year-end entries sit on the boundary and are classified by their date alone.
  3. Multiplying by C2:C8 turns TRUE into 1 and FALSE into 0: 0, 18400, 22650, 9800, 14250, 0, 0.
  4. SUM adds them: 18400 + 22650 + 9800 + 14250 = 65100. This is the amount to compare with the trial balance.
  5. Type 2026 in F1 and the total becomes 7300 + 11900 = 19200.

Watch out: If F1 holds the text 2025 (typed with a leading apostrophe or imported), the number 2025 is never equal to the text 2025. Every comparison is FALSE and the total is 0, with no error.

More on this example: why it works, 1 more pitfall, 1 variation

Why it works

YEAR accepts a range and returns one year per cell, so the comparison produces a TRUE/FALSE mask in memory instead of a helper column. Multiplying the mask by the credits keeps only the amounts of the chosen year, and SUM adds what is left.

More to watch out for

  • One text date in column A turns the whole result into #VALUE!, because YEAR fails on that cell and the error travels through the multiplication into SUM.

Variations

=SUMIFS(C2:C8, A2:A8, ">=" & DATE(F1, 1, 1), A2:A8, "<" & DATE(F1 + 1, 1, 1))
=SUMIFS(C2:C8; A2:A8; ">=" & DATE(F1; 1; 1); A2:A8; "<" & DATE(F1 + 1; 1; 1))

Compares the dates with the first day of the year and of the next year instead of running YEAR on each row. Faster on tens of thousands of lines, and it works in every version.

MasterExcel 2021 or later (This example needs Excel 2021 or later)

Revenue year to date against the same period last year

For the analytical review of revenue you compare the sales booked so far this year with the same period of last year. The interim date sits in E1, not TODAY, so the working paper stays reproducible.

Comparing a part of this year with a full prior year is the classic error, and the formula must also survive an interim date of 29 February.

Sheet excerpt: G1 holds the formula
RowABCDEFGH
1Posting dateRevenueInterim date31 Aug 2026Growth YTD16.8%16,8%=LET( asOf, E1, y, YEAR(asOf), ytd, SUMIFS(B2:B9, A2:A9, ">=" & DATE(y, 1, 1), A2:A9, "<=" & asOf), prior, SUMIFS(B2:B9, A2:A9, ">=" & DATE(y - 1, 1, 1), A2:A9, "<=" & EDATE(asOf, -12)), ytd / prior - 1 )=LET( asOf; E1; y; YEAR(asOf); ytd; SUMIFS(B2:B9; A2:A9; ">=" & DATE(y; 1; 1); A2:A9; "<=" & asOf); prior; SUMIFS(B2:B9; A2:A9; ">=" & DATE(y - 1; 1; 1); A2:A9; "<=" & EDATE(asOf; -12)); ytd / prior - 1 )
228 Feb 2025€41,000.00€ 41.000,00
331 May 2025€36,000.00€ 36.000,00
431 Aug 2025€48,000.00€ 48.000,00
531 Oct 2025€47,500.00€ 47.500,00
631 Mar 2026€44,000.00€ 44.000,00
730 Jun 2026€46,500.00€ 46.500,00
831 Aug 2026€55,500.00€ 55.500,00
930 Sep 2026€49,000.00€ 49.000,00
10
Formula cell (G1)InputNote: E1 holds a date: 31 August 2026.

Formula in G1

=LET(
  asOf, E1,
  y, YEAR(asOf),
  ytd, SUMIFS(B2:B9, A2:A9, ">=" & DATE(y, 1, 1), A2:A9, "<=" & asOf),
  prior, SUMIFS(B2:B9, A2:A9, ">=" & DATE(y - 1, 1, 1), A2:A9, "<=" & EDATE(asOf, -12)),
  ytd / prior - 1
)
=LET(
  asOf; E1;
  y; YEAR(asOf);
  ytd; SUMIFS(B2:B9; A2:A9; ">=" & DATE(y; 1; 1); A2:A9; "<=" & asOf);
  prior; SUMIFS(B2:B9; A2:A9; ">=" & DATE(y - 1; 1; 1); A2:A9; "<=" & EDATE(asOf; -12));
  ytd / prior - 1
)

Result: 16.8%16,8%

Step by step
  1. LET stores asOf as E1, 31 August 2026 (serial number 46265), and y as YEAR(asOf) = 2026. Every later step reuses y instead of calling YEAR again.
  2. ytd: DATE(2026, 1, 1) is 46023. SUMIFS adds the amounts dated from 46023 up to and including 46265: 44000 + 46500 + 55500 = 146000. The September line falls after the interim date and is left out.
  3. prior: DATE(2025, 1, 1) is 45658, and EDATE(asOf, -12) is 31 August 2025, 45900. SUMIFS adds 41000 + 36000 + 48000 = 125000. The October 2025 line is outside the matching period.
  4. The last argument calculates the growth: 146000 / 125000 - 1 = 0.168, shown as 16.8%.
  5. Why EDATE and not DATE(y - 1, MONTH(asOf), DAY(asOf)): with an interim date of 29 February 2028, that DATE rolls over to 1 March 2027 and adds a day to last year's period. EDATE stops at 28 February 2027.

Watch out: The mirror-image mistake is computing prior as the whole of last year, for example SUM((YEAR(A2:A9) = y - 1) * B2:B9). It returns 172500, and growth becomes 146000 / 172500 - 1 = -15.4%: an apparent decline that is really a partial year set against a full one.

More on this example: why it works, 1 more pitfall, 1 variation

Why it works

YEAR is called once, on the interim date, and turned into two date boundaries with DATE; SUMIFS then compares raw dates against those boundaries, which is much faster on large ledgers than running YEAR on every row. Both periods are cut at the same point in the year, so the growth compares like with like.

Do not build this for a one-off question on a small table, where a PivotTable grouped by year and month answers it in a minute; for recurring analyses over large data, a data model with a date table and time-intelligence measures is the alternative, more setup in exchange for every period comparison at once.

More to watch out for

  • If last year's period has no revenue, prior is 0 and the result is #DIV/0!. Wrap the last line in IF(prior = 0, ...) if new revenue streams can appear.

Variations

=LET(
  asOf, E1,
  y, YEAR(asOf),
  ytd, SUMIFS(B2:B9, A2:A9, ">=" & DATE(y, 1, 1), A2:A9, "<=" & asOf),
  prior, SUMIFS(B2:B9, A2:A9, ">=" & DATE(y - 1, 1, 1), A2:A9, "<=" & EDATE(asOf, -12)),
  ytd - prior
)
=LET(
  asOf; E1;
  y; YEAR(asOf);
  ytd; SUMIFS(B2:B9; A2:A9; ">=" & DATE(y; 1; 1); A2:A9; "<=" & asOf);
  prior; SUMIFS(B2:B9; A2:A9; ">=" & DATE(y - 1; 1; 1); A2:A9; "<=" & EDATE(asOf; -12));
  ytd - prior
)

The change in euros instead of percent (146000 - 125000 = 21000), for comparing with performance materiality.

Common mistakes

Common mistakes
SymptomCauseFix
#VALUE! on some rows, or only on a colleague's PCA column of dates from a CSV import returns #VALUE! on some rows, or worked on your machine and fails on a colleague's.The dates are text. Convert them once to real dates (Text to Columns with the right date order, or DATE with parts taken from the text), then use YEAR on the converted column.
1900 where the date is missingYEAR returns 1900 for rows where the date is missing.An empty cell is read as serial number 0, which Excel places in 1900. Test for a blank first, or filter those rows out.
A date such as 17-07-1905 instead of 2025The year column shows dates like 17-07-1905 instead of 2025.The result 2025 is right but the cell has a date format, so 2025 is shown as the 2025th day after 1 January 1900. Set the cell to General.