Author: Oscar Cronquist Article last updated on May 21, 2022

The YEARFRAC function returns the fraction of the year based on the number of whole days between a start date and an end date.

Use the YEARFRAC function to calculate a part of a whole based on a date range relative to a year.

Formula in cell B8:


Excel Function Syntax

YEARFRAC(start_date, end_date, [basis])


start_date Required.
end_date Required.
[basis] Optional. Day count basis.

0 - Default value. US (NASD) 30/360

1 - Actual/actual

2 - Actual/360

3 - Actual/365

4 - European 30/360


Use the DATE function to create a date if you enter the date in the function.