If you want to calculate a date difference in Excel, it is useful to understand that dates in Excel are stored as simple integers. It is only the formatting of the cell that causes the value to be displayed as a date, rather than as a simple number.
The numbering system used for Excel dates varies with different computer systems, but most commonly, the number 1 represents the date 01Jan1900, the number 2 represents 02Jan1900, ... , the number 40544 represents 01Jan2011, etc.
Therefore, when you want to calculate a date difference in Excel, you can simply subtract the two dates, in the same way as you would subtract any other numerical values in Excel. The resulting value tells you the number of days between the two dates. This is shown in the example below.
Cell B3 of the following spreadsheet shows a simple example of a date difference in Excel. The calculation simply subtracts the date in cell B1 from the date in cell B2.
The formula used is shown in the spreadsheet on the left and the result is shown in the spreadsheet on the right.
Formulas:

Results:

In the example above, the date in cell B1 is internally represented by the number, 40470 and the date in cell B2 is internally represented by the number 40574. Subtracting these two numbers gives the result 104.
I.e. There are 104 days between the dates 19Oct2010 and 31Jan2011.
When you calculate a date difference in Excel the cell containing the result should display an integer. If not, this may be due to incorrect formatting of the cell.
In this case, you will need to format the cell to have the Excel 'General' format. To do this: