Time Duration Calculator

How long between two times — including shifts that run past midnight.

If the end is earlier than the start, an overnight span is assumed.
Subtracted from the total. Leave at 0 for none.
Add dates for a span longer than 24 hours.

How it works

The tool measures the elapsed time between two clock readings, optionally across a date boundary. Both readings are converted to minutes from midnight; when the end is earlier than the start it is assumed to fall on the following day, which is what makes an overnight shift come out as a positive number of hours rather than a negative one.

That assumption is the whole point. Subtracting 22:00 from 07:00 directly gives minus fifteen hours, which is arithmetically true and practically useless. Treating the end as the next day gives nine hours, which is the answer anyone asking the question actually wants.

Breaks are subtracted only when you enter them, because the arithmetic has no way of knowing which parts of a span are paid. Where a jurisdiction mandates an unpaid break, a total that silently includes it will not survive scrutiny.

Results are given in hours and minutes and in decimal hours. Keep durations and clock times distinct in your own head as well: "2:30" is either half past two or two and a half hours, and only context tells you which.

Examples

A shift that crosses midnight. 22:00 to 07:00 is nine hours. Subtracting the clock readings gives minus fifteen, which is the mistake this avoids.

Adding up a week. Enter each day's span and the total accumulates in hours and minutes rather than as a decimal that needs converting back.

Net of a break. Subtract an unpaid break explicitly — the arithmetic cannot know which part of a span you are paid for.

Practical notes

A duration and a clock time look alike written down and behave differently. "2:30" can mean half past two in the afternoon or two and a half hours; adding two of the first is usually meaningless, while adding two of the second is routine. Keeping the distinction clear avoids most of the errors in this area.

Durations that cross midnight are reported as an elapsed total rather than wrapped to a 24-hour clock, because for a shift or a journey the total is what you need. A nine-hour shift starting at 22:00 is nine hours, not an impossible negative.

Where a break is unpaid, subtract it explicitly. The arithmetic cannot know which parts of a span you are being paid for.

Frequently asked questions

How do I work out hours for a shift that ends after midnight?

Enter the start and end times and leave the dates blank. An end time earlier than the start is read as the following morning, and the result notes that it counted an overnight span.

Why is 7 hours 30 minutes shown as 7.50 and not 7.30?

Because decimal hours are a fraction of an hour, not minutes. Thirty minutes is half an hour, so 0.50. Payroll and invoicing normally want this form.

Does the break come off the total?

Yes. The break is subtracted from the gross span, and the result card shows the figure both before and after the deduction.

Why not subtract the times directly?

Because a span crossing midnight gives a negative. 22:00 to 07:00 is nine hours, not minus fifteen, and that is the case worth having a tool for.

Are breaks deducted automatically?

No. Enter them explicitly — the arithmetic cannot know which parts of a span are paid.

Can I add several durations together?

Yes. Totals accumulate in hours and minutes rather than as a decimal you have to convert back afterwards.

Does it work across several days?

Yes, enter dates as well as times for a span longer than twenty-four hours.

What if the two times are identical?

The duration is zero, unless you have indicated the end is on a following day, in which case it is a full twenty-four hours. The date matters as much as the clock reading.

Can I calculate a duration in the past?

Yes. Any two points work, whether they are in the past, the future or either side of now. The tool measures the span rather than caring where it sits.

Related tools