YEARFRAC
Express a period between two dates as a fraction of a year using a chosen basis.
Syntax
=YEARFRAC(start_date, end_date, [basis])Worked example
Divide the actual 365 elapsed days by 365 using basis 3.
=YEARFRAC(DATE(2025,1,1),DATE(2026,1,1),3)Result 1
Microsoft documentation
Check the arguments, supported editions and behavior of this function in Microsoft’s reference.
Microsoft referenceUse Excel's YEARFRAC Function for Pro-Rata Calculations
Practice YEARFRAC
Divide the actual 365 elapsed days by 365 using basis 3.
| A | B | |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 |
Show example formula
=YEARFRAC(B2,B3,B4) Lesson quiz
Answer three questions to see your level in this lesson.
