How do I use DATEDIF in Excel?
Use DATEDIF when you want to calculate the difference between dates. Enter Start date, End date, Unit in that order, then add optional arguments when needed.
Returns difference between dates in selected unit.
DATEDIF(start_date, end_date, unit)start_date
RequiredEnter a date/reference-related value.
end_date
RequiredEnter a date/reference-related value.
unit
RequiredSet DATEDIF unit: "Y" years, "M" months, "D" days, plus "MD", "YM", "YD".
Use DATEDIF to return the result with these settings (Start date: B2 (cell B2 (Start Date in column B)), End date: C2 (cell C2 (End Date in column C)), Unit: "D").
| # | ATask ID | BStart Date | CEnd Date | DNotes | EHoliday |
|---|---|---|---|---|---|
| 2 | T001 | 2026/03/01 | 2026/03/05 | Standard task | 2026/03/03 |
| 3 | T002 | 2026/03/03 | 2026/03/10 | Priority task | 2026/03/06 |
| 4 | T003 | 2026/03/05 | 2026/03/12 | Standard task | 2026/03/10 |
| 5 | T004 | 2026/03/08 | 2026/03/14 | Urgent task | 2026/03/12 |
| 6 | |||||
| 7 | |||||
| 8 |
How to Use (Formula)
=DATEDIF(B2, C2, "D")Result
4
Use DATEDIF when you want to calculate the difference between dates. Enter Start date, End date, Unit in that order, then add optional arguments when needed.
Use the "Start Function Practice" button to jump straight into DATEDIF drills.
The main arguments are Start date, End date, Unit. Enter them in order.