How to Use DAYS Function in Excel (7 Examples)

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.

Sample Dataset of Excel DAYS Function

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)

Using DAYS Function to Get Estimated Time

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.

Using DAYS Function to Get Estimated Time

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)

Using the DAYS Function to get Total Days Between Two Dates

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.

Using the DAYS Function to get Total Days Between Two Dates


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))

Using DAYS Function with ABS Function

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.

Using DAYS Function with ABS Function

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.

DAYS Function can Handle Text Format

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.

DAYS Function can Handle Text Format

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


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)

Using VLOOKUP Function with DAYS Function

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)

Using TODAY Function within DAYS Function

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.

Using TODAY Function within DAYS Function


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()

Using TODAY and DAYS Function

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)

Using TODAY and DAYS Function

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.

Using TODAY and DAYS Function


Things to Remember

🔺 String Not Recognized as Date

If you use dates as String (intentionally or unintentionally), you will see the #VALUE error.

Error of Excel DAYS Function

🔺 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.

Error of Excel DAYS Function


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.


Related Articles

Shamima Sultana

Shamima Sultana

Hello! Welcome to my Profile. I am Shamima Sultana Rita. Currently, I'm working as a Project Manager at ExcelDemy. I am doing research on Microsoft Excel and here we will be posting articles related to this. My last educational degree was BSc and my program was in Computer Science and Engineering from East West University-Bangladesh. I am a Computer Science graduate with a great interest in research and development. I love to learn new things. Data Analysis is one of my favorite fields as I love to extract patterns based on problems. Here, I'm trying to provide enriched quality content regarding Excel basics to Advanced. Always try to gather knowledge from various sources and try to make innovative solutions.

We will be happy to hear your thoughts

Leave a reply

5 Excel Hacks You Never Knew

Genius tips to help you unlock Excel's hidden features

FREE EMAIL BONUS

ExcelDemy
Logo