Count days between dates
count_days_betweenUse this when the user asks how many days are between two dates (days between dates, count days, date calculator), how many business days or working days are between two dates, or days between dates excluding weekends and public holidays for a country or US state. Returns calendar days, weeks and days, years/months/days, business days, and the holidays skipped by name. The start date is counted; set include_end_date=true to also count the end date (Excel NETWORKDAYS style). Does not handle times of day or time zones. Holidays that fall on a weekend are not double-counted, and their observed weekday off (for example US Independence Day 2026 on Saturday is observed Friday July 3) is skipped as a holiday. Results are informational: legal deadlines may have special rules such as court holidays. Do not use for writing SQL or spreadsheet formulas.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | Second date, e.g. 2027-01-15. Also accepts "January 15, 2027" or "today". | |
| start | Yes | First date, preferably YYYY-MM-DD, e.g. 2026-03-03. Also accepts "March 3, 2026", "3 March 2026" or "today". | |
| country | No | Country for public holidays as an ISO 3166 two-letter code, e.g. US, GB, DE, PL, AU, CA, IN. Omit to skip holidays (weekends only). | |
| subdivision | No | Optional state/province/region code within the country for local holidays, e.g. TX or CA (US states), BY (Bavaria, DE), ENG or SCT (UK), NSW (AU), ON (CA). | |
| weekend_days | No | Non-working weekdays, e.g. ["friday","saturday"]. Default saturday+sunday (friday+saturday for countries such as SA, IL, EG, QA, KW). | |
| extra_holidays | No | Extra non-working dates to skip, e.g. company shutdown days ["2026-12-24","2026-12-31"]. | |
| include_end_date | No | Count the end date too (adds one day), e.g. true for 'from Monday through Friday'. Default false. | |
| include_bank_holidays | No | Also skip bank-only closing days where the data has them (e.g. Dec 24 and Dec 31 in Germany). Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| kind | Yes | ||
| notes | Yes | ||
| start | Yes | ||
| weeks | Yes | ||
| inputs | Yes | ||
| months | Yes | ||
| region | Yes | ||
| summary | Yes | ||
| calendar | Yes | ||
| reversed | Yes | ||
| weekend_days | Yes | ||
| business_days | Yes | ||
| calendar_days | Yes | ||
| holiday_source | Yes | ||
| holidays_skipped | Yes | ||
| include_end_date | Yes | ||
| weekend_days_count | Yes | ||
| holidays_on_weekends | Yes |