The YEARFRAC function calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the end_date). You could, for example, use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or obligations to assign to a specific term.

YEARFRAC takes 2 required arguments and 1 optional argument:

Syntax: YEARFRAC(start_date, end_date, [basis])

#1)
Using the YEARFRAC function:
Note:
Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2014 is serial number 41640 because it is 41,640 days after January 1, 1900.
#2)
The arguments for the YEARFRAC function are:
Argument Required? Description
start_date Required A date that represents the start date.
end_date Required A date that represents the end date.
basis Optional The type of day count basis to use.
Possible basis argument values:
#3)
A few more things:
All arguments are truncated to integers
If start_date or end_date are not valid dates, YEARFRAC returns the #VALUE! error value.
If basis < 0 or if basis > 4, YEARFRAC returns the #NUM! error value.

Summary

The YEARFRAC function calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the end_date).
comments powered by Disqus