{
  "id": "time-card",
  "version": "dec07288fe83",
  "status": "published",
  "name": "Time Card Calculator",
  "question": "How many hours on my time clock?",
  "summary": "Adds up the hours on a weekly time card from in and out times, less an unpaid break, with optional rounding, and works out pay with overtime after 40 hours.",
  "category": "days",
  "subcategory": "time-and-hours",
  "url": "https://www.acalculator.org/days/time-card-calculator",
  "markdown": "https://www.acalculator.org/days/time-card-calculator.md",
  "kind": "function",
  "method": "Each day: (out − in, plus 24 hours when out is earlier, after rounding) − break; total = sum of the days; overtime = total − overtime limit when above 0; pay = rate × regular + rate × multiplier × overtime.",
  "assumptions": [
    "An out time earlier than the in time is on the next day, so one day is under 24 hours.",
    "The same unpaid break is taken off each day with both times. A break longer than the day gives no answer; a break as long as the day gives 0 hours.",
    "Rounding moves each in and out time to the nearest 5, 6, or 15 minutes; a time exactly halfway rounds up (later). Federal rules allow rounding to the nearest 5 minutes, tenth of an hour, or quarter hour when it averages out fairly over time (29 CFR 785.48(b)).",
    "Overtime is weekly: hours over the limit (40 by default, the federal Fair Labor Standards Act rule) at the multiplier (1.5 by default). Daily overtime rules are not included.",
    "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": {
      "monIn": {
        "title": "Monday in",
        "description": "The time you started work on Monday. Leave both times empty for a day off.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "monOut": {
        "title": "Monday out",
        "description": "The time you stopped work on Monday. Earlier than the in time means the next day.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "tueIn": {
        "title": "Tuesday in",
        "description": "The time you started work on Tuesday. Leave both times empty for a day off.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "tueOut": {
        "title": "Tuesday out",
        "description": "The time you stopped work on Tuesday. Earlier than the in time means the next day.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "wedIn": {
        "title": "Wednesday in",
        "description": "The time you started work on Wednesday. Leave both times empty for a day off.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "wedOut": {
        "title": "Wednesday out",
        "description": "The time you stopped work on Wednesday. Earlier than the in time means the next day.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "thuIn": {
        "title": "Thursday in",
        "description": "The time you started work on Thursday. Leave both times empty for a day off.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "thuOut": {
        "title": "Thursday out",
        "description": "The time you stopped work on Thursday. Earlier than the in time means the next day.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "friIn": {
        "title": "Friday in",
        "description": "The time you started work on Friday. Leave both times empty for a day off.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "friOut": {
        "title": "Friday out",
        "description": "The time you stopped work on Friday. Earlier than the in time means the next day.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "satIn": {
        "title": "Saturday in",
        "description": "The time you started work on Saturday. Leave both times empty for a day off.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "satOut": {
        "title": "Saturday out",
        "description": "The time you stopped work on Saturday. Earlier than the in time means the next day.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "sunIn": {
        "title": "Sunday in",
        "description": "The time you started work on Sunday. Leave both times empty for a day off.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "sunOut": {
        "title": "Sunday out",
        "description": "The time you stopped work on Sunday. Earlier than the in time means the next day.",
        "type": "string",
        "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"
      },
      "break": {
        "title": "Unpaid break each day (minutes)",
        "description": "Unpaid break time taken off each day you worked, in minutes.",
        "type": "integer",
        "minimum": 0,
        "maximum": 1440
      },
      "rate": {
        "title": "Hourly pay",
        "description": "Your regular pay per hour, to work out pay. Leave it empty to skip pay.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 10000
      },
      "round": {
        "title": "Round each time to",
        "description": "Round each in and out time to the nearest 5, 6, or 15 minutes, or not at all.",
        "type": "string",
        "enum": [
          "0",
          "5",
          "6",
          "15"
        ]
      },
      "otAfter": {
        "title": "Overtime after (hours a week)",
        "description": "Hours in the week after which overtime pay starts. 40 under federal law.",
        "type": "number",
        "minimum": 0,
        "maximum": 168
      },
      "otRate": {
        "title": "Overtime pay multiplier",
        "description": "Overtime pay per hour as a multiple of the hourly pay. At least 1.5 under federal law.",
        "type": "number",
        "minimum": 1,
        "maximum": 5
      }
    }
  },
  "outputs": {
    "total": {
      "label": "Total hours",
      "description": "The hours worked in the week, less breaks, in decimal hours.",
      "format": "number"
    },
    "totalTime": {
      "label": "Total time",
      "description": "The hours worked in the week, less breaks, in hours and minutes.",
      "format": "duration"
    },
    "regular": {
      "label": "Regular hours",
      "description": "Hours up to the overtime limit.",
      "format": "number"
    },
    "overtime": {
      "label": "Overtime hours",
      "description": "Hours over the overtime limit.",
      "format": "number"
    },
    "regularPay": {
      "label": "Regular pay",
      "description": "Regular hours × hourly pay.",
      "format": "money"
    },
    "overtimePay": {
      "label": "Overtime pay",
      "description": "Overtime hours × hourly pay × overtime multiplier.",
      "format": "money"
    },
    "pay": {
      "label": "Total pay",
      "description": "Regular pay plus overtime pay, before tax.",
      "format": "money"
    },
    "daysWorked": {
      "label": "Days worked",
      "description": "Days with both an in and an out time.",
      "format": "integer"
    },
    "monHours": {
      "label": "Monday",
      "description": "Hours worked on Monday, less the break, in decimal hours.",
      "format": "number"
    },
    "tueHours": {
      "label": "Tuesday",
      "description": "Hours worked on Tuesday, less the break, in decimal hours.",
      "format": "number"
    },
    "wedHours": {
      "label": "Wednesday",
      "description": "Hours worked on Wednesday, less the break, in decimal hours.",
      "format": "number"
    },
    "thuHours": {
      "label": "Thursday",
      "description": "Hours worked on Thursday, less the break, in decimal hours.",
      "format": "number"
    },
    "friHours": {
      "label": "Friday",
      "description": "Hours worked on Friday, less the break, in decimal hours.",
      "format": "number"
    },
    "satHours": {
      "label": "Saturday",
      "description": "Hours worked on Saturday, less the break, in decimal hours.",
      "format": "number"
    },
    "sunHours": {
      "label": "Sunday",
      "description": "Hours worked on Sunday, less the break, in decimal hours.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "monIn": "08:00",
      "monOut": "17:00",
      "tueIn": "08:00",
      "tueOut": "17:00",
      "wedIn": "08:00",
      "wedOut": "17:00",
      "thuIn": "08:00",
      "thuOut": "17:00",
      "friIn": "08:00",
      "friOut": "17:00",
      "break": 30,
      "rate": 20,
      "round": "0",
      "otAfter": 40,
      "otRate": 1.5
    },
    "outputs": {
      "total": 42.5,
      "totalTime": {
        "hours": 42,
        "minutes": 30
      },
      "regular": 40,
      "overtime": 2.5,
      "regularPay": 800,
      "overtimePay": 75,
      "pay": 875,
      "daysWorked": 5,
      "monHours": 8.5,
      "tueHours": 8.5,
      "wedHours": 8.5,
      "thuHours": 8.5,
      "friHours": 8.5
    },
    "text": "You worked 42.5 hours this week: 40 regular and 2.5 overtime."
  },
  "examples": [
    {
      "given": {
        "monIn": "08:00",
        "monOut": "17:00",
        "tueIn": "08:00",
        "tueOut": "17:00",
        "wedIn": "08:00",
        "wedOut": "17:00",
        "thuIn": "08:00",
        "thuOut": "17:00",
        "friIn": "08:00",
        "friOut": "17:00",
        "break": 30,
        "rate": 20,
        "round": "0",
        "otAfter": 40,
        "otRate": 1.5
      },
      "expect": {
        "total": 42.5,
        "totalTime": {
          "hours": 42,
          "minutes": 30
        },
        "regular": 40,
        "overtime": 2.5,
        "regularPay": 800,
        "overtimePay": 75,
        "pay": 875,
        "daysWorked": 5,
        "monHours": 8.5
      },
      "source": "hand calculation in content.mdx: 5 × 8.5 h = 42.5 h; 40 × $20 + 2.5 × $30 = $875 (overtime after 40 hours at 1.5 times the rate, 29 U.S.C. 207(a)(1))"
    },
    {
      "given": {
        "monIn": "07:53",
        "monOut": "16:08",
        "satIn": "22:00",
        "satOut": "02:30",
        "break": 0,
        "round": "15",
        "otAfter": 40,
        "otRate": 1.5
      },
      "expect": {
        "monHours": 8.25,
        "satHours": 4.5,
        "total": 12.75,
        "overtime": 0,
        "daysWorked": 2
      },
      "source": "29 CFR 785.48(b) (rounding to the nearest quarter of an hour); hand calculation in content.mdx: 7:53 is nearer 8:00, 4:08 is nearer 4:15"
    },
    {
      "given": {
        "monIn": "09:02",
        "monOut": "17:03",
        "break": 0,
        "round": "6",
        "otAfter": 40,
        "otRate": 1.5
      },
      "expect": {
        "monHours": 8.1,
        "total": 8.1
      },
      "source": "hand calculation in content.mdx: 17:06 − 9:00 = 8 h 6 min = 8.1 h"
    },
    {
      "given": {
        "monIn": "08:00",
        "monOut": "20:00",
        "tueIn": "08:00",
        "tueOut": "20:00",
        "wedIn": "08:00",
        "wedOut": "20:00",
        "thuIn": "08:00",
        "thuOut": "20:00",
        "break": 60,
        "rate": 18,
        "round": "0",
        "otAfter": 40,
        "otRate": 2
      },
      "expect": {
        "total": 44,
        "regular": 40,
        "overtime": 4,
        "pay": 864
      },
      "source": "hand calculation in content.mdx: 40 × $18 + 4 × $36 = $864"
    }
  ],
  "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 CFR 785.48(b), rounding practices (nearest 5 minutes, tenth, or quarter of an hour). https://www.ecfr.gov/current/title-29/subtitle-B/chapter-V/subchapter-B/part-785",
    "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": [
    "work-hours",
    "hours",
    "time-duration"
  ],
  "changelog": []
}
