{
  "id": "work-hours",
  "version": "4e5bf042548a",
  "status": "published",
  "name": "Work Hours Calculator",
  "question": "How many work hours in my shift?",
  "summary": "Computes the hours worked in a shift after an unpaid break, the hours a week and a year, and the weekly pay with overtime after 40 hours.",
  "category": "days",
  "subcategory": "time-and-hours",
  "url": "https://www.acalculator.org/days/work-hours-calculator",
  "markdown": "https://www.acalculator.org/days/work-hours-calculator.md",
  "kind": "function",
  "method": "hours per shift = (end − start, plus 24 hours when the end is earlier, − break) ÷ 60; hours per week = hours per shift × shifts; pay = rate × min(week, 40) + 1.5 × rate × max(0, week − 40).",
  "assumptions": [
    "An end time earlier than the start time is on the next day, so a shift is under 24 hours.",
    "The break is unpaid and is taken off every shift. A break longer than the shift gives no answer; a break as long as the shift gives 0 hours (as on the time card).",
    "Overtime follows the federal Fair Labor Standards Act: hours over 40 in a workweek are paid at 1.5 times the regular rate. Daily overtime rules (for example in California) are not included.",
    "A year is 52 weeks. Pay is before tax.",
    "Clock changes for daylight saving time are not counted."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "start": {
        "title": "Shift starts",
        "description": "The time the shift starts.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "end": {
        "title": "Shift ends",
        "description": "The time the shift ends. A time earlier than the start is on the next day.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "break": {
        "title": "Unpaid break (minutes)",
        "description": "Unpaid break time in the shift, in minutes.",
        "type": "integer",
        "minimum": 0,
        "maximum": 1440
      },
      "days": {
        "title": "Shifts a week",
        "description": "How many of these shifts you work each week.",
        "type": "number",
        "minimum": 0.5,
        "maximum": 7
      },
      "rate": {
        "title": "Hourly pay",
        "description": "Your regular pay per hour, to work out weekly pay. Leave it empty to skip pay.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 10000
      }
    }
  },
  "outputs": {
    "breakNote": {
      "label": "Break taken off",
      "description": "The unpaid break in words: “no break”, or “a 30-minute break”.",
      "format": "text"
    },
    "shift": {
      "label": "Hours per shift",
      "description": "The shift length less the unpaid break, in decimal hours.",
      "format": "number"
    },
    "shiftTime": {
      "label": "Per shift",
      "description": "The shift length less the unpaid break, in hours and minutes.",
      "format": "duration"
    },
    "weekly": {
      "label": "Hours per week",
      "description": "Hours per shift × shifts a week.",
      "format": "number"
    },
    "yearly": {
      "label": "Hours per year",
      "description": "Hours per week × 52 weeks.",
      "format": "number"
    },
    "overtime": {
      "label": "Overtime hours a week",
      "description": "Hours per week over 40, paid at 1.5 times the hourly pay.",
      "format": "number"
    },
    "weeklyPay": {
      "label": "Pay per week",
      "description": "The hourly pay for up to 40 hours, plus 1.5 times the hourly pay for hours over 40, before tax.",
      "format": "money"
    },
    "yearlyPay": {
      "label": "Pay per year",
      "description": "Pay per week × 52 weeks, before tax.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "start": "09:00",
      "end": "17:30",
      "break": 30,
      "days": 5,
      "rate": 25
    },
    "outputs": {
      "breakNote": "a 30-minute break",
      "shift": 8,
      "shiftTime": {
        "hours": 8,
        "minutes": 0
      },
      "weekly": 40,
      "yearly": 2080,
      "overtime": 0,
      "weeklyPay": 1000,
      "yearlyPay": 52000
    },
    "text": "A shift from 9:00 AM to 5:30 PM with a 30-minute break is 8 hours, or 40 hours a week."
  },
  "examples": [
    {
      "given": {
        "start": "09:00",
        "end": "17:30",
        "break": 30,
        "days": 5,
        "rate": 25
      },
      "expect": {
        "breakNote": "a 30-minute break",
        "shift": 8,
        "shiftTime": {
          "hours": 8,
          "minutes": 0
        },
        "weekly": 40,
        "yearly": 2080,
        "weeklyPay": 1000,
        "yearlyPay": 52000
      },
      "source": "hand calculation in content.mdx: 8 h 30 min − 30 min = 8 h; 8 × 5 = 40 h; 40 × $25 = $1,000"
    },
    {
      "given": {
        "start": "07:00",
        "end": "18:00",
        "break": 60,
        "days": 5,
        "rate": 20
      },
      "expect": {
        "shift": 10,
        "weekly": 50,
        "overtime": 10,
        "weeklyPay": 1100,
        "yearlyPay": 57200
      },
      "source": "hand calculation in content.mdx: 40 × $20 + 10 × $30 = $1,100 (overtime after 40 hours at 1.5 times the rate, 29 U.S.C. 207(a)(1))"
    },
    {
      "given": {
        "start": "22:00",
        "end": "06:30",
        "break": 30,
        "days": 4
      },
      "expect": {
        "shift": 8,
        "weekly": 32,
        "yearly": 1664
      },
      "source": "hand calculation in content.mdx: 6:30 + 24:00 − 22:00 = 8 h 30 min, less 30 min = 8 h"
    },
    {
      "given": {
        "start": "08:15",
        "end": "16:50",
        "break": 45,
        "days": 5
      },
      "expect": {
        "shift": 7.833333333333333,
        "shiftTime": {
          "hours": 7,
          "minutes": 50
        },
        "weekly": 39.166666666666664
      },
      "source": "hand calculation in content.mdx: 8 h 35 min − 45 min = 7 h 50 min = 7.8333 h"
    }
  ],
  "sources": [
    "U.S. Department of Labor, Fact Sheet #23: Overtime Pay Requirements of the FLSA (hours over 40 in a workweek at not less than one and one-half times the regular rate). https://www.dol.gov/agencies/whd/fact-sheets/23-flsa-overtime-pay",
    "29 U.S.C. 207(a)(1), maximum hours. https://www.law.cornell.edu/uscode/text/29/207",
    "29 CFR 785.18 and 785.19, rest and meal periods. https://www.ecfr.gov/current/title-29/subtitle-B/chapter-V/subchapter-B/part-785"
  ],
  "related": [
    "time-card",
    "hours",
    "time-duration"
  ],
  "changelog": [
    {
      "date": "2026-09-28",
      "note": "New Break taken off line; the answer says “with no break” for 0 minutes."
    }
  ]
}
