
Date & TimeLevel: IntermediateAvailable in: Excel 2007+
In this article
- Syntax
- Examples
- Example 1
- Example 2
- Related functions
YEARFRAC returns the fraction of a year between two dates — for pro-rata interest, depreciation and exact age.
Syntax
=YEARFRAC(start_date, end_date, [basis])
| Argument |
What it means |
basis |
0 US 30/360 (default), 1 actual/actual, 3 actual/365. |
Examples
Example 1
=YEARFRAC(A2, B2, 1)
Exact fraction of a year.
Example 2
=C2*D2*YEARFRAC(A2, B2, 3)
Simple interest for a partial year on an actual/365 basis.
DATEDIF · DAYS
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
✨ Ask AI about this articleStuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong