Count business days between two dates, excluding public holidays

Delivery estimates, SLA deadlines and invoice due dates are all business-day math, and it's easy to get wrong: weekends are simple, holidays aren't. Observed dates move (a Saturday holiday is observed on Friday in the US and on Monday in the UK), and Easter moves every year.

It's also a classic place for AI assistants to slip. In our tests, gpt-4o-mini said the 10th business day after April 28, 2026 in Japan was May 12 (it's May 18, after Golden Week) every time it was asked. Reasoning models do better, but a tool gives the same exact answer on any model, without paying for reasoning tokens.

Prefer video? · 1:16

Count business days excluding holidays

Working days across Christmas in the US, and a due date after Japan's Golden Week, with the holidays listed.

Make the request

Send your API key in the x-api-key header. Free accounts include 1,000 calls a month.

curl -X POST https://apistack.online/api/utilities/business-days-calculator/v1 \
  -H "x-api-key: $APISTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"startDate":"2026-12-21","endDate":"2027-01-08","excludeHolidays":true,"country":"US"}'
200 OK · response
{
  "success": true,
  "data": {
    "operation": "calculate",
    "input": {
      "startDate": "2026-12-21",
      "endDate": "2027-01-08",
      "excludeHolidays": true,
      "country": "US"
    },
    "output": {
      "businessDays": 13,
      "calendarDays": 19,
      "weekendDays": 4,
      "weekendsExcluded": 4,
      "holidaysExcluded": [
        "2026-12-25",
        "2027-01-01"
      ]
    }
  }
}

Response abridged: some fields (timestamps, metadata) omitted.

Add business days to a date

Use operation "add" with businessDays to get a due date. Negative numbers count backwards, which helps with "must ship 3 business days before" rules. The response lists any holidays it skipped.

{
  "startDate": "2026-12-23",
  "operation": "add",
  "businessDays": 3,
  "excludeHolidays": true,
  "country": "US"
}

returns "resultDate": "2026-12-29", "holidaysSkipped": ["2026-12-25"]

Your own holidays

Company shutdown days or regional holidays go in "holidays" as a list of YYYY-MM-DD dates. They apply with or without excludeHolidays, so you can use them for countries that aren't built in.

Supported countries

National public holidays for US (federal, observed dates), UK (England and Wales bank holidays), CA (federal statutory), AU (national), DE (nationwide), FR and JP. State and provincial holidays aren't included; pass them in "holidays".

Give it to your AI agent

The same API is available as an MCP tool. Add APIStack to Claude, Cursor, VS Code or any MCP client:

{
  "mcpServers": {
    "apistack": {
      "url": "https://apistack.online/api/mcp/connect",
      "headers": { "x-api-key": "YOUR_API_KEY" }
    }
  }
}

Then ask: “How many business days are there between December 21, 2026 and January 8, 2027 in the US, excluding holidays?” See MCP setup for every client.

Related guides