YEARFRAC Function
The YEARFRAC function is one of the date and time functions. It is used to return the fraction of a year represented by the number of whole days from start-date to end-date calculated on the specified basis.
Syntax
YEARFRAC(start_date, end_date, [basis])
The YEARFRAC function has the following arguments:
Argument |
Description |
start_date |
A number representing the first date of the period, entered using the DATE function or other date and time function. |
end_date |
A number representing the last date of the period, entered using the DATE function or other date and time function. |
basis |
The day count basis to use, a numeric value greater than or equal to 0, but less than or equal to 4. The possible values are listed in the table below. |
The basis argument can be one of the following:
Numeric value |
Count basis |
0 |
US (NASD) 30/360 |
1 |
Actual/actual |
2 |
Actual/360 |
3 |
Actual/365 |
4 |
European 30/360 |
Notes
If the start_date, end_date or basis is a decimal value, the function will ignore the numbers to the right of the decimal point.
How to apply the YEARFRAC function.
Examples
The figure below displays the result returned by the YEARFRAC function.
Return to previous page