In the Excel sheet, we store the progress of various work and projects. To track those projects or get any estimated time you can use the DAYS function. Excel DAYS function is used to calculate the number of days between two dates.
In this article, I will show you various examples by using the Excel DAYS function.
Download to Practice
Basics of DAYS Function: Summary & Syntax
Summary
The DAYS function returns the number of days between two dates.
Syntax
DAYS (end_date, start_date)
Arguments
  Arguments |    Required/Optional | Explanation |
---|---|---|
end_date | Required | It is a date in a format where Excel recognizes it as a date-time serial number or text. |
start_date | Required | It is a date in a format where Excel recognizes it as a date-time serial number or text. |
Return Value
The DAYS function returns a number that represents the total days between two dates.
Version
The DAYS function is available for Excel 2013 and later versions.
7 Examples of Excel DAYS Function
1. Using Excel DAYS Function to Get Estimated Time
To know the number of days to completion for any particular work or project you can use the DAYS function.
Here, I want to know the total number of days was needed to complete the project Stream Ray from its Start Date and End Date using DAYS.
In the cell E4, I used the following formula,
=DAYS(D4,C4)
Here, the D4 cell has the end_date and the C4 cell has the start_date.
Now, press the ENTER key. As a result, the DAYS function will return the number of days between the two dates.
Following the same process or by using the Fill Handle you can get the number of days has taken to complete other projects also.
Read More: How to Use DAY Function in Excel (With 3 Examples)
2. Total Days Between Two Dates
While finding total days between two days, the DAYS function may return a negative value if you place the earlier date as end_date and the later date as start_date.
Here, to get the number of days has taken to complete the project I was supposed to use the formula
=DAYS(D4,C4)
But I used the following formula,
=DAYS(C4,D4)
Here, the C4 cell has the Start Date but, in the formula, I put the start date as end_date and the D4 cell has the End Date but in the formula, I put it as start_date.
Now, press the ENTER key. Hence, the DAYS function will return the number of days between the two dates.
Following the same process or by using the Fill Handle you can get the number of days has taken to complete other projects also.
3. Using DAYS Function with ABS Function
To avoid negative values, you may use the ABS function with the DAYS function, then you will need to worry about the recent and end date of a project.
In the cell E4, I used the following formula,
=ABS(DAYS(C4,D4))
Here, the C4 cell has the Start Date but, in the formula, I put the start date as end_date and the D4 cell has the End Date but, in the formula, I put it as start_date. Then, used the ABS function was to return the absolute value while ignoring the negative sign.
Now, press the ENTER key. Thus, the DAYS function will return the number of days between the two dates.
Following the same process or by using the Fill Handle you can get the number of days has taken to complete other projects also.
Read More: How to Use the Excel DAYS Function with a Practical Example
4. Excel DAYS Function Can Handle Text Format
The DAYS function can handle text values. In case your dates are formatted as text so you can use the DAYS function to get the number of days between two text formatted dates.
Here, I formatted the dates as text.
In the cell E4, I used the following formula,
=DAYS(D4,C4)
Here, the D4 cell has the end_date and the C4 cell has the start_date.
Now, press the ENTER key. Therefore, the DAYS function will return the number of days between the two dates.
Following the same process or by using the Fill Handle you can get the number of days has taken to complete other projects also.
Similar Readings
- How to Use TIMEVALUE Function in Excel (4 Examples)
- Use WEEKNUM Function in Excel (2 Ways)
- How to Auto-Update Current Time in Excel (With Formula and VBA)
- Use WORKDAY.INTL Function in Excel (A Complete Guideline)
- How to Use NETWORKDAYS.INTL Function in Excel (2 Examples)
5. Using VLOOKUP Function with DAYS Function
You can use the VLOOKUP function with the DAYS function to get the number of days between two dates.
The VLOOKUP function will lookup any particular value then the DAYS function will return the number of days between the lookup date and the date you want to use.
In the cell G4, I used the following formula,
=DAYS(VLOOKUP(F4,B4:D10,1, FALSE),C4)
Here, in the VLOOKUP function, I have taken the F4 cell as lookup_value, taken the range B4:D10 as table_array, used 1 as col_index_num then used FALSE as range_lookup to get the Exact Match. Finally, it will return the value I’m looking for.
Then the DAYS function will return the total number of days between the looked_up date which is cell F4 and the date of the C4 cell.
Now, press the ENTER key. Hence, the DAYS function will return the number of days between the two dates.
6. Using TODAY Function within DAYS Function
You can use the TODAY function within the DAYS function to get the update of any work or any project.
In the cell D4, I used the following formula,
=DAYS(TODAY(),C4)
Here, from the TODAY function will get the date of today and I used it as end_date
Then, used the C4 cell as start_date in the DAYS function.
Now, press the ENTER key. Thus, the DAYS function will return the number of days between the two dates.
Following the same process or by using the Fill Handle you can get the number of days has taken to complete other projects also.
7. Using Excel TODAY and DAYS Function
You may use an alternate way to get the recent updates of any work or project by using the TODAY and the DAYS function.
First, you the TODAY function to get today’s date.
In Cell D4, type the following formula.
=TODAY()
Here, the TODAY function will return the date of today.
Press, the ENTER key, then you will get the date of today.
Now, using the DAYS function to get the number of days between the existing date and today’s date.
In Cell D4, type the following formula.
=DAYS(D4,C4)
Here, the D4 cell has the end_date which is today’s date and the C4 cell has the start_date.
Now, press the ENTER key. Therefore, the DAYS function will return the number of days between the two dates.
Following the same process or by using the Fill Handle you can get the number of days has taken to complete other projects also.
Things to Remember
🔺 String Not Recognized as Date
If you use dates as String (intentionally or unintentionally), you will see the #VALUE error.
🔺 Date Out of Valid Range
Using a date outside the valid date, you will see the #NUM error.
The valid date range dates from 1900 to 10000 years.
Here, all dates are out of valid range that’s why it is showing an error.
🔺 Misspelling Function Name
The #NAME will occur if you misspell any function name or formula. Here, I typed the formula name incorrectly, instead of DAYS I typed DA so it is showing the #NAME error.
Practice Section
I’ve provided a practice sheet in the workbook to practice these explained examples.
Conclusion
In this article, I have shown 7 examples of the Excel DAYS function. I also tried to cover the types of errors the DAYS function may show frequently. Last but not least, if you have any kind of suggestions, ideas, or feedback please feel free to comment down below.