Excel: DAYS, DAYS360 & YEARFRAC Functions

Share this video:

About the video

DAYS

DAYS function in Excel returns the number of days between two dates. With a start date in A9 and end date in B9, =DAYS(B9,A9) will return the days between the two dates. Both dates must be valid Excel dates or text values that can be parsed as dates. The DAYS function only works with whole numbers, fractional time values are ignored. If start and end dates are reversed, DAYS returns a negative number.

Arguments of DAYS Function:

  • end_date - The end date.
  • start_date - The start date.

 

DAYS360

DAYS360 function in Excel returns the number of days between two dates based on a 360-day year, where all months are assumed to have 30 days. Both dates must be valid Excel dates or text values that can be parsed as dates. The DAYS360 function only works with whole numbers, time values are ignored. DAYS360 takes an optional argument called method that can be set to either TRUE or FALSE. When method is FALSE (default) DAYS360 uses a US method to compute days. When the start date is the last day of the month, it is treated like the 30th day of that month. When the end date is the last day of the month, and the start date is less than 30, the end date is treated as the 1st of the next month, otherwise the end date is treated like the 30th of the same month. If method is set to TRUE, DAYS360 uses a European method to calculate days. In this scheme, start and end dates equal to the 31st of a month are set to the 30th of the same month.

Arguments of DAYS360 Function:

  • start_date - The start date.
  • end_date - The end date.
  • method - [optional] Day count method.
  • FALSE (default) = US method, TRUE = European method.

 

YEARFRAC

YEARFRAC function in Excel returns a decimal value that represents fractional years between two dates. You can use YEARFRAC to do things like calculate age with a birthdate. Excel uses whole days between two dates to work out the fraction of a year as a decimal value. The YEARFRAC function has an optional argument called "basis" that controls how days are counted when computing fractional years. The default behavior is to count days between two dates based on a 360-day year, where all 12 months are considered to have 30 days.

Arguments of YEARFRAC Function:

  • start_date - The start date.
  • end_date - The end date.
  • basis - [optional] The type of day count basis to use.

Share this video: