YEARFRAC function

TheYEARFRAC functionreturns a decimal number representing the fraction of a year between two validExcel dates.

TheYEARFRAC pageprovides more information.

Note that negative numbers becomemore negative.

Excel formula: Get age from birthday

For example, while INT(10.8) returns 10, INT(-10.8) returns -11.

Excel YEARFRAC function

Excel INT function