Module
Contents
Index 🔎︎
\<bookmark_value\>YEARFRAC function\</bookmark_value\>

## YEARFRAC

The result is the number of the years (including fractional part) between StartDate and EndDate.

### Syntax

YEARFRAC (Start date;End date;Basis)

\<emph\>Start date\</emph\> and \<emph\>end date\</emph\>: two date values.

\<emph\>Basis\</emph\>: is chosen from a list of options and indicates how the year is to be calculated.

Basis | Calculation
0 or missing | US method (NASD), 12 months of 30 days each
1 | Exact number of days in months, exact number of days in year
2 | Exact number of days in month, year has 360 days
3 | Exact number of days in month, year has 365 days
4 | European method, 12 months of 30 days each

### Example:

What fraction of the year 2001 lies between 1.1.2002 and 7.1.2001?

=YEARFRAC("1.1.2002"; "7.1.2002";1) returns 0.495890.