The DAYSINYEAR function returns the number of days in a year you specify.

For example, you can use DAYSINYEAR to check if a year contains 365 or 366 days and plan accordingly.

DAYINYEAR(Year)

ArgumentData typeDescription
YearNumberThe year to determine the number of days within.

The DAYSINYEAR function returns a numeric result.

DAYSINYEAR(2024)

This example returns the number of days in the year 2024. This is 366 days, as 2024 is a leap year.

The DAYSINYEAR function returns a value of zero for any values outside of the date range of 01/01/1900-12/31/2399.

YEAR

FormulaDescriptionResult
DAYSINYEAR(2020)Returns the number of days in the year 2020.366
DAYSINYEAR(2021)Returns the number of days in the year 2021.365
DAYSINYEAR(2022)Returns the number of days in the year 2022.365
DAYSINYEAR(2023)Returns the number of days in the year 2023.365
DAYSINYEAR(2024)Returns the number of days in the year 2024.366