YEARFRAC()

Note

In Excel 2003, this function is available as an add-in.

Syntax. YEARFRAC(start_date,end_date,basis)

Definition. This function converts the interval between the start date and the end date into a fraction of a year.

Arguments

Background. With the YEARFRAC() function, you can compare the duration of claims and liabilities. This function is related to the financial functions (see Chapter 15).

See Also

For more information about saving dates in Excel, see the section titled The Excel Date System in Chapter 2.

You need to pay attention to the following when working with this function:

Example. For the credit period from January 1, 2008 through October 10, 2009, the formula

=YEARFRAC("01/01/2008","10/10/2009")

calculates a duration of 1.775 years based on a month with 30 days and a year with 360 days. More examples (see Figure 7-9) include:

The credit period calculated with YEARFRAC().

Figure 7-9. The credit period calculated with YEARFRAC().

See Also

EDATE(), EOMONTH(), NETWORKDAYS(), NETWORKDAYS.INTL(), NOW(), TODAY(), WORKDAY(), WORKDAY.INTL()