Function: DAYS()
📘 Definition:
The DAYS() function calculates the number of days between two dates.
It helps in finding the duration or gap between a start date and an end date — for example, the number of days between two billing dates, project timelines, or student admissions.
🧩 Syntax: DAYS(end_date, start_date)
-
end_date → The ending date of the period
-
start_date → The starting date of the period
🧠 Example (Indian Perspective):
| Start Date | End Date | Formula | Result |
|---|---|---|---|
| 01-Apr-2024 | 30-Jun-2024 | =DAYS(B2,A2) |
90 |
| 15-Aug-2024 | 26-Jan-2025 | =DAYS(B3,A3) |
164 |
| 01-Jan-2025 | 31-Mar-2025 | =DAYS(B4,A4) |
89 |
This shows how many days are between important Indian timeline examples (like quarterly accounting periods or national events).
🪜 Step-by-Step Explanation:
-
Suppose A2 =
01-Apr-2024, B2 =30-Jun-2024 -
Formula →
=DAYS(B2, A2) -
Excel calculates the difference:
30-Jun-2024 – 01-Apr-2024 = 90 days -
Output → 90
If the start date is after the end date, Excel returns a negative number.
💡 Tip:
If your dates are stored as text, convert them using DATEVALUE() before using DAYS():
🎯 Why It’s Useful:
-
To calculate durations between admission, due, or expiry dates.
-
For project management or student EMI period tracking.
-
To find how long someone has worked or studied.
🧑💻 Project Task 1: Student Admission to Course Completion Duration
| Student ID | Admission Date | Course Completion Date | Course Duration (Days) |
|---|---|---|---|
| S101 | 01-Apr-2024 | 30-Sep-2024 | |
| S102 | 15-May-2024 | 15-Nov-2024 | |
| S103 | 10-Jun-2024 | 10-Dec-2024 | |
| S104 | 01-Jul-2024 | 31-Dec-2024 |
👉 Tasks:
-
Use
=DAYS(C2, B2)to calculate Course Duration (Days). -
Format the result as a number.
-
Identify which student had the longest course duration.
🧑💻 Project Task 2: Payment Due Days Calculation
| Invoice ID | Invoice Date | Payment Received Date | Days Difference |
|---|---|---|---|
| INV001 | 01-Apr-2024 | 10-Apr-2024 | |
| INV002 | 15-Apr-2024 | 25-Apr-2024 | |
| INV003 | 05-May-2024 | 20-May-2024 | |
| INV004 | 25-May-2024 | 10-Jun-2024 |
👉 Tasks:
-
Calculate the number of days between Invoice Date and Payment Received Date using
DAYS(). -
Highlight all records where payment was made after 10 days using Conditional Formatting.