There are a number of functions in Excel that can be used to subtract dates. Which one you use depends on whether you want to subtract days, months, or years. The following articles include examples of subtracting two dates in Excel using the different date functions.
Excel DATEDIF Function
The DATEDIF function is perhaps the most versatile of the functions capable of subtracting two dates. It can be used to subtract the number of days, months, or years between two dates even if they are in different years.
Excel 2007 DAY Function
The DAY function can be used to find the number of days between two dates. However, the function excludes the month and year portions of a date, therefore, it will not correctly subtract two dates that are in different months or years.
Excel 2007 MONTH Function
The MONTH function can be used to find the number of days between two dates. However, the function excludes the year portion of a date, therefore, it will not correctly subtract two dates that are in different years.
Excel 2007 YEAR Function
The YEAR function can be used to subtract two dates to find the number of years between the dates.





