YEARFRAC

Syntax:

YEARFRAC ( start-date , end-date [ , basis ] )

Description: Computes the fractional number of years represented by the number of whole days between two dates, start-date and end-date., according to basis.

Arguments:

Name

Type

Description

start-date

number

The period's starting date. start-date can be earlier than, the same as, or later than end-date.

end-date

number

The period's ending date.

day-count-basis

number

The security's issue date.

basis

number

The truncated integer type of day count basis to use, as follows:

Value

Day Count Basis

0 or omitted

US (NASD) 30/360

1

Actual/actual

2

Actual/360

3

Actual/365

4

European 30/360

All arguments are truncated to integers.

Return Type and Value: number – The fractional number of years represented by the number of whole days between two dates, start-date and end-date., according to basis.

However, if the value of basis is out of range, #NUM! is returned.

example: