✍️ Excel date & time examples

DATEDIF Examples in Excel

Learn practical datedif examples in excel for deadlines, schedules, reporting periods and date calculations.

Updated 2026-06-125 practical examplesCopy-ready

💡 Ideas for You

Learning resources for Excel formulas, spreadsheets and reporting.

4 useful links

Some links in this section may be affiliate links. Choose only what is useful for your own work.

What it does

DATEDIF returns the difference between two dates in years, months or days.

Syntax or pattern

=DATEDIF(start_date, end_date, unit)

5 practical examples

1

Calculate age in years

Return whole years between birth date and today.

=DATEDIF(A2,TODAY(),"Y")

Common for age calculations.

2

Months between dates

Count complete months between two dates.

=DATEDIF(A2,B2,"M")

Useful for tenure and durations.

3

Days between dates

Count complete days between two dates.

=DATEDIF(A2,B2,"D")

Simple date difference.

4

Years and months label

Build a readable tenure label.

=DATEDIF(A2,TODAY(),"Y")&" years "&DATEDIF(A2,TODAY(),"YM")&" months"

Combines two units.

5

Project duration

Measure project duration in months.

=DATEDIF(StartDate,EndDate,"M")

Good for project summaries.

Common mistakes to avoid

  • Check whether dates are real Excel dates, not text.
  • Be careful with weekends, holidays and time portions.
  • Explain whether a result counts calendar days or workdays.

Related Excel examples

FAQ

Why does the date formula return a number?

Excel stores dates as serial numbers. Format the cell as a date to display it correctly.