Excel DATEDIF Function Generator

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

Enter the beginning date of the time period (e.g., "01/01/2001", A5, or TODAY()). Ensure double quote with dates.
Ensure to include double quotes for date. For example, "01/01/2005"

Generated Formula:

A few examples of DATEDIF Function

Scenario Formula
Calculate age in years =DATEDIF(A1, TODAY(), "Y")
Find the number of months between two dates =DATEDIF(A1, B1, "M")
Get the number of days between two dates =DATEDIF(A1, B1, "D")
Difference in days, ignoring years =DATEDIF(A1, B1, "YD")
Difference in days, ignoring months and years =DATEDIF(A1, B1, "MD")
Calculate the exact age in years, months, and days =DATEDIF(A1, TODAY(), "Y") & " years, " & DATEDIF(A1, TODAY(), "YM") & " months, " & DATEDIF(A1, TODAY(), "MD") & " days"