ReferenceFunctionsDate & Time Functions
YEARFRAC
YEARFRAC: Returns the fraction of a year between two dates for a selected day-count basis.
Summary
Returns the fraction of a year between two dates for a selected day-count basis.
Remarks
- Supported
basisvalues:0(US 30/360),1(actual/actual),2(actual/360),3(actual/365),4(European 30/360). - If
start_date > end_date, the result is negative. - Invalid
basisvalues return#NUM!. - Serial dates are interpreted with the Excel 1900 mapping rather than workbook
1900/1904context.
Examples
Actual/360 convention
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
0.5027777778
Actual/365 convention
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
0.495890411
Related functions
FAQ
How does the basis argument change YEARFRAC?
Basis selects the day-count convention (actual or 30/360 variants), so the same dates can yield different fractions.
Runtime metadata
Category
Date & Time
Signature
YEARFRAC(arg1: Number, arg2: Number, arg3…: Number)Arity
min 2, max variadic
Arguments
arg1Number · Scalar · coercion NumberLenientText
arg2Number · Scalar · coercion NumberLenientText
arg3Number · Scalar · coercion NumberLenientText
Caps
PURE
Source