Business days between two dates with NETWORKDAYS
NETWORKDAYS counts the working days between two dates, Monday to Friday, minus any holidays you list, and includes both the start and end dates.
=NETWORKDAYS(B2,C2,Holidays!$A$2:$A$15)The sheet: Tickets sheet: column B is Opened date, column C is Closed date. A Holidays tab lists company holidays in A2:A15. Column D shows business days to close.
How it works, step by step
- 01B2 holds the opened date, Monday 2-Nov-2026, and C2 holds the closed date, Friday 13-Nov-2026.
- 02NETWORKDAYS counts every Monday through Friday from B2 to C2, including both ends: 10 days.
- 03It then subtracts any date in Holidays!$A$2:$A$15 that falls on a weekday in that span. With Wednesday 11-Nov-2026 listed as a holiday, the result is 9.
- 04Subtract 1 for elapsed business days instead of an inclusive count. A ticket opened and closed on the same day then shows 0 instead of 1.
The same logic in four tools
=NETWORKDAYS(B2,C2,Holidays!$A$2:$A$15)=NETWORKDAYS(B2,C2,Holidays!$A$2:$A$15)SELECT t.ticket_id,
COUNT(*) FILTER (
WHERE EXTRACT(ISODOW FROM d.day) < 6
AND h.holiday_date IS NULL
) AS business_days
FROM tickets t
CROSS JOIN LATERAL generate_series(
t.opened_date::timestamp,
t.closed_date::timestamp,
INTERVAL '1 day'
) AS d(day)
LEFT JOIN holidays h ON h.holiday_date = d.day::date
GROUP BY t.ticket_id;import numpy as np
import pandas as pd
holiday_days = pd.to_datetime(holidays["holiday_date"]).values.astype("datetime64[D]")
start = pd.to_datetime(tickets["opened_date"]).values.astype("datetime64[D]")
end = pd.to_datetime(tickets["closed_date"]).values.astype("datetime64[D]")
# busday_count excludes the end date, so add one day to match NETWORKDAYS
tickets["business_days"] = np.busday_count(
start, end + np.timedelta64(1, "D"), holidays=holiday_days
)Mistakes that break it
- !NETWORKDAYS counts both the start and end dates, so a ticket opened and closed on the same weekday returns 1. Subtract 1 for elapsed business days.
- !np.busday_count excludes the end date, which is why the pandas version adds one day. It also raises an error on missing dates (NaT), so drop or fill tickets that are still open first.
- !Every value in the holidays range must be a real date. A holiday typed as text makes NETWORKDAYS return #VALUE!.
- !For a different weekend, use NETWORKDAYS.INTL. =NETWORKDAYS.INTL(B2,C2,7,Holidays!$A$2:$A$15) treats Friday and Saturday as the weekend, and a string like "0000011" marks the non-working days from Monday to Sunday.
Common questions
- How do I calculate business days between two dates in Excel?
- Use =NETWORKDAYS(start,end,holidays). It counts Monday to Friday, includes both dates, and skips any dates in the optional holidays range.
- Does NETWORKDAYS include the start date?
- Yes. Both the start and end dates count if they are weekdays, so the same date for both gives 1. Subtract 1 for the number of business days elapsed.
- What is the pandas equivalent of NETWORKDAYS?
- np.busday_count(start, end, holidays=...) on datetime64[D] arrays. It excludes the end date, so add one day to the end to match NETWORKDAYS.
Got a version of this with your own ranges?
Paste it into the free translator and get the same breakdown for your exact formula. To run it against a real file, upload the CSV and describe the formula you need in a sentence.