Clock and duration arithmetic

Time and hours calculator

Compare two clock times, add or subtract a duration, calculate worked hours after a break, or convert a duration into normalized hours, minutes and seconds.

Calculate time

Choose a mode. Clock times use the 24-hour format and all calculations stay in this browser.

Calculation type
Difference between two times

Use a 24-hour time. Seconds are optional when the browser supports them.

Use a 24-hour time. Seconds are optional when the browser supports them.

Your times remain on this device

Clock times, breaks and durations are processed locally and are not sent to a server or added to the URL.

How the calculations work

Each clock time is converted to the number of seconds since 00:00:00. Duration arithmetic then uses whole seconds, without time zones or daylight-saving rules.

Difference

duration = end - start (+ 24 h when crossing midnight)

The interval is inclusive of neither endpoint; it measures elapsed time.

Worked hours

worked duration = gross interval - break

The break is validated before subtraction so the result cannot be negative.

Decimal hours

decimal hours = total seconds / 3,600

For example, 7 h 30 min equals 7.5 decimal hours.

Available modes

Time difference

Measure elapsed time on the same day or across midnight.

Clock adjustment

Add or subtract a duration and see the day offset.

Worked hours

Subtract an unpaid break from a shift.

Duration conversion

Normalize large minute or second values and show decimal hours.

Important limits

  • This tool uses clock arithmetic only and does not apply time zones or daylight-saving changes.
  • For legal payroll calculations, follow the rounding and break rules required in the relevant country or agreement.
  • A crossing-midnight interval must be marked explicitly.
  • Decimal hours are a representation of a duration, not a clock time.

Examples

Morning interval

08:30 to 12:45

4 hours 15 minutes

Night shift

22:00 to 06:30, crossing midnight

8 hours 30 minutes

Worked hours

09:00 to 17:30 with a 30-minute break

8 hours = 8.0 decimal hours

Normalize minutes

1 hour, 90 minutes, 30 seconds

2 hours 30 minutes 30 seconds

Frequently asked questions

Can the calculator handle overnight work?

Yes. Enable the crossing-midnight option so the end time is treated as occurring on the following day.

What are decimal hours?

They express a duration as a decimal number of hours. Thirty minutes equals 0.5 hour and fifteen minutes equals 0.25 hour.

Does the calculator account for daylight saving time?

No. It performs abstract 24-hour clock arithmetic without a date or time zone.

Can minutes exceed 59 in conversion mode?

Yes. Conversion mode normalizes large minute and second values into hours, minutes and seconds.

Technical references