Name

YEARFRAC

Synopsis

Use YEARFRAC (an Analysis ToolPak function) to return a decimal value that represents the fraction of a year represented by the number of days between the specified dates. This function is typically used with financial functions to calculate the portion of a year’s benefits or obligations to assign.

To Calculate

=YEARFRAC(Start_Date, End_Date, Basis)
Basis

This optional argument indicates how days in a month and days in a year are to be counted when performing calculations. For example, although we all know that all years (with the exception of leap years) have 365 days and each month has either 30 or 31 days (except for February); the 30/360 Day Count Basis assumes that each month has exactly 30 days and that the year has 360 days. By using this type of calculation, the interest paid can be calculated as the same amount each month.

There are five different Day Count Basis methods that can be selected for the Basis argument by specifying a value between 0 and 4, as outlined in Table 13-3. If this argument is omitted a value of is used for the function.

Table 13-3. Basis Values

Basis Value

Description

0

This value selects the US (NASD) 30/360 day count basis that assumes that each month has 30 days and the total number of days in the year is 360 (calculated as 12 months x 30 days per month.) This method makes adjustments for February and months with 31 days. If the date is 2/28 or 2/29 (leap year) it is adjusted to be 2/30. The way it deals with months ending ...

Get Excel 2000 in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.