Skip to main content

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


 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


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.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations