Calculate the difference between two dates and view matching Excel formulas for days, weeks, months, and years.
Select the earlier date.
Select the later date.
Total Days
—
=B1-A1
Weeks
—
=(B1-A1)/7
Complete Months
—
=DATEDIF(A1,B1,"m")
Complete Years
—
=DATEDIF(A1,B1,"y")
Detailed Difference
—
=DATEDIF(A1,B1,"y") & " years, " & DATEDIF(A1,B1,"ym") & " months, " & DATEDIF(A1,B1,"md") & " days"
Calculations use calendar dates only. The end date must be the same as or later than the start date.