Count days between any two dates with inclusive or exclusive rules business day logic custom weekends and holiday files Add or subtract days compare ranges export CSV or PDF copy links and visualize results Built for accuracy speed accessibility and SEO with timezone support and clear explanations for every total. Works with PWA install.
This tool is designed to give accurate day counts across a wide range of real‑world cases—simple calendar differences, business days with custom weekends and holidays, selected weekday tallies, and add/subtract operations that respect your chosen rules. Below is a concise technical explanation so you can validate or reference the math in reports and spreadsheets.
When times are off, each date is normalized to UTC midnight to prevent daylight‑saving irregularities. Let S and E be the normalized start and end. The base span in days is floor((E − S) / 86,400,000). Inclusive options then adjust endpoints:
days = base + (includeStart ? 1 : 0) + ((includeEnd && (!sameDay || !includeStart)) ? 1 : 0).
This yields the expected result for same‑day ranges and long spans alike.
Business days are counted by iterating the dates that survive your inclusive rules, then excluding any day whose weekday matches the selected weekend pattern or whose Y‑M‑D appears in the holiday set. This works for Sat–Sun, Fri–Sat, Thu–Fri, one‑day weekends, or a fully custom mix.
| Mode | What it counts | Notes |
|---|---|---|
| Calendar days | Every date between start and end | Endpoints controlled by “Include start/end.” |
| Business days | Non‑weekend, non‑holiday dates | Custom weekends + upload CSV/ICS holiday files. |
| Selected weekdays | Only the ticked weekdays | Useful for Mon/Wed/Fri schedules or Sundays only. |
| Add/Subtract | Shift end date from start by N days | Respects business‑day logic when enabled. |
With your chosen weekend set (e.g., {Sat, Sun}), the tool classifies every included date as weekday or weekend. Summations are simple tallies after endpoint rules are applied.
| Weekend pattern | Encoded value | Meaning |
|---|---|---|
| Saturday & Sunday | 6,0 | Most regions |
| Friday & Saturday | 5,6 | Common in parts of MENA |
| Thursday & Friday | 4,5 | Some organizations/regions |
| Sunday only | 0 | Treat only Sunday as weekend |
| Saturday only | 6 | Treat only Saturday as weekend |
| Custom | custom | Pick any mix of Mon–Sun |
The ISO‑8601 duration shows a human‑friendly breakdown like PnYnMnDTnHnM derived by progressively accounting for years and months on a UTC calendar, then allocating remaining days and optional hours/minutes. Day‑of‑year (DOY) is the 1‑based index from Jan 1, and ISO week uses the “Thursday rule,” ensuring each week belongs to the year containing its Thursday.
Suppose you set Start = 2025‑01‑10 and End = 2025‑02‑02, include both endpoints, weekend = Sat–Sun, and add holidays: 2025‑01‑26. Calendar days are computed as described above. Weekdays/weekend results classify each date; business days exclude Saturdays, Sundays, and 2025‑01‑26. If you then “Shift by 10” with business mode on, the end date advances by 10 business days, skipping weekends and the holiday.
| Spreadsheet equivalent | Excel / Google Sheets formula | Notes |
|---|---|---|
| Calendar days (inclusive) | DATEDIF(S, E, "d") + 1 | Adjust −1/0/ +1 for your inclusion rules. |
| Business days | NETWORKDAYS.INTL(S, E, weekend_code, holidays) | Weekend code maps to your chosen pattern. |
| Add N business days | WORKDAY.INTL(S, N, weekend_code, holidays) | Returns the shifted date. |
Tip: Use the CSV export for quick audit trails and the date‑list export when you need to enumerate every counted date for compliance, rostering, or ticket SLA verification.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.