YEARFRAC Function in Excel: Syntax, Examples and Free Practice
YEARFRAC is an Excel Date & Time function. Returns the fraction of a year between two dates.
YEARFRAC syntax
Arguments
start_date: The date to start counting fromend_date: The date to count up tobasis: Which day-count basis to use (optional)
When to use YEARFRAC
YEARFRAC is used in scheduling, deadline tracking, and reporting that spans specific date ranges.
Practice YEARFRAC online, free
Open the live Excel-style spreadsheet and try YEARFRAC yourself. No Excel install or sign-up needed to start.
Practice YEARFRAC now →More Date & Time functions
Frequently asked questions
What does the YEARFRAC function do in Excel?
Returns the fraction of a year between two dates.
What is the syntax of YEARFRAC in Excel?
The syntax is =YEARFRAC(start_date, end_date, [basis]). start_date: The date to start counting from; end_date: The date to count up to; basis: Which day-count basis to use (optional).
Where can I practice YEARFRAC online for free?
Open the free live spreadsheet on Cellgrids and try YEARFRAC yourself. No Excel install is needed and you can start without signing up.
All Excel formulas · Cheat sheet · Excel exercises · Date and Time functions · Excel case studies · Excel tutorials · Excel shortcuts