How to Calculate Hours Worked on an Overnight Shift That Crosses Midnight

Try to calculate a 7 p.m.-to-7 a.m. shift the way you'd calculate a 9-to-5, and the math breaks before you even get to the break. 07:00 minus 19:00 is a negative number. Every overnight shift does this, and it's the reason so many people fall back on counting on their fingers, or trust whatever a time clock spits out without checking it.

The fix is one extra step. Here's the whole method, worked through with real numbers, and the part that actually trips people up more than the subtraction does: figuring out which of your breaks are even allowed to be unpaid in the first place.

The subtraction, and where it breaks

The method that works for any shift, overnight or not, is to stop thinking in clock time and start thinking in minutes since midnight.

  1. Convert both times to 24-hour clock, then to minutes since midnight: hour × 60 + minutes.
  2. Subtract start from end.
  3. If the result is negative — meaning your end time is numerically smaller than your start time — add 1,440 (the number of minutes in a day) to the end time and subtract again. That's the entire fix. It exists because a clock resets to zero at midnight; the math has to put that missing day back in by hand.
  4. Subtract any unpaid time (more on which time qualifies below).
  5. Divide by 60 to get decimal hours, if that's the format your payroll system wants.

That third step is where the negative number was actually telling you something useful: it was flagging that your shift crossed midnight, not that you made an error.

Three shifts, worked in full

A plain 8-hour overnight, no break to worry about. 11:45 p.m. to 7:45 a.m. — an off-the-hour start, which is exactly where people tend to slip on the minutes.

A 12-hour shift with a 30-minute unpaid meal break subtracted afterward. 7 p.m. to 7 a.m., scheduled as a flat 12 hours, with a half-hour meal break the timekeeping system deducts from the total rather than building into the schedule.

A 12.5-hour clock built to net out to 12 paid hours. Some hospitals and other 24/7 operations schedule the shift itself as 12 hours and 30 minutes — 6 p.m. to 6:30 a.m. — specifically so that after the unpaid meal comes out, the paid total lands on a clean 12.

Put the second and third examples side by side and you get a small, useful warning: two shifts both commonly described as "a 12" can be built on completely different clock lengths — one pays 11.5 hours for 12 hours on the schedule, the other pays a full 12 for 12.5 hours on the schedule — and the only way to know which one you're on is to check the actual posted start and end times, not the shorthand name of the shift.

Turning minutes into the decimal your pay stub uses

Payroll systems rarely print "7 hours 30 minutes." They print 7.50. The conversion is minutes ÷ 60, and a few values come up often enough to be worth memorizing rather than recalculating every time:

Minutes Decimal hours
15 0.25
20 0.33
30 0.50
45 0.75
60 1.00

Twenty minutes is really 0.333…, so systems that carry more decimal places can land a cent or two away from a hand calculation. A gap bigger than that is worth a second look.

Not every break is allowed to be unpaid

This is the part the arithmetic can't tell you, and it's where the real confusion usually lives — because "unpaid break" isn't one thing under federal wage law. It's two very different things with two different rules, and mixing them up is an easy way to end up paid less than you're owed.

The Department of Labor states the baseline plainly: "Federal law does not require lunch or coffee breaks." Nothing in the FLSA obligates an employer to give you a break of any kind. But once an employer does give you one, what happens next depends entirely on how long it is and what you're allowed to do during it.

Short breaks have to be paid. Under 29 CFR § 785.18, "rest periods of short duration, running from 5 minutes to about 20 minutes, are common in industry" and, because they promote efficiency, "must be counted as hours worked." A 15-minute break can't be netted out of your total the way the 30-minute meal break was in the examples above — if your timekeeping system is subtracting one, that's worth raising.

A genuine meal period can be unpaid, and it has real conditions attached. 29 CFR § 785.19 says "ordinarily 30 minutes or more is long enough for a bona fide meal period" (a shorter one can qualify only under special conditions), but the length is only half the test — the other half is that "the employee must be completely relieved from duty for the purposes of eating regular meals," and "is not relieved if he is required to perform any duties, whether active or inactive, while eating." Eating at a desk while still answering radio calls, monitoring a floor, or covering a phone line isn't a bona fide meal period under this rule no matter how long it lasts — it's paid working time that happens to include a sandwich.

So the honest version of "unpaid break" is narrower than the phrase suggests. Inside a normal shift, it usually means the qualifying meal period — not any interruption. (Longer stretches where you're completely off duty and free to use the time as your own, such as the gap in a split shift, are a separate rule: 29 CFR § 785.16.) If your shift includes a 15-minute break and a 30-minute meal, only the 30-minute meal is a candidate for the subtraction in the calculation above — and even that one only qualifies if you were actually, fully off duty for it.

Which day — and which week — the shift belongs to

Crossing midnight raises a second question that has nothing to do with the hour count: which calendar day did you work? Payroll and scheduling systems have to assign the shift somewhere, and the assignment isn't arbitrary — it follows from how the employer has defined its workweek.

29 CFR § 778.105 defines an employee's workweek as "a fixed and regularly recurring period of 168 hours — seven consecutive 24-hour periods," and specifies that it "need not coincide with the calendar week but may begin on any day and at any hour of the day." Once set, that start time is what everything else gets measured against for weekly overtime purposes — not the calendar day printed on the roster.

Take a shift that runs from 11 p.m. Sunday to 7 a.m. Monday. If the employer's workweek starts at 12:00 a.m. Monday, the first hour belongs to the week that's ending and the other seven to the week that's starting. If the workweek starts at 11 p.m. Sunday instead, the whole shift lands in the new week. Neither is wrong — the FLSA doesn't require the workweek to reset at midnight, only that the chosen 168-hour period be fixed and applied consistently. If a shift near a pay-period or workweek boundary is landing in a week you didn't expect, the fixed start hour your employer's workweek runs on is the fact to ask for — not a guess based on the calendar.

That question matters most when hours are close to an overtime threshold, which runs on its own set of rules depending on your job and your employer's overtime structure — we've covered how a night differential feeds into that calculation, and how the threshold itself can be something other than a flat 40 hours a week, in our guide to shift differential and overtime.

What this doesn't cover

Rounding is a related but separate question — once your minutes are correctly totaled, some employers round the clock-in and clock-out times themselves to the nearest 5 or 15 minutes before doing any of the math above. That's governed by its own rule, 29 CFR § 785.48(b), which we cover in detail — including the one-directional rounding problem that shows up specifically on shifts that only ever end late — in our piece on when a relieved-post shift actually ends. Time spent on pre-shift tasks like roll call or a truck check, before the clock officially starts, is its own question too, covered in our guide to when the clock actually starts.

And state law can change all of this. Federal law sets a floor, not a ceiling: several states require paid rest breaks, mandate meal periods federal law doesn't require at all, or impose penalty pay when a qualifying break isn't given. Where a state rule is more generous than the federal one, the state rule is the one that governs.

What to check on your own timesheet

Seeing the pattern before you're doing the math shift by shift

Everything above is the arithmetic for one shift at a time — useful for checking a single paycheck, but not something anyone wants to redo by hand for every night of a rotation. If what you're actually trying to see is the shape of a whole pattern — how many 12s or 24s you're on in a stretch, and which of your days off actually land on a weekend — the shift pattern calculator lays out 4-on-4-off, 2-2-3, 24/48, DuPont and several other rotations against real dates, so you can see the pattern instead of counting cycles by hand. It works in whole shifts, not clock-in-and-out minutes with breaks, so it's a companion to the math above rather than a replacement for it — but it's the faster way to answer "what does my month actually look like" once you already know what a single shift is worth.

Sources: U.S. Department of Labor — Breaks and Meal Periods, 29 CFR § 785.18 (short rest periods), 29 CFR § 785.19 (bona fide meal periods), 29 CFR § 785.16 (off-duty periods), and 29 CFR § 778.105 (definition of the workweek).

This is general information about how hours and breaks are commonly calculated and treated under US federal wage law, not legal, tax, or financial advice. Break rules, rounding practices, and overtime thresholds vary by state and by employer, and a collective bargaining agreement can set terms more generous than the federal floor described here. For a specific paycheck or dispute, your payroll department, HR, your union representative, or your state labor agency is the authority on your situation.

Related reading: Shift differential vs. overtime: which one actually adds up · Your shift doesn't end at a time, it ends when someone relieves you · Your shift starts at 7:00 — when does the clock start? · Sleep time on a 24-hour shift