The DATEDIF Function

datedif function
|| | 23. 09. 2021.

The DATEDIF function is one of several hidden Excel legacy functions. We say hidden, it’s because Excel does not suggest any of these as part of the formula drop down list, nor does it offer suggestions for the arguments as you populate them. These are functions that you need to type out yourself. Thankfully, this one is short enough, and is well worth the effort.

The DATEDIF function returns the difference between two dates. It takes three arguments:

  1. Start Date
  2. End Date
  3. Units

The order of the arguments might feel counterintuitive for those who calculate the difference between dates by deducting the start date from the end date, but it’s an easy mistake to fix.

The units arguments most commonly used are as follow:

“D” – whole Days

“M” – whole Months

“Y” – whole Years

Working with dates can get very complicated in Excel, and sometimes it can be useful to use a flexible function like DATEDIF in place of more manual methods. We cover working with dates extensively in our Core courses.

For more information on our courses click here. Alternatively, if you have a specific topic you would like training on why not contact us today at

Let’s discuss your financial modelling needs

Contact Us

Recommended resources