YEARFRAC Function in Excel – Get Difference Between dates in Years in Excel

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:

YEARFRAC (start_date, end_date, [basis])

start_date – The start date.

end_date – The end date.

basis – [optional] The type of day count basis to use

YEARFRAC FUNCTION IN EXCEL 1

Example of YEARFRAC Function in Excel

Formula:

YEARFRAC FUNCTION IN EXCEL 2

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

Result:

YEARFRAC FUNCTION IN EXCEL 3

Even though start date and end date remains same, the result in terms of fraction of years changes because of basis option.

previous-small YEARFRAC Function in Excel                                                                                                                next_small YEARFRAC Function in Excel