DATEDIF Function in Excel: Syntax, Examples & Practice
Learn the Excel DATEDIF function: Calculates the difference between two dates. Try focused practice and download a free workbook.
Syntax
=DATEDIF(start_date, end_date, unit)
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
| Row | A: Employee | B: Start date | C: End date |
|---|---|---|---|
| 2 | Amit | 01-Apr-2026 | 30-Apr-2026 |
| 3 | Priya | 05-Apr-2026 | 30-Apr-2026 |
| 4 | Ravi | 10-Apr-2026 | 30-Apr-2026 |
=DATEDIF(B2,C2,"d")
Expected result: 29
These dates are selected for DATEDIF. Identify whether the function returns a date, part of a date or a date difference.
Professional use
Ageing, tenure and turnaround calculations.
Practice DATEDIF · Download practice .xlsx
Apply your skills
Explore MIS and finance projects
Questions and answers
How can I practise DATEDIF?
Use the focused ten-question DATEDIF 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 DATEDIF?
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.