Time Duration Calculator
How long between two times? Enter a start and an end — clock times for a shift or an event, or full date-times for a span across days — and get the duration in days, hours, minutes, and seconds, plus decimal hours for timesheets.
One rule is worth knowing up front: with clock times only, an end time earlier than the start is treated as falling on the next day — the overnight shift case (22:30 → 06:15 is 7 hours 45 minutes, not a negative number). The result says when this rule has been applied.
Off: both times are clock times on one day (an earlier end time counts as the next day — the overnight case). On: give both dates for an exact span.
24-hour HH:MM, HH:MM:SS, or 12-hour like 9:30 PM.
Same formats as the start time.
Duration
8h 30m 0s
In decimal hours
8.5
In minutes / seconds
510
30600 seconds in total.
How it is worked out
- Both times are on the same day; the duration is end minus start.
- 30,600 seconds = 0 day(s), 8 hour(s), 30 minute(s), 0 second(s).
Embed this calculator on your website →
The formula
duration = end − start, in exact whole seconds
then split: days = s ÷ 86,400 · hours = rest ÷ 3,600 · minutes = rest ÷ 60 · decimal hours = total seconds ÷ 3,600
- clock times only — an end earlier than the start falls on the next day (the overnight rule, flagged in the result).
- with dates — the day count comes from real calendar arithmetic, so leap years are exact.
Worked example: 09:15 → 17:45 = 30,600 seconds = 8 hours 30 minutes = 8.5 decimal hours.
How it works
Times are read as 24-hour HH:MM (seconds optional, HH:MM:SS) or in 12-hour form with AM/PM. Durations are computed in exact whole seconds and then broken into days, hours, minutes, and seconds; the decimal-hours and total-minutes figures are rounded displays of that exact second count.
With dates, the day count comes from real calendar arithmetic — the same verified calendar core as the Age calculator — so leap years are handled correctly: 28 February to 1 March is two days in 2024 and one day in 2025. In date mode an end before the start is an error, never a silent swap.
Examples
- 09:15 → 17:45 → 8 hours 30 minutes = 8.5 decimal hours (30,600 seconds) — the standard working day with a break already out.
- Overnight: 22:30 → 06:15 → 7 hours 45 minutes, with the next-day rule applied and flagged.
- 1 Jan 2026, 23:00 → 3 Jan 2026, 01:30 → 1 day, 2 hours, 30 minutes = 26.5 hours.
Frequently asked questions
Why did my end time get treated as the next day?
Because with clock times alone there is no date to compare: 06:15 after 22:30 almost always means the next morning. If you meant a same-day span with the end before the start, switch on the dates option and give both dates — in that mode the order is enforced and an earlier end is reported as an error.
How do I get decimal hours for a timesheet?
The decimal-hours figure is the exact duration divided by 3600, shown to 4 decimal places: 8 hours 30 minutes is 8.5, 7 hours 45 minutes is 7.75. The Hours and Minutes calculator converts in the other direction and adds or subtracts durations.
Can I measure durations longer than a day without dates?
No — clock times alone can only span up to 24 hours, by design. For anything longer, turn on the dates option; there is no practical limit (the calendar arithmetic is exact across years).
Are seconds included, or only hours and minutes?
Seconds are included: durations are reported in hours, minutes, and seconds (and in days for long spans), so a film length, a download time, or a race split keeps its exact tail instead of being rounded to the nearest minute.
What if the start and end are in different time zones?
Convert both times to one zone first — a duration is only honest on a single clock. The Time Zone Converter on this site does the conversion; then measure the duration here. Counting across zones without converting quietly adds or removes whole hours.
Related calculators
Hours and Minutes Calculator
LiveAdd and subtract hours and minutes without manual base-60 conversion errors.
Days Between Dates Calculator
LiveCount elapsed or remaining days between two dates, with inclusive and exclusive counting explained.
Age Calculator
LiveCalculate exact age in years, months, and days, plus total days and the next birthday.

