T calculate the number of days between two dates you can simply subtract the older date from the newer date. The result will be an integer that represent the days between dates. In the example shown, the formula in D6 is:
The result is 365, since there are 365 days between 1/1/1999 and 1/1/2000.
Note: make sure you format the result with the General number format.
How this formula works
Dates in Excel are simply serial numbers that start on 1/1/1900.
In the example, the formula in cell D6 simply subtracts the numeric value of 1/1/1999 (36161) from the numeric value of 1/1/2000 (36526) to get a result of 365. The steps look like this:
Working with today
If you need to calculate the number of days between an earlier date and today, use:
To calculate the number of workdays between two dates, you can use the NETWORKDAYS function. NETWORKDAYS automatically excludes weekends, and it can optionally exclude a custom list of holidays as well. For example, if you have the date January 4,...
The Excel TODAY function returns the current date, updated continuously when a worksheet is changed or opened. The TODAY function takes no arguments. You can format the value returned by TODAY using any standard date format. If you need current...
The Excel DAYS function returns the number of days between two dates. With a start date in A1 and end date in B1, =DAYS(B1,A1) will return the days between the two dates.
Excel Formula Training
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.