Excel DAYS function
To calculate the number of days between two given dates, the DAYS function in Excel can help you.
Syntax:
The syntax for the DAYS function in Excel is:
Arguments:
- End_date, Start_date: The two dates that calculate the number of days between.
Return:
Return a number of days between two dates.
Examples:
Example 1: To calculate the number of days between the start date and end date:
Please enter the below formula into a blank cell to get the number of days between two given dates:
Note: In the above formula, B2 is the end date, and A2 is the start date, please change them to your need.
Example 2: To calculate the number of days between today and another day:
Case 1: Calculate the days from today to deadline:
If you want to count the number of days from the current date till a specific date in future, please apply this formula:
Note: In this formula, A2 is the date of the deadline.
Case 2: Calculate the days from past date to today:
To calculate a number of days from today till a date in the past, please enter this formula:
Note: In this formula, A2 is the past date that you want to calculate the number of days from.
Tips:
1. If the start date is greater than the end date, the calculated result will be a negative number as following screenshot shown:
In this case, you can combine the ABS function with the DAYS function to get the positive number regardless of which order the dates are entered, please use this formula:
2. You can also replace the cell references in the above formulas with the date text string, such as:
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.