YEARFRAC

Calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the end_date). Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or obligations to assign to a specific term.

If this function is not available, run the Setup program to install the Analysis ToolPak. After you install the Analysis ToolPak, you must enable it by using the Add-Ins command on the Tools menu.

Syntax

YEARFRAC(start_date,end_date,basis)

Start_date   is a date that represents the start date.

End_date   is a date that represents the end date.

Basis   is the type of day count basis to use.

Basis

Day count basis

0 or omitted

US (NASD) 30/360

1

Actual/actual

2

Actual/360

3

Actual/365

4

European 30/360


Remarks

Examples

YEARFRAC("01/01/93", "06/30/93",0) equals 0.5

YEARFRAC("01/01/93", "07/01/93",3) equals 0.49863