Time Duration Calculator
Enter a start time and an end time to see exactly how many hours, minutes, and seconds separate them, with the result also shown as decimal hours for payroll or billing. Switch to Add/Subtract mode to find the end time after applying any duration. Handles overnight spans automatically, so 22:00 to 06:00 gives 8 hours, not a negative.
How the time difference calculation works
The calculator converts both clock times into a count of seconds elapsed since midnight (00:00:00). The start and end times, for example 09:00 and 17:30, become 32,400 seconds and 63,000 seconds respectively. Subtracting gives 30,600 seconds. Dividing by 3,600 yields 8.5 decimal hours; dividing by 60 gives 510 total minutes. The seconds are then split back out: floor(30,600 / 3,600) = 8 whole hours, leaving 1,800 seconds, which is exactly 30 minutes and 0 seconds, producing "8h 30m 0s".
When the end time is numerically smaller than the start (for example, a night-shift starting at 22:00 and ending at 06:00), the calculator adds 86,400 seconds (one full day) to the end time before subtracting, giving the correct 8-hour result instead of a negative.
Decimal hours and why payroll uses them
Most payroll and billing systems store time as a decimal fraction of an hour rather than as hours and minutes. A duration of 7 hours and 45 minutes becomes 7.75 decimal hours because 45 minutes is three-quarters of an hour (45 / 60 = 0.75). Multiplying 7.75 by an hourly rate gives the correct pay with ordinary arithmetic, whereas "7:45" multiplied directly by a rate would give the wrong answer.
The standard conversion table is:
- 15 minutes = 0.25 h
- 20 minutes = 0.333 h
- 30 minutes = 0.50 h
- 45 minutes = 0.75 h
Break deductions and net working time
To find net working time, enter the gross start and end times (when the employee clocked in and out) and then enter any unpaid break minutes. A 30-minute lunch break over a 9-to-5 shift reduces the gross 8 hours to 7.5 net hours (7h 30m). The break is subtracted in seconds before the final conversion, so the decimal and minute totals both reflect the net figure.
For multiple breaks, add them up before entering the total. The calculator does not cap the break against the gross span; if a break value longer than the total shift is entered, the result floors at zero rather than going negative.
Add or subtract a duration from a start time
The Add and Subtract modes answer a different question: given a known start time and a known duration, when does the period end (or begin)? Enter the start time and the duration in hours, minutes, and seconds; the calculator adds or subtracts it and gives you the end time in 24-hour format, wrapping through midnight as needed.
Examples of when this is useful:
- A 45-minute meeting starts at 15:30 - when does it finish? (16:15)
- A delivery window opens at 08:00 and lasts 3h 20m - when does it close? (11:20)
- A flight is 11h 40m and departs at 23:50 - what is the local arrival time before layovers? (11:30 next day)
Common time durations at a glance
| Duration | Decimal hours | Total minutes | Total seconds |
|---|---|---|---|
| 15 minutes | 0.25 | 15 | 900 |
| 30 minutes | 0.50 | 30 | 1,800 |
| 45 minutes | 0.75 | 45 | 2,700 |
| 1 hour | 1.00 | 60 | 3,600 |
| 1 hour 30 minutes | 1.50 | 90 | 5,400 |
| 2 hours | 2.00 | 120 | 7,200 |
| 2 hours 30 minutes | 2.50 | 150 | 9,000 |
| 4 hours | 4.00 | 240 | 14,400 |
| 6 hours | 6.00 | 360 | 21,600 |
| 8 hours (full shift) | 8.00 | 480 | 28,800 |
| 12 hours | 12.00 | 720 | 43,200 |
Quick reference for converting common spans to decimal hours and total minutes.
Frequently asked questions
How do I calculate the time between two times?
Convert both times to a 24-hour format, then subtract the start from the end in total minutes or seconds. For example, from 9:15 AM (09:15) to 5:45 PM (17:45) is 17:45 minus 09:15, which equals 8 hours and 30 minutes. If the end time is before the start (overnight shift), add 24 hours to the end time first.
What is decimal hours and how do I convert minutes to a decimal?
Decimal hours express a duration as a single number where the part after the decimal point represents a fraction of one hour. Divide the minutes by 60 to get the decimal: 45 minutes is 45/60 = 0.75, so 3 hours 45 minutes is 3.75 decimal hours. This format is used by payroll systems because multiplying 3.75 by an hourly rate gives the correct pay directly.
How do you calculate overnight or cross-midnight time duration?
If the end time is earlier in the day than the start time, the shift crosses midnight. Subtract the end time from the start to find how many seconds remain before midnight, then add the end time in seconds. The shortcut is to add 24 hours (or 86,400 seconds) to the end time and then subtract the start: 22:00 to 06:00 becomes (06:00 + 24:00) minus 22:00 = 08:00, or 8 hours.
How do I calculate work hours after subtracting breaks?
Enter the gross clock-in and clock-out times to get the total span, then enter your break length in the break deduction field. The calculator subtracts the break from the gross span and shows the net working time in hours, minutes, and decimal hours. For a 9-to-5 shift with a 30-minute lunch, the net working time is 7 hours 30 minutes (7.5 decimal hours).
How many seconds are in an hour, and why does it matter?
One hour equals exactly 3,600 seconds (60 minutes x 60 seconds). Most time calculations are simplest when done in seconds: convert all times to seconds, perform the arithmetic, then divide by 3,600 for hours or 60 for minutes. This avoids errors from borrowing across the 60-based boundary (for example, subtracting 45 minutes from 1 hour 30 minutes).
Can this calculator handle durations longer than 24 hours?
The time-difference mode works within a single 24-hour window and returns at most 23 hours 59 minutes 59 seconds. For spans covering multiple calendar days (for example, from Monday at 09:00 to Wednesday at 17:00), you need a date-and-time duration calculator that accepts full dates alongside the clock times.
How do I find what time it will be after adding hours and minutes?
Switch to "Add duration to a start time" mode. Enter the start time in 24-hour format and fill in the hours, minutes, and seconds of the duration. The calculator adds them and shows the resulting end time. For example, 14:45 plus 3 hours and 30 minutes gives 18:15. If the result crosses midnight, it wraps to the next day automatically (e.g. 23:00 plus 2 hours = 01:00).