Note: The other languages of the website are Google-translated. Back to English
English English

Excel DAYS function

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

doc days function 1


The syntax for the DAYS function in Excel is:

=DAYS (End_date, Start_date)


  • End_date, Start_date: The two dates that calculate the number of days between.


Return a number of days between two dates.


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:


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:


doc days function 3

Note: In this formula, A2 is the past date that you want to calculate the number of days from.


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:


doc days function 5

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

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations