Time Duration Calculator
Enter a start time and an end time to get the elapsed time in hours, minutes and seconds, with decimal hours ready for timesheets.
How to use it
Set the start and end times with the time fields. Add seconds if you need them. If you took an unpaid break, enter its length in minutes and it will be subtracted.
If the end time is earlier than the start time, the calculator assumes the period crosses midnight. That makes it suitable for night shifts.
How it is calculated
Each time is converted to seconds since midnight: hours x 3600 + minutes x 60 + seconds. The duration is end minus start. When that is negative, 86,400 seconds (one day) is added.
The break in minutes is multiplied by 60 and subtracted. The result is shown as hours, minutes and seconds, and as decimal hours by dividing seconds by 3600.
Examples
From 09:15 to 17:45 is 8 hours 30 minutes, which is 8.50 decimal hours. With a 30 minute break, it is 8 hours, or 8.00 decimal hours.
From 22:00 to 06:30 crosses midnight and gives 8 hours 30 minutes. Identical start and end times give 0, not 24 hours.
FAQ
How do I convert minutes to decimal hours?
Divide the minutes by 60. For example, 45 minutes is 0.75 hours and 20 minutes is 0.33 hours.
Does it handle shifts that cross midnight?
Yes. If the end time is earlier than the start time, one day is added automatically.
Can the span be longer than 24 hours?
Not with this tool, since it uses clock times without dates. Use a date-based day counter for longer spans.
Does daylight saving time affect the result?
No. The tool uses plain clock arithmetic and ignores clock changes.
See also
See also BMI Calculator.
Free and simple: Age Calculator.
Related calculator: Days Between Dates.
You may also find useful Percentage Calculator.
Another free tool: Tip Calculator.