The YEARFRAC function calculates the year fraction representing the number of whole days between start_date and end_date.
basis is the type of day count basis to be used, as defined by the following table:
Basis |
Day count basis |
0 |
US 30/360 |
1 |
Actual/actual |
2 |
Actual/360 |
3 |
Actual/365 |
4 or omitted |
European 30/360 |
For example, if a period has start date, 5 August 1997, and end date, 1 November 1997, with a day count basis of 30/360, the formula
YEARFRAC(35646, 35734, 4)
returns a year fraction for the period of 0.2389 or 23.89%.
See also: