Time & Date

How to Calculate Elapsed Time Across Midnight

A job that starts at 22:40 and ends at 02:15 crosses a date boundary. Write down both dates when you have them. That removes the guesswork if another day has passed or if both clocks show the same time.

Break the interval into two parts

From 22:40 to midnight is 1 hour 20 minutes. Midnight to 02:15 adds 2 hours 15 minutes. The total is 3 hours 35 minutes, or 215 minutes. This is a wall-clock calculation assuming the next calendar day and no clock change during the interval.

Equal times on the same date are zero apart. Equal times on consecutive dates are one nominal calendar day apart. For a longer job, retain all dates instead of treating any earlier end time as automatically the next morning.

Use timestamps for real elapsed time across a clock change

On a spring transition where the clock jumps from 02:00 to 03:00, the local readings 01:30 and 03:30 are only one real hour apart. On a fall transition, a repeated clock reading can refer to two separate instants. Record a UTC timestamp or include the offset in each local timestamp to resolve that case.

For a paid-hours calculation, check break and rounding rules separately from elapsed time.

References and further reading

Your privacy choices

Essential browser storage helps our tools work correctly. Optional advertising and tracking are currently disabled. You can use all our tools without accepting optional technologies.

Privacy PolicyCookie Policy