YEARFRAC Function Explained
The YEARFRAC
Function in Microsoft Excel calculates the fraction of the year represented by the number of whole days between two dates. It takes three arguments: start_date, end_date, and basis. The start_date and end_date arguments are required and must be entered as either a date value or a reference to a cell containing a date value. The basis argument is optional and determines the day count basis to use. The function returns a decimal number representing the fraction of a year between the two dates.
YEARFRAC Function Syntax
YEARFRAC(start_date, end_date, [basis])
- start_date: The start date of the period.
- end_date: The end date of the period.
- [basis]: (Optional) The type of day count basis to use. The default value is 0 (US (NASD) 30/360).