With a start date in A1 and end date in A2: Will return the same result as: Unlike the simple formula above, the DAYS function can also handle dates in text format, as long as the date is recognized by Excel. For example: The DAYS function returns the number of days between two dates. For example: To include the end date in the count, add 1 to the result: Storing and parsing text values that represent dates should be avoided, because it can introduce errors and parsing problems. Working with native Excel dates (which are numbers) is a better approach. To create a numeric date from scratch in a formula, use the DATE function.


The DAYS function only works with whole numbers and ignores time. If dates are not recognized, DAYS returns the #VALUE! error. If dates are out of range, DAYS returns the #NUM! error.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.