DAYS Function - Microsoft Support
Maybe your like
This article describes the formula syntax and usage of the DAYS function in Microsoft Excel. For information about the DAY function, see DAY function.
Description
Returns the number of days between two dates.
Syntax
DAYS(end_date, start_date)
The DAYS function syntax has the following arguments.
-
End_date Required. Start_date and End_date are the two dates between which you want to know the number of days.
-
Start_date Required. Start_date and End_date are the two dates between which you want to know the number of days.
Note: Excel stores dates as sequential serial numbers so that they can be used in calculations. By default, Jan 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39447 days after January 1, 1900.
Remarks
-
If both date arguments are numbers, DAYS uses EndDate–StartDate to calculate the number of days in between both dates.
-
If either 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, DAYS returns the #NUM! error value.
-
If date arguments are strings that cannot be parsed as valid dates, DAYS returns the #VALUE! error value.
Example
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.
| Data | ||
|---|---|---|
| 31-DEC-2021 | ||
| 1-JAN-2021 | ||
| Formula | Description | Result |
| =DAYS("15-MAR-2021","1-FEB-2021") | Finds the number of days between the end date (15-MAR-2021) and start date (1-FEB-2021). When you enter a date directly in the function, you need to enclose it in quotation marks. Result is 42. | 42 |
| =DAYS(A2,A3) | Finds the number of days between the end date in A2 and the start date in A3 (364). | 364 |
Top of Page
Need more help?
Want more options?
DiscoverCommunityExplore subscription benefits, browse training courses, learn how to secure your device, and more.
Microsoft 365 subscription benefits
Microsoft 365 training
Microsoft security
Accessibility center
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.
Ask the Microsoft Community
Microsoft Tech Community
Windows Insiders
Microsoft 365 Insiders
Was this information helpful?
Yes No (Send feedback to Microsoft so we can help.) What affected your experience? Resolved my issue Clear instructions Easy to follow No jargon Pictures helped Other Didn't match my screen Incorrect instructions Too technical Not enough information Not enough pictures Other Any additional feedback? (Optional) Submit feedback By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.Thank you for your feedback!
×Tag » How Many Days Till January 1
-
How Many Days Until 1st January?
-
How Many Days Until 1 January - Calendarr
-
Countdown To 1 January - Calendarr
-
How Many Days Until 1 January? - CALC-ULATOR.COM
-
Countdown To Jan 1, 3000 12:00:01 Am In New York - Time And Date
-
Countdown To Jan 1, 2027 12:01:01 Am In New York - Time And Date
-
Countdown To Jan 1, 3999 1:01:01 Am In New York
-
Countdown To Jan 1, 2023 3:03 Am In New York - Time And Date
-
How Many Days Until 1 January
-
How Many Days Until 1st January 2050?
-
How Long Until January 1st 3000?
-
Academic Calendar - MOE
-
What's The Current Day Number? - Epoch Converter
-
How Many Days Are There Between Two Dates?