Count the days in a date’s year

Turn November 4, 2026 into 365, the number of days in 2026. Leap years give 366.

What you'll make

In Excel: February 29, 2024 becomes 366 days.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1YEAR(A8)+1Takes the year from the date and adds 1.2027
2DATE( … ,1,1)Builds January 1 of the next year.January 1, 2027
3DATE(YEAR(A8),1,1)Builds January 1 of the date's own year.January 1, 2026
4-Counts the days between those two dates.365

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

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

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 counts fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Dates typed as text turn amber. Retype them as real dates to get a count.

Microsoft's help: DATE function