Excel Workday Difference Between Two Dates

Formulas & functions · Updated November 19, 2026

In Excel for Microsoft 365 on Windows, use =NETWORKDAYS(A2,B2) to count working days from the start date in A2 through the end date in B2, including both dates when they are weekdays. Add a holiday range as a third argument to exclude specific dates; if you mean the number of workdays elapsed after the start date, use a slightly different formula.

The basic workday formula

NETWORKDAYS is Excel’s standard function for counting weekdays between two dates when Saturday and Sunday are the weekend. It excludes those weekend days and, optionally, dates listed as holidays. The basic syntax is NETWORKDAYS(start_date,end_date,[holidays]); the square brackets in that description mean the holidays argument is optional, not that you should type brackets into the formula.

With the start date in A2 and the end date in B2, enter =NETWORKDAYS(A2,B2) in another cell. For example, if A2 is Monday, February 2, 2026, and B2 is Friday, February 6, 2026, the result is 5: Monday, Tuesday, Wednesday, Thursday, and Friday. Saturday and Sunday are not counted. This is the right formula when your reporting convention counts both endpoint dates if they are working days.

To exclude holidays, put actual Excel date values in D2:D10. With the start date in A2, the end date in B2, and holiday dates in D2:D10, use =NETWORKDAYS(A2,B2,$D$2:$D$10). The dollar signs keep the holiday range fixed if you copy the formula down. If February 4, 2026, is listed as a holiday in that range, the February 2–6 example returns 4 rather than 5.

What “between two dates” counts

A common source of confusion is that “difference” can mean either a count of working dates in an interval or the number of working days that have elapsed from one date to another. NETWORKDAYS uses an inclusive count: it considers the start and end dates themselves. If both are weekdays, both can contribute to the result. That makes it useful for staffing schedules, date ranges, and service periods where the first and last days are included.

For elapsed time, people often want to exclude the starting date and count only working dates after it through the end date. With the start date in A2, the end date in B2, and holidays in D2:D10, use =IF(A2=B2,0,NETWORKDAYS(A2+1,B2,$D$2:$D$10)), assuming A2 is on or before B2. From Monday, February 2, to Friday, February 6, 2026, this returns 4: Tuesday through Friday. If the dates are the same, it returns zero. If the start date is a weekend, adding one still begins the count after that calendar date, and NETWORKDAYS skips any remaining weekend day.

There is no single universal convention for a “business-day difference.” A project tracker might count the start and finish dates because both involve work, while an elapsed-time report may exclude the start date. Decide which convention matches the question before comparing results. For a plain calendar-day difference, subtract the earlier date from the later one; that calculation includes elapsed calendar days, not just working days.

Set up dates and holiday data correctly

Excel needs real date values for dependable date calculations. A cell can display a date while containing text that only looks like a date, especially after data is imported or copied from another system. If a formula returns an error or an unexpected number, check that the start date, end date, and holidays are recognized as dates. Select the cells and use Home > Number to choose a date format; changing the format changes how a value appears, but does not by itself convert text into a date.

A practical worksheet layout is:

  • Column A: start dates, beginning in A2.
  • Column B: end dates, beginning in B2.
  • Column C: the workday formula and result.
  • Column D: a holiday list, with one actual date per cell.

Enter the formula in C2 and fill it down for the other rows. Keep the holiday list in a consistent, easy-to-maintain place. A date in the list only needs to appear once; duplicate holiday entries do not subtract that same weekday repeatedly. Dates that fall on a weekend do not change the count because that date was already excluded as a weekend.

If some rows may not have dates yet, a formula can leave the result blank until both inputs are present. With start dates in A2, end dates in B2, and holidays in D2:D10, use =IF(OR(A2="",B2=""),"",NETWORKDAYS(A2,B2,$D$2:$D$10)). This prevents a blank input from being treated as a date in a way that produces a misleading result. The formula returns an empty display when either date cell is blank and calculates the inclusive count once both contain dates.

Exclude holidays and closures

The optional holidays argument can be a cell range or a list of date values. A range is usually easier to manage because you can update the list without editing every formula. For instance, with dates in A2 and B2 and the organization’s holiday calendar in D2:D10, =NETWORKDAYS(A2,B2,$D$2:$D$10) counts weekdays in the interval and removes any listed holiday that falls within it.

Consider a longer example: February 2 through February 10, 2026, includes seven weekdays—February 2–6 and February 9–10. If February 4 is in the holiday list, the result is 6. A holiday outside the date interval has no effect. Keep in mind that Excel does not know your organization’s official closure calendar automatically; you must supply the dates that should be excluded. The correct list depends on the country, region, employer, or project rules in use.

If dates in the holiday range are stored as text, or if the range misses a closure, the result may be wrong even though the formula is syntactically valid. Check the values and confirm that the holiday list covers the full period being reported. For recurring calculations, maintain one central holiday table rather than typing a different list for each row.

Use a nonstandard weekend

For work schedules that do not use Saturday and Sunday as the weekend, use NETWORKDAYS.INTL. It has the form NETWORKDAYS.INTL(start_date,end_date,[weekend],[holidays]). The weekend argument lets you define which days are nonworking, while the optional holidays argument continues to accept dates to exclude.

With start date in A2, end date in B2, and holidays in D2:D10, this formula defines Friday and Saturday as the weekend: =NETWORKDAYS.INTL(A2,B2,"0000110",$D$2:$D$10). The seven-character weekend string starts with Monday and ends with Sunday; a 1 marks a nonworking day and a 0 marks a working day. In this example, Friday and Saturday are marked as nonworking, while Sunday through Thursday are working days. Check the order carefully, since a misplaced digit changes the schedule.

NETWORKDAYS.INTL is also useful for rotating or unusual schedules only when the weekend pattern can be represented by the function’s weekly weekend setting. It does not describe every employee’s individual roster or alternating shifts. For a schedule that changes from week to week, a separate calendar of working dates may be more suitable than a fixed weekend pattern.

Choose the right calculation

Use the formula that matches the business question, not simply the one that gives the most familiar-looking number:

  • Inclusive working-date count: use NETWORKDAYS for Saturday–Sunday weekends, or NETWORKDAYS.INTL for a different regular weekend. This counts eligible start and end dates.
  • Elapsed workdays after the start: count from the day after the start date, for example with NETWORKDAYS(A2+1,B2) when the date order and endpoint convention are clear. Add a holiday range if needed.
  • Calendar-day difference: subtract one date from the other, such as =B2-A2 with the earlier date in A2. This includes weekends and holidays in elapsed calendar time.
  • Working hours or partial shifts: use a time-based calculation and explicit work schedules. A whole-day workday count does not calculate hours spent on a task.

For example, a Monday-to-Friday interval has an inclusive workday count of 5 but an elapsed difference of 4 calendar days. A Monday-to-next-Monday interval has an inclusive workday count of 6, while the calendar dates are seven days apart. These figures answer different questions, so label a result column clearly—for example, “Workdays inclusive” or “Elapsed workdays”—to prevent readers from assuming the wrong convention.

Common errors and checks

If a result is one day higher or lower than expected, first check whether the formula includes both endpoints. Then verify the weekend pattern, holiday range, and whether each input is a true date. Also confirm that the start and end cells contain the intended dates and have not been swapped. When the start date is later than the end date, Excel can return a negative count; if direction does not matter and you specifically want a positive magnitude, wrap the calculation in ABS, such as =ABS(NETWORKDAYS(A2,B2)). Do not use ABS if the sign carries meaning in your report.

Another issue is date-and-time values. NETWORKDAYS is intended to count dates, not measure business hours between timestamps. If cells contain timestamps and you mean to treat each timestamp as its calendar date, explicitly remove the time portion. With timestamp values in A2 and B2, use =NETWORKDAYS(INT(A2),INT(B2)) for an inclusive weekday count. This does not calculate elapsed hours, account for lunch breaks, or handle a shift that crosses midnight.

Finally, remember that a formula result is a number, even if the cells used for input are formatted as dates. Format the result cell as General or Number if it appears as a date. Excel’s display format affects what you see, not the underlying count. If a formula is shown literally instead of calculating, check whether the cell is formatted as Text or whether Show Formulas is enabled, then correct the cell and re-enter the formula.

Frequently Asked Questions

Does NETWORKDAYS count the start and end dates?
Yes. It counts both endpoints when they are weekdays and are not listed as holidays. If you need to exclude the start date, adjust the formula to begin on the following date.

How do I count workdays between two dates excluding holidays?
Put the holiday dates in a range, then use that range as the third argument, such as =NETWORKDAYS(A2,B2,$D$2:$D$10) when the dates are in A2 and B2 and holidays are in D2:D10.

How can I change the weekend days in Excel?
Use NETWORKDAYS.INTL and set its weekend argument. For example, the string "0000110" marks Friday and Saturday as nonworking days, with Monday in the first position.

Why is my workday result off by one?
The most common reason is inclusive counting: NETWORKDAYS counts a working start date as well as a working end date. Also check holidays, weekend settings, date values stored as text, and whether the desired answer is elapsed days rather than an inclusive count.

Can Excel calculate business hours between two timestamps?
NETWORKDAYS returns a count of whole working dates, not working hours. Business-hour calculations need start and end times plus defined work hours, breaks, holidays, and weekend rules; a simple workday count cannot provide that detail.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.