Excel Calculate Business Days Between Two Dates

Business Day Calculator

Quickly find out the number of business days between two dates, optionally excluding custom holidays.

Mastering Business Day Calculations in Excel

When planning projects, managing deadlines, or tracking work progress, knowing the exact number of business days between two dates is crucial. Excel offers powerful functions to handle this, moving beyond simple date subtraction to account for weekends and even custom holidays. This guide will walk you through the essential Excel functions and provide a handy online calculator for quick checks.

The NETWORKDAYS Function: Your Basic Tool

The primary function for calculating business days in Excel is NETWORKDAYS. It returns the number of whole working days between two dates. By default, it excludes Saturdays and Sundays and can optionally exclude specified holidays.

Syntax:

NETWORKDAYS(start_date, end_date, [holidays])

  • start_date (required): The start date.
  • end_date (required): The end date.
  • holidays (optional): An optional range of one or more dates to exclude from the working calendar.

How it Works:

Excel stores dates as serial numbers. NETWORKDAYS counts the number of days between start_date and end_date, then subtracts any Saturdays, Sundays, and dates listed in the holidays argument. Both the start and end dates are included in the count if they are business days.

Example:

Suppose you want to find the business days between January 1, 2024, and January 31, 2024, with January 1st and January 15th as holidays.

  1. Enter "2024-01-01" in cell A1.
  2. Enter "2024-01-31" in cell B1.
  3. Enter "2024-01-01" in cell C1.
  4. Enter "2024-01-15" in cell C2.
  5. In a new cell, type: =NETWORKDAYS(A1, B1, C1:C2)

The result will be 21 business days. (January 1st is a Monday, January 15th is a Monday. In January 2024, there are 23 weekdays. Subtracting 2 holidays gives 21).

NETWORKDAYS.INTL: Customizing Your Weekends

While NETWORKDAYS is excellent, it assumes a standard Monday-Friday work week. What if your work week is different? This is where NETWORKDAYS.INTL comes in. This function allows you to specify which days are considered weekends.

Syntax:

NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])

  • start_date (required): The start date.
  • end_date (required): The end date.
  • weekend (optional): A number or string that specifies which days are weekend days.
  • holidays (optional): An optional range of one or more dates to exclude.

Weekend Argument Codes:

The weekend argument can be a number:

  • 1 or omitted: Saturday, Sunday (default)
  • 2: Sunday, Monday
  • 3: Monday, Tuesday
  • 4: Tuesday, Wednesday
  • 5: Wednesday, Thursday
  • 6: Thursday, Friday
  • 7: Friday, Saturday
  • 11: Sunday only
  • 12: Monday only
  • 13: Tuesday only
  • 14: Wednesday only
  • 15: Thursday only
  • 16: Friday only
  • 17: Saturday only

Alternatively, you can use a string of seven 0s and 1s, where the first digit is Monday. 0 means a working day, and 1 means a non-working day. For example, "0000011" means Saturday and Sunday are weekends.

Example with Custom Weekend:

Let's calculate business days between the same dates, but assume your weekend is Friday and Saturday (code 7).

  1. Using cells A1, B1, C1, C2 as before.
  2. In a new cell, type: =NETWORKDAYS.INTL(A1, B1, 7, C1:C2)

The result would be different, reflecting the custom weekend days.

Defining Your Holiday List

For both functions, the holidays argument is crucial for accurate calculations. You can define your holidays in a few ways:

  • As a range of cells: The most common method. List all your holiday dates in a column or row, then reference that range (e.g., C1:C10).
  • As an array constant: You can directly enter holiday dates into the formula using curly braces, like {"2024-01-01", "2024-07-04"}. Remember to use quotation marks for each date string.

Ensure your holiday dates are valid Excel dates. Using the YYYY-MM-DD format within cells is generally safe.

Common Pitfalls and Best Practices

  • Date Format: Always ensure your start, end, and holiday dates are recognized by Excel as actual dates, not text.
  • Inclusive Counting: Both NETWORKDAYS and NETWORKDAYS.INTL include the start and end dates in the count if they fall on a business day.
  • Empty Holiday List: If the holidays argument is omitted or refers to an empty range, the functions will simply count business days based on weekends.
  • Start Date After End Date: If your start_date is later than your end_date, the functions will return a negative number, indicating the number of business days in reverse.

Beyond Excel: The Online Calculator

While Excel is a powerful tool, sometimes you need a quick calculation without opening a spreadsheet. Our online Business Day Calculator above provides an instant way to determine business days, allowing you to specify start and end dates and custom holidays, just like Excel's functions.

Conclusion

Whether you're a project manager, HR professional, or just need to plan your time effectively, Excel's NETWORKDAYS and NETWORKDAYS.INTL functions are indispensable. By understanding their syntax and how to use the optional holiday and weekend arguments, you can accurately calculate business days for any scenario, streamlining your planning and analysis.