Conservative
6.4 hours
Duration
Enter a start time and end time to instantly get the duration in hours, minutes, seconds, decimal hours, and total minutes. Handles overnight shifts automatically.
Enter start and end time to find the duration.
Start time
End time
Keep this calculator
SavedCompare scenarios
These are example scenarios based on the calculator defaults. Use the calculator above for your exact numbers.
Conservative
6.4 hours
Duration
Default example
8 hours
Duration
Optimistic
9.6 hours
Duration
Step by step
Type the hours, minutes, and seconds for your start time.
Type the hours, minutes, and seconds for your end time. For overnight shifts, just enter the end time as-is.
Hit Calculate Duration to instantly see the result in all formats.
Get the duration as HH:MM:SS, decimal hours, total minutes, and total seconds.
Convert clock-in and clock-out times to decimal hours for payroll systems and billing software.
Night shift workers can calculate shift length even when the end time is the next day — the calculator wraps around midnight automatically.
Find the exact duration of a race, training session, meeting, or any timed event from start to finish.
Time duration calculations appear simple but become error-prone at month and day boundaries, especially for overnight shifts. The most reliable approach is to convert everything to a single unit (seconds), perform the arithmetic, then convert back. This eliminates the need to manually carry over minutes to hours or handle the midnight boundary.
For payroll and billing, decimal hours are the standard format because they can be multiplied directly by an hourly rate. 7 hours 45 minutes = 7.75 decimal hours. At ₹500/hour, that is ₹3,875 — no conversion needed. Most spreadsheet and accounting tools expect decimal hours, so knowing how to convert from HH:MM to decimal is a practical skill for anyone who bills by the hour.
Formula
Duration = End time (seconds) − Start time (seconds) | If negative: add 86,400 (midnight wrap)
Both times are converted to total seconds from midnight. The difference gives the duration in seconds, which is then broken down into hours, minutes, and seconds. Decimal hours = total seconds ÷ 3600. If the end time is before the start time, 86,400 seconds (one full day) is added to handle overnight durations.
Worked example
Start: 09:15:00 = 33,300 sec. End: 17:45:30 = 63,930 sec. Duration = 63,930 − 33,300 = 30,630 sec = 8h 30m 30s = 8.508 decimal hours = 510.5 total minutes. Overnight: Start 22:00 (79,200 sec), End 06:30 (23,400 sec). Duration = 23,400 − 79,200 = −55,800 + 86,400 = 30,600 sec = 8h 30m 0s.
Related tools
A time duration calculator finds the exact elapsed time between a start time and an end time — expressed in hours, minutes, seconds, total minutes, total seconds, and decimal hours. It is more reliable than mental arithmetic because it handles edge cases like durations that cross midnight, and it converts the result into multiple useful formats simultaneously.
Whether you are tracking work hours, calculating shift lengths, billing a client by the hour, timing an event, or converting a duration for a timesheet, this calculator gives you the precise answer in seconds.
Get the full breakdown in H:MM:SS format as well as total minutes and total seconds.
If the end time is before the start time, the calculator automatically wraps around midnight.
Decimal hours (e.g. 7.5 hours) are shown for payroll, billing, and timesheet use.
Both times are converted to total seconds from midnight (00:00:00), then subtracted. If the result is negative (end time is before start time), 86,400 seconds (one full day) is added to account for the overnight wrap.
Formula
Duration (sec) = End time (sec) − Start time (sec)
If negative: Duration = Duration + 86,400
To convert back: Hours = ⌊Duration ÷ 3600⌋ · Minutes = ⌊(Duration mod 3600) ÷ 60⌋ · Seconds = Duration mod 60
Worked Example
Example 1 — Same day
Start: 09:15:00 → 33,300 sec · End: 17:45:30 → 63,930 sec
Duration = 63,930 − 33,300 = 30,630 sec = 8h 30m 30s
Example 2 — Overnight shift
Start: 22:00:00 → 79,200 sec · End: 06:30:00 → 23,400 sec
Duration = 23,400 − 79,200 = −55,800 → +86,400 = 30,600 sec = 8h 30m 0s
Payroll and timesheets
Employees and freelancers need to record exact hours worked per day. Converting clock-in and clock-out times to decimal hours (e.g. 7.75 hours instead of 7h 45m) is required for most payroll systems and invoicing software.
Client billing by the hour
Consultants, lawyers, designers, and other professionals who bill by the hour need precise duration tracking. A 15-minute rounding error on a ₹5,000/hour rate costs ₹1,250 per session.
Shift scheduling
Managers planning shift rosters need to verify that each shift meets minimum hour requirements and that overnight shifts are calculated correctly across the midnight boundary.
Sports and event timing
Race times, match durations, training session lengths, and event schedules all require precise time arithmetic. Converting a finish time minus a start time into hours, minutes, and seconds is a direct application of this calculator.
Travel and logistics
Flight durations, driving time estimates, delivery windows, and transit schedules are all expressed as time durations. Knowing the exact hours and minutes between departure and arrival helps with planning connections and layovers.
The same duration can be expressed in several formats depending on the context. The table below shows common conversions for reference.
| HH:MM:SS | Decimal Hours | Total Minutes | Total Seconds |
|---|---|---|---|
| 0:15:00 | 0.25 | 15 | 900 |
| 0:30:00 | 0.50 | 30 | 1,800 |
| 0:45:00 | 0.75 | 45 | 2,700 |
| 1:00:00 | 1.00 | 60 | 3,600 |
| 1:30:00 | 1.50 | 90 | 5,400 |
| 2:00:00 | 2.00 | 120 | 7,200 |
| 4:00:00 | 4.00 | 240 | 14,400 |
| 7:30:00 | 7.50 | 450 | 27,000 |
| 8:00:00 | 8.00 | 480 | 28,800 |
| 8:30:00 | 8.50 | 510 | 30,600 |
| 12:00:00 | 12.00 | 720 | 43,200 |
| 24:00:00 | 24.00 | 1,440 | 86,400 |
Converting minutes to decimal hours
Decimal hours = Hours + (Minutes ÷ 60) + (Seconds ÷ 3600). For example, 7 hours 45 minutes = 7 + (45 ÷ 60) = 7 + 0.75 = 7.75 decimal hours. This is the format most payroll and billing systems expect.