{
  "id": "business-days",
  "version": "cb8b18080265",
  "status": "published",
  "name": "Business Days Calculator",
  "question": "How many business days?",
  "summary": "Counts the business days between two dates: the days that are not Saturdays, Sundays, or US federal holidays, and lists the holidays skipped.",
  "category": "days",
  "subcategory": "dates",
  "url": "https://www.acalculator.org/days/business-days-calculator",
  "markdown": "https://www.acalculator.org/days/business-days-calculator.md",
  "kind": "function",
  "method": "business days = calendar days in the period − Saturdays and Sundays − US federal holidays observed on a weekday in the period",
  "assumptions": [
    "The start date is counted; the end date is counted when “Count the end date” is on (the default).",
    "Weekends are Saturday and Sunday.",
    "Holidays are the 11 US federal holidays of 5 U.S.C. 6103 (Juneteenth from 2021), on the day off: a holiday on a Saturday is observed on the Friday before, and one on a Sunday on the Monday after. Extra days off given by executive order are not counted.",
    "The start date is today unless you change it; the page reads today’s date from your device when it loads.",
    "An end date before the start date has no answer."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "start": {
        "title": "Start date",
        "description": "The first day of the count. It is counted.",
        "type": "string",
        "format": "date"
      },
      "end": {
        "title": "End date",
        "description": "The last day of the count. It is counted when “Count the end date” is on.",
        "type": "string",
        "format": "date"
      },
      "includeEnd": {
        "title": "Count the end date",
        "description": "Count the end date as a day of the period.",
        "type": "boolean"
      },
      "holidays": {
        "title": "Skip US federal holidays",
        "description": "Leave the US federal holidays (as observed) out of the business days.",
        "type": "boolean"
      }
    }
  },
  "outputs": {
    "business": {
      "label": "Business days",
      "description": "Days in the period that are not a Saturday, a Sunday, or (when skipped) a US federal holiday.",
      "format": "integer"
    },
    "calendar": {
      "label": "Calendar days",
      "description": "Every day in the period, weekends and holidays included.",
      "format": "integer"
    },
    "weekend": {
      "label": "Weekend days",
      "description": "Saturdays and Sundays in the period.",
      "format": "integer"
    },
    "holidayCount": {
      "label": "Federal holidays",
      "description": "US federal holidays, on their observed weekday, in the period.",
      "format": "integer"
    },
    "holidayList": {
      "label": "Holidays skipped",
      "description": "The US federal holidays in the period, with their observed dates.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "start": "2026-09-30",
      "end": "2026-10-30",
      "includeEnd": true,
      "holidays": true
    },
    "outputs": {
      "business": 22,
      "calendar": 31,
      "weekend": 8,
      "holidayCount": 1,
      "holidayList": "Columbus Day (October 12, 2026)"
    },
    "text": "From September 30, 2026 to October 30, 2026: 22 business days."
  },
  "examples": [
    {
      "given": {
        "start": "2026-10-01",
        "end": "2026-10-31",
        "includeEnd": true,
        "holidays": true
      },
      "expect": {
        "business": 21,
        "calendar": 31,
        "weekend": 9,
        "holidayCount": 1,
        "holidayList": "Columbus Day (October 12, 2026)"
      },
      "source": "OPM federal holidays 2026 (https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/): Columbus Day, Monday, October 12; hand calculation in content.mdx"
    },
    {
      "given": {
        "start": "2026-06-29",
        "end": "2026-07-10",
        "includeEnd": true,
        "holidays": true
      },
      "expect": {
        "business": 9,
        "calendar": 12,
        "weekend": 2,
        "holidayCount": 1,
        "holidayList": "Independence Day (observed July 3, 2026)"
      },
      "source": "OPM federal holidays 2026 (https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/): Independence Day observed Friday, July 3; 5 U.S.C. 6103; hand calculation in content.mdx"
    },
    {
      "given": {
        "start": "2026-01-01",
        "end": "2026-12-31",
        "includeEnd": true,
        "holidays": true
      },
      "expect": {
        "business": 250,
        "calendar": 365,
        "weekend": 104,
        "holidayCount": 11
      },
      "source": "OPM federal holidays 2026 (https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/): 11 holidays, all on weekdays; hand calculation in content.mdx; Python 3 cross-check in docs/progress/WP-56.md"
    },
    {
      "given": {
        "start": "2026-09-28",
        "end": "2026-10-05",
        "includeEnd": false,
        "holidays": false
      },
      "expect": {
        "business": 5,
        "calendar": 7,
        "weekend": 2,
        "holidayCount": 0
      },
      "source": "hand calculation in content.mdx: Monday to the next Monday, the end date not counted"
    }
  ],
  "sources": [
    "U.S. Office of Personnel Management, Federal Holidays: the holiday dates and the rule for holidays on a weekend. https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/",
    "5 U.S.C. 6103, Holidays: the list of US federal holidays. https://www.law.cornell.edu/uscode/text/5/6103"
  ],
  "related": [
    "days-between-dates",
    "days-from-today",
    "deadline",
    "work-hours"
  ],
  "changelog": []
}
