{
    "name": "Hours Calculator",
    "url": "https://calculators.geekmidst.com/calculators/hours-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/hours-calculator.md",
    "category": "Date, time & lifestyle",
    "description": "Work out the hours and minutes between a start and an end time, including overnight shifts, minus an unpaid break, in decimal hours too.",
    "summary": "Enter a start time and an end time in 24-hour format to get the time between them. If the end is earlier than the start, the shift is treated as running past midnight.",
    "also_called": [
        "Work hours calculator",
        "Shift length calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "start",
            "label": "Start time",
            "type": "time",
            "default": "09:00"
        },
        {
            "name": "end",
            "label": "End time",
            "type": "time",
            "default": "17:30"
        },
        {
            "name": "break",
            "label": "Unpaid break",
            "type": "number",
            "default": "30",
            "unit": "min",
            "optional": true
        }
    ],
    "outputs": [
        {
            "key": "hours",
            "label": "Hours worked (decimal)",
            "format": "number"
        },
        {
            "key": "hm",
            "label": "Hours and minutes",
            "format": "text"
        },
        {
            "key": "minutes",
            "label": "Total minutes",
            "format": "integer"
        },
        {
            "key": "span_hours",
            "label": "Time from start to end, before the break",
            "format": "number"
        }
    ],
    "formula": {
        "text": "Minutes = End − Start (add 24 h if End is earlier than Start) − Break;  Hours = Minutes ÷ 60",
        "variables": {
            "Start, End": "24-hour clock times",
            "Break": "unpaid break in minutes"
        }
    },
    "worked_example": {
        "inputs": {
            "start": "09:00",
            "end": "17:30",
            "break": "30"
        },
        "steps": [
            "From 09:00 to 17:30 is 8 h 30 min = 510 minutes.",
            "Minus a 30-minute break: 510 − 30 = 480 minutes.",
            "480 ÷ 60 = 8.00 hours."
        ],
        "result": "A 09:00 to 17:30 shift with a 30-minute unpaid break is 8 hours of work."
    },
    "interpretation": "Use the decimal figure to multiply by an hourly rate: 7 h 45 min is 7.75 hours, not 7.45.",
    "assumptions": [
        "Shifts are shorter than 24 hours.",
        "Clock changes for daylight saving time during the shift are not counted."
    ],
    "limitations": [
        "For a full week with overtime, use the Time Card Calculator."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "How do I enter a night shift?",
            "answer": "Enter it as it is, for example 22:00 to 06:00. Because the end is earlier than the start, the calculator counts through midnight and gives 8 hours."
        },
        {
            "question": "Is a paid break subtracted?",
            "answer": "Only enter breaks you are not paid for. Paid breaks count as working time."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Time Card Calculator",
            "url": "https://calculators.geekmidst.com/calculators/time-card-calculator"
        },
        {
            "name": "Time Calculator",
            "url": "https://calculators.geekmidst.com/calculators/time-calculator"
        },
        {
            "name": "Date Difference Calculator",
            "url": "https://calculators.geekmidst.com/calculators/date-difference-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}