Skip to main content
 

Excel DAYS function

Author: Xiaoyang Last Modified: 2019-06-19

To calculate the number of days between two given dates, the DAYS function in Excel can help you.

doc days function 1


 Syntax:

The syntax for the DAYS function in Excel is:

=DAYS (End_date, Start_date)

 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:

=DAYS( B2, A2)

doc days function 1

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:

=DAYS(A2, TODAY())

doc days function 2

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:

=DAYS(TODAY(), A2)

doc days function 3

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:

doc days function 4

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:

=ABS(DAYS(A2,B2))

doc days function 5

2. You can also replace the cell references in the above formulas with the date text string, such as:

=DAYS("2018/12/24","2018/1/12")

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

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.