How to Subtract Dates in Excel

This page shows you how to subtract dates in Excel, by first explaining how Excel dates work, and then providing examples of Excel date subtractions.


Understanding Dates in Excel

If you want to subtract dates in Excel, it helps if you first understand how dates are stored within Excel.

Dates are actually stored as positive integers in Excel. It is only the formatting of an Excel cell that causes a number to be displayed as a date, rather than a simple numeric value.

The numbering system used for Excel dates varies with different computer systems, but most commonly, the numbering system is:

01-Jan-1900 is represented by the number 1
02-Jan-1900 is represented by the number 2
03-Jan-1900 is represented by the number 3
            .
            .
            .
31-Dec-2015 is represented by the number 42369
etc.

Because Excel dates are simply integers, you can subtract dates in Excel, in the same way that you can subtract any other integers. The result from the subtraction of any two dates is equal to the number of days between the two dates.


Excel Date Subtraction Examples

Column C of the following spreadsheet shows three examples of subtracting dates in Excel. In each case, the date in column A is subtracted from the date in column B.

 Formulas:
 ABC
1Start DateEnd DateDifference
203-Jan-201118-Jan-2011=B2-A2
319-Nov-198626-Nov-2020=B3-A3
409-Mar-201123-Jun-2012=B4-A4
 Results:
 ABC
1Start DateEnd DateDifference
203-Jan-201118-Jan-201115
319-Nov-198626-Nov-202012426
409-Mar-201123-Jun-2012472

Note that, in the results spreadsheet above, the cells in columns A and B are formatted with a date format, but the cells in column C are formatted with the 'General' format.

Changing Excel Cell Formatting

If the result of your date subtraction is displayed as a date, but you require a simple number, you will need to change the formatting of the results cell, to display the 'General' data type.

The easiest way to do this is to select the General formatting option from the drop-down format menu of the Excel ribbon. This is generally located in the 'Number' group, on the Home tab of the ribbon (see below):

Excel Format Cells Drop Down Menu on Ribbon With General Option Selected