Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
YEARFRAC returns the decimal number of years between a start and end date, computed according to one of five day-count conventions used in finance (0=US 30/360, 1=actual/actual, 2=actual/360, 3=actual/365, 4=European 30/360). Use it for accrued interest calculations, prorating annual fees, or financial modelling.
=YEARFRAC(DATE(2024,1,1),DATE(2024,7,1),1)=YEARFRAC(DATE(2024,1,1),DATE(2024,7,1),1)Computed by a real spreadsheet engine on the sample data below.
| StartDate | EndDate | Basis | YearFrac |
| 2024-01-01 | 2024-07-01 | 1 | |
| 2024-03-01 | 2024-09-01 | 0 | |
| 2024-06-15 | 2024-12-15 | 3 | |
| 2023-11-01 | 2024-05-01 | 1 |
=YEARFRAC(DATE(2024,1,1),DATE(2024,7,1),1)→0.4972677596
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Need a version for your data?
Try: “Calculate what fraction of the year a bond was held between its purchase and sale dates”
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: