YEARFRAC Function in Excel: Fraction of a Year Between Dates

⏱ 1 min readUpdated 28 September 2026

Date & TimeLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. 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 article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong