YEARFRAC Function in Excel returns the difference between two dates in year as a decimal value. You can use Excel YEARFRAC Function to Calculate the Age in terms of years using birthdate.
Syntax of YEARFRAC Function in Excel:
start_date – The start date.
end_date – The end date.
basis – [optional] The type of day count basis to use
Example of YEARFRAC Function in Excel
Five example is shown to depict example on Excel YEARFRAC Function. Start date and End date remains same for all these five examples, with change in Basis Option. So the output will be
Even though start date and end date remains same, the result in terms of fraction of years changes because of basis option.