Calculate the difference between two dates

To calculate the difference between two dates in Excel, you can use simple subtraction or specific functions depending on the format you want the result in (days, months, years, etc.).


1. Difference in Days

If A1 = Start Date and B1 = End Date:

=B1 - A1

Make sure both cells are formatted as Date. The result will be the number of days between the two.


2. Difference in Years, Months, and Days (Using DATEDIF)

=DATEDIF(A1, B1, "Y")        → Years  
=DATEDIF(A1, B1, "M")        → Total months  
=DATEDIF(A1, B1, "D")        → Total days  
=DATEDIF(A1, B1, "YM")       → Remaining months (ignores years)  
=DATEDIF(A1, B1, "MD")       → Remaining days (ignores months/years)

To get the full breakdown like “X years, Y months, Z days”:

=DATEDIF(A1, B1, "Y") & " years, " & DATEDIF(A1, B1, "YM") & " months, " & DATEDIF(A1, B1, "MD") & " days"

3. Difference in Weeks

=(B1 - A1) / 7

Format the result as a number or round it if needed:

=ROUND((B1 - A1)/7, 0)
Leave a Reply 0

Your email address will not be published. Required fields are marked *