{
  "id": "deadline",
  "version": "7347d9808902",
  "status": "published",
  "name": "Deadline Calculator",
  "question": "When is my deadline?",
  "summary": "Finds the deadline a number of calendar days or business days after or before a start date, skipping weekends and US federal holidays.",
  "category": "days",
  "subcategory": "dates",
  "url": "https://www.acalculator.org/days/deadline-calculator",
  "markdown": "https://www.acalculator.org/days/deadline-calculator.md",
  "kind": "function",
  "method": "deadline = start date ± the number of days, counting calendar days or only business days (not Saturday, Sunday, or a US federal holiday); a calendar-day deadline on a non-business day moves to the next business day",
  "assumptions": [
    "The start date is day 0 and is not counted: 1 day after Monday is Tuesday.",
    "Business days are Monday to Friday, less the US federal holidays of 5 U.S.C. 6103 on their observed day (Saturday holidays on the Friday before, Sunday holidays on the Monday after) when holidays are skipped.",
    "Court rules, state holidays, and extra days off by executive order are not applied.",
    "The start date is today unless you change it; the page reads today’s date from your device when it loads."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "start": {
        "title": "Start date",
        "description": "The date the count starts from. It is day 0, not counted. Today, unless you change it.",
        "type": "string",
        "format": "date"
      },
      "days": {
        "title": "Number of days",
        "description": "How many days the period has.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000
      },
      "count": {
        "title": "Count",
        "description": "Count every calendar day, or business days only.",
        "type": "string",
        "enum": [
          "calendar",
          "business"
        ]
      },
      "dir": {
        "title": "Direction",
        "description": "Count forward to a deadline after the start date, or back to one before it.",
        "type": "string",
        "enum": [
          "after",
          "before"
        ]
      },
      "holidays": {
        "title": "Skip US federal holidays",
        "description": "Treat the US federal holidays (as observed) as non-business days.",
        "type": "boolean"
      },
      "roll": {
        "title": "Move off weekends and holidays",
        "description": "When a calendar-day deadline falls on a weekend or holiday, move it to the next business day (the previous one when counting back).",
        "type": "boolean"
      }
    }
  },
  "outputs": {
    "deadline": {
      "label": "Deadline",
      "description": "The last day of the period.",
      "format": "date-long"
    },
    "calendarDays": {
      "label": "Calendar days",
      "description": "Calendar days from the start date to the deadline, without a sign.",
      "format": "integer"
    },
    "skipped": {
      "label": "Days skipped",
      "description": "Counting business days: the weekend days and holidays passed over.",
      "format": "integer"
    },
    "movedFrom": {
      "label": "Moved from",
      "description": "The day the calendar-day count ended on, when it was a weekend or holiday and the deadline moved.",
      "format": "date-long"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "start": "2026-09-30",
      "days": 30,
      "count": "calendar",
      "dir": "after",
      "holidays": true,
      "roll": true
    },
    "outputs": {
      "deadline": "2026-10-30",
      "calendarDays": 30
    },
    "text": "Counting 30 days from September 30, 2026 (Calendar days, After), the deadline is Friday, October 30, 2026."
  },
  "examples": [
    {
      "given": {
        "start": "2026-09-30",
        "days": 30,
        "count": "calendar",
        "dir": "after",
        "holidays": true,
        "roll": true
      },
      "expect": {
        "deadline": "2026-10-30",
        "calendarDays": 30
      },
      "source": "hand calculation in content.mdx; Python: date(2026,9,30) + timedelta(30) = 2026-10-30, a Friday"
    },
    {
      "given": {
        "start": "2026-09-30",
        "days": 31,
        "count": "calendar",
        "dir": "after",
        "holidays": true,
        "roll": true
      },
      "expect": {
        "deadline": "2026-11-02",
        "calendarDays": 33,
        "movedFrom": "2026-10-31"
      },
      "source": "IRC 7503 (a last day on a Saturday, Sunday, or legal holiday moves to the next day that is not one): https://www.law.cornell.edu/uscode/text/26/7503; hand calculation in content.mdx"
    },
    {
      "given": {
        "start": "2026-12-18",
        "days": 10,
        "count": "business",
        "dir": "after",
        "holidays": true
      },
      "expect": {
        "deadline": "2027-01-05",
        "calendarDays": 18,
        "skipped": 8
      },
      "source": "OPM federal holidays 2026 and 2027 (https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/); hand calculation in content.mdx"
    },
    {
      "given": {
        "start": "2026-07-10",
        "days": 10,
        "count": "business",
        "dir": "before",
        "holidays": true
      },
      "expect": {
        "deadline": "2026-06-25",
        "calendarDays": 15,
        "skipped": 5
      },
      "source": "OPM federal holidays 2026 (https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/); hand calculation in content.mdx"
    },
    {
      "given": {
        "start": "2026-07-18",
        "days": 14,
        "count": "calendar",
        "dir": "before",
        "holidays": true,
        "roll": true
      },
      "expect": {
        "deadline": "2026-07-02",
        "calendarDays": 16,
        "movedFrom": "2026-07-04"
      },
      "source": "OPM federal holidays 2026 (https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/); hand calculation in content.mdx"
    }
  ],
  "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",
    "26 U.S.C. 7503 (IRC 7503), Time for performance of acts where last day falls on Saturday, Sunday, or legal holiday. https://www.law.cornell.edu/uscode/text/26/7503"
  ],
  "related": [
    "business-days",
    "days-from-today",
    "date",
    "days-between-dates"
  ],
  "changelog": []
}
