Date & Time

Hours Calculator

Calculate hours worked between two times, with an unpaid break deducted.

Last updated · View algorithm, constants and default inputs (JSON)

Enter your values

Hours worked 8.00h
Results

About this calculator

Working hours are usually expressed as a start time, an end time and an unpaid break. Entering times in the usual clock format avoids the mental arithmetic that causes most timesheet errors.

Worked example

calculated with the default values below

Start time (HH:MM) 09:00 · End time (HH:MM) 17:30 · Unpaid break 30 min Hours worked 8.00 h · Minutes worked 480 min · Decimal hours 8.0000 h · Duration 8h 0m

General background references

Disclaimer

These calculators give general date results. Public holidays, working-day conventions and time-zone rules are set locally and change, so confirm against the official calendar for anything legally or contractually binding.

Maintained by: CalcDelta

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

M = (E − S ≤ 0 → E − S + 1440 ; E − S) − B ; H = max(0, M) ÷ 60

S
start time (minutes after midnight)
E
end time (minutes after midnight)
B
unpaid break (minutes)

Enter valid 24-hour HH:MM times. An end time before or equal to the start is treated as crossing midnight. The unpaid break must be shorter than the elapsed shift, leaving positive work time.

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

Why does an end time earlier than the start time assume the next day?

The calculator parses both times to minutes and, when the end is earlier than the start, adds 1,440 minutes to model a shift crossing midnight, so a 22:00 to 06:00 entry yields 8 hours before the break is subtracted. Your unpaid break in minutes is then deducted from the total, and the duration output is expressed as hours and minutes rather than the decimal hours used for payroll. If the break exceeds the shift duration, the calculator rejects the input instead of returning a negative duration.

Which time format does this calculator accept?

Enter 24-hour times as HH:MM, such as 09:00 or 17:30. A valid end time at or before the start is treated as an overnight shift. Invalid clock values and breaks longer than the shift are rejected.