Return a proportion of years for a given range of dates.
The Excel YEARFRAC function calculates the fraction of years that has elapsed within a given range of dates. Like, to find a number of years in proportion between two dates like 01-01-2017 and 30-09-2017, use =YEARFRAC(startdate,enddate,2), that returns ‘0.755’.
The function is helpful in finding Interest Expense of the given period, the age of the person.
=YEARFRAC (start_date, end_date, [basis])
start_date – The start date
end_date – The end date
basis [optional] – The type of day count basis (see below).
A decimal number representing the proportion of year.
- The YEARFRAC calculate the fragment of a year depicted by the number of days between two given dates.
- Use YEAR function to find the Year component of a given date.
- The cell format of result should have decimal places for precise display of result.
- The formula calculates the difference between two dates and divides the number of days in the year (Default is US (NASD) 30/360). Example: Difference between 01-01-2017 and 30-09-2017 = 272, proportion is 272/360 = 0.755 (2nd basis).
The type of day count of [basis] and their meanings are:
|Basis||Day count basis|
|0 or omitted||US (NASD) 30/360|
From YEARFRAC Function you can calculate years between two dates like we have dates 10-06-2007 and 10-06-2018 it return 11.