YEARFRAC Function in Excel: Syntax, Examples & Practice

Learn the Excel YEARFRAC function: Returns the fraction of a year between dates. Try focused practice and download a free workbook.

Syntax

=YEARFRAC(start_date, end_date, [basis])

Check the function documentation for your Excel version and platform. The browser simulator implements selected behavior and does not reproduce every Excel feature.

Worked example

RowA: EmployeeB: Start dateC: End date
2Amit01-Apr-202630-Apr-2026
3Priya05-Apr-202630-Apr-2026
4Ravi10-Apr-202630-Apr-2026
=YEARFRAC(B2,C2)

Expected result: 0.0806

These dates are selected for YEARFRAC. Identify whether the function returns a date, part of a date or a date difference.

Professional use

Tenure and financial calculations.

Practice YEARFRAC · Download practice .xlsx

Apply your skills

Explore MIS and finance projects

Questions and answers

How can I practise YEARFRAC?

Use the focused ten-question YEARFRAC lab, then download its workbook for ten additional function-specific tasks and an answer key. Core learning works without an account.

Which Excel version supports YEARFRAC?

Check the function documentation for your Excel version and platform. The browser simulator implements selected behavior and does not reproduce every Excel feature.

Does the browser simulator replace Microsoft Excel?

No. It supports a selected set of formula behavior for practice. Native workbook recalculation, full function compatibility, PivotTables and external data features must be checked in your own Excel installation.

Interactive practice runs in your browser.