How to calculate the day of the year for a date in Excel

Here is a simple formula that returns the day of the year for a given date. There is no built-in function that could do this in Excel.

Enter the formula shown below:

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

=A1-ДАТА(ГОД(A1);1;1)+1

Explanation:

  • Dates and times in Excel are stored as numbers that are equal to the number of days since January 0, 1900. So June 23, 2012 is the same as 41083.
  • Function DATE (DATE) takes three arguments: year, month, and day.
  • Expression DATE(YEAR(A1),1) or January 1, 2012 – same as 40909.
  • The formula subtracts (41083 – 40909 = 174), adds 1 day, and returns the serial number of the day in the year.

Leave a Reply