DATEDIF

Counts complete years, months or days between two dates.

How it’s written

DATEDIF(start, end, unit)

Example

AB
1StartEnd
245,29246,096
=DATEDIF(A2,B2,"M")

Result: 26

There are 26 complete months between the dates.

Try it yourself

Open a live sheet with this example, and type the formula yourself. It takes a moment to load.

Worth knowing

Excel doesn’t suggest this function as you type, but it works.

Practice it properly

Tenure and working days gives you real tasks, with your formulas tested on data you haven’t seen.

Start the lesson

Guides that use DATEDIF

Related functions