Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Paid Hours Worked
8
hours (shift crosses midnight)
Total span (before break) 8.5 hrs
Total minutes (before break) 510 min
Unpaid break 30 min
Paid minutes 480 min

What this calculator does

This tool computes how many hours fall between a start time (clock in) and an end time (clock out), correctly handling shifts that run past midnight. Enter both times in 24-hour format and an optional unpaid break, and it returns the total span and the paid hours.

How to use it

Type the clock-in hour and minute, then the clock-out hour and minute. If the clock-out is earlier than the clock-in, the calculator assumes the shift crossed midnight and adds a full day automatically. Enter any unpaid break in minutes to deduct it from paid time.

The formula explained

Both times are converted to minutes since midnight. The span is \(((\text{clockOut} - \text{clockIn} + 1440) \bmod 1440)\); adding 1440 (the minutes in a day) and taking the remainder guarantees a positive result even for overnight shifts. Paid minutes equal the span minus the break, and dividing by 60 converts to hours.

$$\text{Paid Hours} = \frac{\big[(\text{Out}-\text{In}+1440)\bmod 1440\big] - B}{60}$$ $$\text{where}\quad \left\{ \begin{aligned} \text{In} &= 60\cdot\text{In Hour} + \text{In Min} \\ \text{Out} &= 60\cdot\text{Out Hour} + \text{Out Min} \\ B &= \text{Break (min)} \end{aligned} \right.$$
Timeline showing a shift starting in the evening, crossing midnight, and ending in the morning
An overnight shift wraps past midnight, so the end time is earlier on the clock than the start.

Worked example

A shift from 22:00 (10 PM) to 06:30 (6:30 AM) with a 30-minute break: clockIn = 1320, clockOut = 390.

$$\text{Span} = (390 - 1320 + 1440) \bmod 1440 = 510 \text{ minutes} = 8.5 \text{ hours}$$ $$\text{Paid minutes} = 510 - 30 = 480 = 8.0 \text{ paid hours}$$
Bar split into paid time segments and a subtracted unpaid break segment
Total clocked time minus the unpaid break equals paid hours.

FAQ

Does it handle shifts over 24 hours? No — it assumes the end time is within one day of the start, which covers standard work shifts.

What if clock-in equals clock-out? The span is treated as 0 minutes (not 24 hours).

Is the break paid? The break is treated as unpaid and subtracted from the paid total; the total span row ignores it.

Last updated: