Date & Time

YEAR Function in Excel

Returns the year of a date as a four-digit number.

Syntax

  • =YEAR(serial_number)

Arguments

  • serial_number (required): The date to extract year from

Examples

  • =YEAR(TODAY()) - Current year - Result: 2026
  • =YEAR(A1) - Year from date in cell - Result: Year number
  • =YEAR(A1)-YEAR(B1) - Years between dates - Result: Year difference

Excel YEAR function documentation

  • YEAR extracts the four-digit year from a date serial.
  • Syntax: =YEAR(serial_number). Used in fiscal filters, YoY comparisons, and date reconstruction.
  • Combine with MONTH and DAY via [DATE](/functions/date/) to rebuild dates.
  • Related: [MONTH](/functions/month/), [DAY](/functions/day/), [DATEDIF](/functions/datedif/), [EDATE](/functions/edate/).

YEAR syntax and fiscal calendars

  • serial_number must be valid date — not arbitrary year text alone.
  • Fiscal year label may differ: =YEAR(EDATE(A2,-3)) style offsets for Apr-Mar FY.
  • YEAR(TODAY()) in headers for rolling report titles.
  • #VALUE! if date text not recognized — use DATEVALUE.

Step-by-step: YoY same-month comparison

  • Step 1 — Transaction dates column A, revenue B.
  • Step 2 — Helper year: =YEAR(A2), month: =MONTH(A2).
  • Step 3 — This year June: =SUMIFS(B, year_col, YEAR(TODAY()), month_col, 6).
  • Step 4 — Prior year June: =SUMIFS(B, year_col, YEAR(TODAY())-1, month_col, 6).
  • Step 5 — YoY %: =(CY-PY)/PY with IFERROR on zero PY.

YEAR vs TEXT vs YEARFRAC

  • YEAR — integer year component.
  • TEXT(A2,"yyyy") — string year for labels.
  • YEARFRAC — fractional years between dates — age and interest accrual.
  • Hub: [Date & Time functions](/categories/date-time/).

Worked examples to copy

  • Current year: =YEAR(TODAY()).
  • From date cell: =YEAR(A2).
  • Birth year: =YEAR(dob).
  • Rolling title: ="Sales "&YEAR(TODAY()).

People also ask

  • YEAR on datetime? — Uses calendar year of date portion.
  • YEAR from serial 44927? — Returns 2023 for that serial (example — verify in your locale).
  • YEAR vs YEAR(TODAY()) in SUMIFS? — Common pattern for annual dashboards.
  • YEAR Google Sheets? — =YEAR(date) identical concept.

Common errors

  • Returns 4-digit year (1900-9999)
  • Input must be valid date

Use cases

  • Date analysis
  • Grouping by year
  • Age calculations

Frequently asked questions

  • How do I calculate age in years? Use DATEDIF: =DATEDIF(BirthDate, TODAY(), "Y") for complete years. Or approximate: =YEAR(TODAY())-YEAR(BirthDate) but this doesn't account for whether birthday has passed.
  • How do I group data by year? Add a Year column: =YEAR(DateColumn). Then use pivot tables or SUMIFS: =SUMIFS(Amount, Year, 2026). Or use YEAR directly in SUMIFS criteria.
  • Can YEAR extract from text dates? No, YEAR needs a date value. Convert text first: =YEAR(DATEVALUE(A1)) or =YEAR(VALUE(A1)) if the text is a valid date format.
  • How do I get fiscal year? For fiscal year starting in July: =YEAR(A1)+IF(MONTH(A1)>=7,1,0). Adjust the month (7) and offset (1 or 0) for your fiscal calendar.
  • What is the range of years YEAR can return? YEAR returns 1900-9999, matching Excel's date range. Dates before 1900 aren't supported in standard Excel (use text or special handling).

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.

When to use YEAR

  • Date analysis — common Date & Time scenario for YEAR.
  • Grouping by year — common Date & Time scenario for YEAR.
  • Age calculations — common Date & Time scenario for YEAR.

YEAR in the Date & Time category

  • Browse all Date & Time functions at /categories/date-time/ for related formulas.
  • YEAR syntax: =YEAR(serial_number)
  • serial_number (required): The date to extract year from
  • Confirm YEAR arguments match the syntax shown above before filling down.
  • Lock table and range references with $ when copying formulas across rows or sheets.

Formula checklist before you copy down

  • Confirm YEAR arguments match the syntax shown above before filling down.
  • Lock table and range references with $ when copying formulas across rows or sheets.
  • If results look wrong, check for text stored as numbers and invisible spaces with TRIM.
  • Spot-check three known input rows manually against expected output.

Related Excel functions

  • MONTH (/functions/month/): Returns the month of a date as a number from 1 to 12.
  • DAY (/functions/day/): Returns the day of a date as a number from 1 to 31.
  • DATE (/functions/date/): Creates a date from year, month, and day components.
  • TODAY (/functions/today/): Returns the current date. Updates automatically when the worksheet recalculates.

Errors to watch for

  • Returns 4-digit year (1900-9999) — review causes on linked error pages in the directory.
  • Input must be valid date — review causes on linked error pages in the directory.

Copy-paste audit workflow

  • Enter YEAR on three test rows with known expected output documented on a QA tab.
  • Fill down only after absolute references are locked on lookup tables and rate tables.
  • Compare against manual calculation or a calculator for financial and statistical functions.
  • Search this directory for comparison guides when choosing between similar functions in the same category.

YEAR worked examples to copy

  • =YEAR(TODAY()) — Current year. Expected result: 2026.
  • =YEAR(A1) — Year from date in cell. Expected result: Year number.
  • =YEAR(A1)-YEAR(B1) — Years between dates. Expected result: Year difference.

YEAR reference summary for crawlers and offline review

  • YEAR belongs to the Date & Time category in Excel. Returns the year of a date as a four-digit number.
  • Full syntax: =YEAR(serial_number). Open /functions/year/ for parameters, FAQs, and related pages.
  • Common mistakes: Returns 4-digit year (1900-9999); Input must be valid date
  • Pair this function with comparison guides when another Excel formula might fit the same task better.
  • Review fix-excel-formula-errors when unexpected errors appear after upgrading Excel or sharing across locales.