Working Days Between Two Dates

Excludes weekends and public holidays for any country. Free tool for humans, REST API for developers.

How it works

1

Pick dates & country

Select start date, end date, and the country you want to check.

2

We fetch public holidays

holidays.rest API returns all official public holidays for that country and year range.

3

Count working days

We subtract weekends (Sat/Sun) and public holidays from the total calendar days.

Integrate working day calculation in your app

One API call per year, per country. Filter and count in your own code.

cURL — fetch holidays

curl -X GET \
  "https://api.holidays.rest/v1/holidays?country=DE&year=2026" \
  -H "Authorization: Bearer YOUR_API_KEY"

JavaScript — full example

async function workingDaysBetween(start, end, country, region) {
  const years = getYears(start, end); // e.g. [2026, 2027]
  const holidayDates = new Set();

  for (const year of years) {
    const res = await fetch(
      `https://api.holidays.rest/v1/holidays?country=${country}&year=${year}`,
      { headers: { Authorization: 'Bearer YOUR_API_KEY' } }
    );
    const data = await res.json();
    data
      .filter(h => !h.regions?.length || h.regions.includes(region))
      .forEach(h => {
        if (h.date >= start && h.date <= end) holidayDates.add(h.date);
      });
  }

  let count = 0;
  const cur = new Date(start);
  const endDate = new Date(end);
  while (cur <= endDate) {
    const dow = cur.getDay();
    const ds = cur.toISOString().split('T')[0];
    if (dow !== 0 && dow !== 6 && !holidayDates.has(ds)) count++;
    cur.setDate(cur.getDate() + 1);
  }
  return count;
}

// Example: workingDaysBetween('2026-01-01', '2026-12-31', 'DE', 'BE')