Cal11 calculator

How to Calculate Days Interval in Excel

Reviewed by Calculator Editorial Team

Calculating days interval in Excel is essential for project management, scheduling, and time-based analysis. This guide covers the basic formula, workdays-only calculation, custom day counts, and practical examples.

Basic Days Interval Formula

The simplest way to calculate days between two dates in Excel is to use the DATEDIF function or basic subtraction.

Basic Formula

=B2-A2

Where A2 contains the start date and B2 contains the end date.

This returns the number of days between the two dates. For example, if A2 is 1/1/2023 and B2 is 1/10/2023, the result will be 9.

Note: This formula counts all days, including weekends. For workdays only, use the NETWORKDAYS function.

Workdays Only Formula

To calculate only business days (excluding weekends and holidays), use the NETWORKDAYS function.

Workdays Formula

=NETWORKDAYS(start_date, end_date)

For example: =NETWORKDAYS(A2, B2)

This function automatically excludes Saturdays and Sundays. For holidays, you can add a range of holiday dates as a third parameter.

With Holidays

=NETWORKDAYS(start_date, end_date, holidays_range)

Example: =NETWORKDAYS(A2, B2, C2:C10)

Custom Day Counts

For more complex scenarios, you can use the DATEDIF function to count specific day types.

DATEDIF Function

=DATEDIF(start_date, end_date, "d")

Where "d" counts days, "m" counts months, "y" counts years, and "md" counts days within the month.

For example, =DATEDIF(A2, B2, "d") will return the same result as the basic subtraction method.

Practical Examples

Here are some common scenarios and their Excel formulas:

Example 1: Basic Day Count

Start Date: 5/1/2023
End Date: 5/15/2023
Formula: =B2-A2
Result: 14 days

Example 2: Workdays Only

Start Date: 5/1/2023 (Monday)
End Date: 5/15/2023 (Monday)
Formula: =NETWORKDAYS(A2, B2)
Result: 10 workdays (excluding weekends)

Example 3: With Holidays

Start Date: 12/24/2023 (Saturday)
End Date: 1/1/2024 (Monday)
Holidays: 12/25/2023 (Christmas)
Formula: =NETWORKDAYS(A2, B2, C2)
Result: 1 workday (excluding weekend and holiday)

Frequently Asked Questions

How do I calculate days between two dates in Excel?
Use the basic subtraction formula: =B2-A2 where A2 is the start date and B2 is the end date. This counts all days including weekends.
How do I exclude weekends from the day count?
Use the NETWORKDAYS function: =NETWORKDAYS(start_date, end_date). For holidays, add a range of dates as the third parameter.
What if I need to count specific day types?
Use the DATEDIF function with "d" for days, "m" for months, or "y" for years. For example: =DATEDIF(A2, B2, "d").
Can I calculate days between dates in different months or years?
Yes, all the formulas work regardless of the dates' months or years. Excel automatically handles the date differences.
How do I handle dates that include time components?
Use the INT function to truncate time: =INT(B2)-INT(A2). This counts only full days between the dates.