Day Number of the Year – Formula for Excel or Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on February 6, 2023
Download Example Workbook

Download the example workbook

This tutorial will demonstrate how to calculate a date’s day number of the year or find the nth day of the year in Excel and Google Sheets.

mf day number of year


Date’s Day Number of the Year

To calculate a date’s day number of the year you can calculate the difference between the date and the first day of the year:


Day Year to date

Notice we need to add 1 to the end of the formula to calculate the correct day number. Instead we can set the day to 0 in the Date Function:


Year to date Day0

nth Day of the Year

Conversely you can calculate the nth day of the year by adding n days to 12/31 of the previous year:


Nth Day of the Year

Notice we do this by once again setting day =0 in the Date Function.

Today’s Day Number

Use the TODAY Function to calculate today’s day number:


Today's Day Number

Google Sheets – Day Number Of The Year

All of the above examples work exactly the same in Google Sheets as in Excel.
Day-Number of year Google Sheet

AI Formula Generator

Try for Free

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

Return to Excel Formulas List