Functions
YEARFRAC
Fraction of year between two dates
Try it
When to use it
When should I use YEARFRAC?
Use YEARFRAC to compute the fraction of a year between two dates according to a specific day-count basis (e.g., actual/actual or 30/360), which is required for bond accrual and pro-rata financial calculations.
Used in
Syntax
YEARFRAC(start,end,[basis])Examples
=YEARFRAC(DATE(1969,7,16),DATE(1969,7,24),1) // => 0.021917808219178082
=YEARFRAC(DATE(2012,1,1),DATE(2012,7,30)) // => 0.5805555555555556
=YEARFRAC(DATE(2012,1,1),DATE(2012,7,30),1) // => 0.5765027322404371