How to count days in Excel?
October 7, 2022
When we work with Microsoft Excel, suddenly we need something that we do not know just a few seconds earlier. Surprisingly, whatever you need there is a solution in Microsoft Excel. If you need to count days there is a fantastic solution for it also. In this feature, we will discuss counting days, weeks, and months using Excel functions.
How to count days in Excel?
This function returns the number of days between two dates.
Following are the arguments of the DAYS function
- end_date (required)– Up to which date you want to know the number of days.
- start_date (required)– From the date, you want to know the number of days.
Remember that Microsoft Excel starts counting dates from January 1, 1900, and the value is stored. Any dates before January 1, 1900, will not be calculated by this formula.
Read More: Average formula in excel – AVERAGE function
Conditions
- if both date arguments are numbers, the function usages (EndDate–StartDate) to calculate the difference.
- If any one of the date arguments is text, that argument is treated as DATEVALUE(date_text) and returns an integer date instead of a time component.
- if date arguments are numeric values that fall outside the range of valid dates, the function returns the #NUM! error value.
- If date arguments are strings that cannot be parsed as valid dates, the function returns the #VALUE! error value.
- If the start date is greater than the end date then the function returns with a negative value.
Count days in Excel using the DAYS function
Let’s calculate the days of the following dates.
Solutions with DAYS function
An alternative way to count days
You can count the days by deduction of two dates
Count days in Excel using the DATEDIF function
You can count days between two dates in another way using the DATEDIF function. This function is specially designed for calculating the difference between days, weeks, and years.
Following are the arguments of the DAYS function
- start_date (required)– From the date, you want to know the number of days.
- end_date (required)– Up to which date you want to know the number of days.
- “d” returns the number of full days between the two dates.
Day Count in Excel using the DATEDIF function
Week Count in Excel using the DATEDIF function
Note that this result also needs to be formatted. Press CTRL + 1, then click Number > Decimal places: 2.
Month Count in Excel using the DATEDIF function
The following are the arguments:
- start_date (required)– From the date, you want to know the number of days.
- end_date (required)– Up to which date you want to know the number of days.
- the “m” returns the number of full months between the two days.
Year Count in Excel using the DATEDIF function
The following are the arguments:
- start_date (required)– From the date, you want to know the number of days.
- end_date (required)– Up to which date you want to know the number of days.
- The “y” returns the number of full years between the two days.
How to calculate working days between two dates in Excel
The following are the arguments:
- start_date (required)– From the date, you want to know the number of days.
- end_date (required)– Up to which date you want to know the number of days.
- holidays (Optional)– Allows excluding a custom list of holidays from the day count.
If you want to deduct a custom holiday then you can add a custom holiday list.
How to calculate the number of days between today and another date
This is a little bit tricky. You can do it in two ways. One method I already discussed before type today’s date as end_date then use the DAYS function.
Another method, you can use the TODAY function, instead of end_dates.
How to count days in Excel? I hope you have received your answer. If you have any more queries please let us know. We will reply to your comment.
0 Comments