To calculate the number of days between two dates in Excel, subtract the earlier date from the later date using a simple formula. Enter =B1-A1 where A1 contains the start date and B1 contains the end date. Excel will return the difference as a whole number representing days. If your result displays as a decimal or date format instead of a number, right-click the cell, select "Format Cells," and choose "Number" from the Category list.
For more control, use the DAYS function: =DAYS(B1,A1). This explicitly calculates days between dates and always returns an integer, making it clearer and less prone to formatting issues.
If you need to include both the start and end dates in your count (inclusive), add 1 to either formula: =B1-A1+1 or =DAYS(B1,A1)+1.
You can also use DATEDIF for additional flexibility: =DATEDIF(A1,B1,"D") where "D" specifies days. This function supports other units like months ("M") or years ("Y"), though it works differently across Excel versions and may not be available in all spreadsheet applications.
All these methods assume your cells contain actual date values. If dates are stored as text, Excel won't recognize them as dates. Convert text dates using the DATEVALUE function first: =DAYS(DATEVALUE(B1),DATEVALUE(A1)).
The simplest approach for most users is the subtraction method (=B1-A1) since it's the most straightforward and requires no special function syntax.