DATEDIF Function in Excel: Syntax, Examples and Free Practice
DATEDIF is an Excel Date & Time function. Calculates the difference between two dates in days, months, or years.
DATEDIF syntax
Arguments
start_date: The date to start counting fromend_date: The date to count up tounit: A code identifying which calculation to perform
When to use DATEDIF
DATEDIF is used in scheduling, deadline tracking, and reporting that spans specific date ranges.
Practice DATEDIF online, free
Open the live Excel-style spreadsheet and try DATEDIF yourself. No Excel install or sign-up needed to start.
Practice DATEDIF now →Learn more
Read the tutorial: Calculate age with DATEDIF.
More Date & Time functions
Frequently asked questions
What does the DATEDIF function do in Excel?
Calculates the difference between two dates in days, months, or years.
What is the syntax of DATEDIF in Excel?
The syntax is =DATEDIF(start_date, end_date, unit). start_date: The date to start counting from; end_date: The date to count up to; unit: A code identifying which calculation to perform.
Where can I practice DATEDIF online for free?
Open the free live spreadsheet on Cellgrids and try DATEDIF 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