Time Duration Calculator
Result
Elapsed time
- Decimal hours
- 8.50 hours
- Total minutes
- 510 minutes
A time duration calculator answers the plain question of how much time sits between two clock times on the same day. Type both times as they appear on the clock and the gap comes back three ways: as hours and minutes, as decimal hours, and as a whole number of minutes. Nothing is deducted — a break is a rule about a job, not about the clock. The one rule worth knowing is the overnight one: an end time earlier than its start is read as the next morning, so 22:30 to 06:15 is 7 hours 45 minutes, and two identical times give zero rather than a full day.
Formula
elapsed time = end − start, and when the end time is earlier than the start time, 24 hours are added to it first; the same seconds are then written as decimal hours (÷ 3600) and as total minutes (÷ 60)
- start
- The earlier of the two clock times, in 24-hour notation such as 09:00. Seconds are optional and most fields will not offer them
- end
- The later clock time. When it is numerically earlier than the start, it is treated as falling on the next day
- elapsed
- The gap itself, in seconds. It is the number the other two rows are derived from, so all three always describe the same span
- decimalHours
- The gap divided by 3600, to two decimal places — 30600 seconds is 8.5 hours
- totalMinutes
- The gap divided by 60, rounded to a whole minute — the same 30600 seconds is 510 minutes
Use it for the gap between a start and a finish on one day: how long a meeting ran, how much of a shift was clocked, how long a process took from first step to last. It is the right tool whenever you have two clock times rather than two dates, and the wrong one when the span can exceed a day — a 30-hour gap typed as two clock times looks exactly like a 6-hour one. For a shift with an unpaid break, or for a whole week of shifts, use the hours calculator, which deducts the break and adds the days up; for a gap measured in days rather than hours, use a date calculator.
Worked examples
A working day, 09:00 to 17:30
- From 09:00 to 17:00 is 8 hours, and 17:00 to 17:30 adds another 30 minutes, so the gap is 8 hours 30 minutes
- In seconds that is 8 × 3600 + 30 × 60 = 28800 + 1800 = 30600
- 30600 ÷ 3600 = 8.5 decimal hours, and 30600 ÷ 60 = 510 minutes
- All three rows are the same span; none of them is a separate calculation
Eight and a half hours on the clock is not eight and a half hours of work — the unpaid break comes off on top, which is why the hours calculator asks for it and this page does not.
A night shift, 22:30 to 06:15
- 06:15 is earlier than 22:30, so the end time is read as the next morning and a full day is added before subtracting
- 22:30 to midnight is 1 hour 30 minutes, and midnight to 06:15 is 6 hours 15 minutes
- 1 h 30 m + 6 h 15 m = 7 hours 45 minutes, which is 27900 seconds
- 27900 ÷ 3600 = 7.75 decimal hours, and 27900 ÷ 60 = 465 minutes
A night shift is the case where the overnight rule earns its keep: without it the same two times would give minus sixteen and a quarter hours. It also sets the ceiling on this page — the longest gap two clock times can express is 23 hours 59 minutes.
The same time typed twice
- The two times are equal, so nothing has elapsed between them
- The result is zero seconds, zero hours and zero minutes
- One minute later — 09:01 — the answer becomes 60 seconds, so the rule is a step rather than a special case
Reading equal times as zero rather than as twenty-four hours is a deliberate choice: typing the same time twice is far more often a slip than it is a full-day shift, and a full-day shift can be typed as 00:00 to 23:59 to get 23 hours 59 minutes.
Limitations
The gap is measured between two times on a clock face, so it can never reach or pass 24 hours: the largest input is 00:00 to 23:59, which is 86340 seconds. A span of two days typed as two clock times is indistinguishable from a span of a few hours, and the page will quietly answer the shorter one. Times are taken to the minute unless a seconds step is available in the field, so a 45-second gap cannot be entered. No break is deducted, and no time zone is involved — if the two clock times are in different zones, convert one of them first. Nothing here knows about dates, so the answer never says which day it landed on.
Frequently asked questions
- How do I work out the time between two clock times?
- Subtract the start from the end, and add 24 hours first if the end is the earlier of the two. This time duration calculator does that and returns the answer three ways: 09:00 to 17:30 is 8 hours 30 minutes, which is also 8.5 decimal hours and 510 total minutes. The three rows are one span in three units, so they always agree.
- How many minutes are in 8 hours 30 minutes?
- 510 minutes, which is 30600 seconds and 8.5 decimal hours. Multiply the hours by 60 and add the minutes: 8 × 60 + 30 = 510. The same span read as decimal hours is 510 ÷ 60 = 8.5, so the minutes row and the decimal row differ by a factor of sixty, not by a rounding rule.
- Do I need to add 24 hours for a night shift?
- No — type the times as they are on the clock. An end time earlier than its start is already read as the next morning, so 22:30 to 06:15 gives 7 hours 45 minutes without any special notation. Adding a day yourself, or writing 30:15, is not accepted and would be read as an invalid time.
- What does it give when both times are the same?
- Zero. Two identical times mean no time has elapsed, which is why 09:00 to 09:00 is 0 hours rather than 24. Reading them as a full day would also invent a span this page cannot otherwise produce: the largest gap two clock times can express is 23 hours 59 minutes, from 00:00 to 23:59. Typing the same time twice is far more often a slip than a full-day shift.
- Is this the same as the hours calculator?
- No, and the difference is the break. This page measures the gap between two clock times and deducts nothing; the hours calculator takes a start and an end for each of up to seven days, subtracts the unpaid break from every day worked, and adds the week up. Use this one for a single span, and that one for a timesheet or a payslip check.
References
- RFC 3339: Date and Time on the Internet: Timestamps — IETF
- ISO 8601: International Standard Date and Time Notation — Markus Kuhn, University of Cambridge