Date & Time Excel 2013 ◉ 14 views

=DAYS()

Returns the number of days between two dates.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=DAYS(end_date, start_date)
Hover argument names in the table for details.
Output typeNumber
Popularity60 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =DAYS() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
📥 Download DAYS.xlsx — Coming soon ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

🧠 🧠 Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
end_date Any type Required Start_date and End_date are the two dates between which you want to know the number of days.
start_date Any type Required Start_date and End_date are the two dates between which you want to know the number of days.

▣ Examples

▦ Data
CellValue
A2 31-DEC-2021
A3 1-JAN-2021
A4 31-DEC-2021
A5 1-JAN-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. =DAYS("15-MAR-2021","1-FEB-2021")
Result: 42
Finds the number of days between the end date in A2 and the start date in A3 (364). =DAYS(A2,A3)
Result: 364

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

✦ Tips

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

⚠ Common Errors

#NUM! If date arguments are numeric values that fall outside the range of valid dates, DAYS returns the #NUM! error value.
Fix: مطمئن شوید شماره سریال تاریخ‌ها در محدوده تاریخ‌های پشتیبانی‌شده اکسل هستند؛ تاریخ‌ها را با تابع DATE وارد کنید.
#VALUE! If date arguments are strings that cannot be parsed as valid dates, DAYS returns the #VALUE! error value.
Fix: Use a real date

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.