Get a date’s day-of-year number

Turn November 4, 2026 into 308, its day number in the year.

What you'll make

In Excel: November 4, 2026 becomes day 308.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1A8The real date.November 4, 2026
2YEAR(A8)Takes only the year from the date.2026
3DATE( … ,1,0)Builds the day before January 1 of that year.December 31, 2025
4-Takes that day away, leaving the day number.308

Read it from the inside out: YEAR works first, then DATE, then the minus.

=A8-DATE(YEAR(A8),1,0)

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own dates. Paste real dates into the green column of the Template tab. The day numbers fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

In leap years, every date after February 28 is one higher. December 31 is then 366.

Microsoft's help: DATE function