How the Time Duration Calculator Works
How long is it from 9:00 in the morning to 5:30 in the evening? The answer is easy to see for a simple case, but it gets harder when the time passes midnight, when there is a break, or when you need the answer as a decimal number for a time sheet. The Time Duration Calculator finds the time between a start and an end, and shows it in the form that you need.
What you enter
- The start time and the end time. These are times on a clock, such as 09:00 and 17:30.
- What you know: two times on a clock, or a start and an end with dates. Use dates when the time is longer than a day.
- A break (optional): the number of minutes to take off, for an unpaid lunch for example.
- An hourly rate (optional): to see the pay for the time.
How the results are worked out
The calculator turns each time into the number of minutes since midnight, and takes one from the other:
minutes since midnight = hours x 60 + minutes duration = end - start if the end is earlier than the start, add 24 x 60 = 1,440 minutes hours = duration / 60 (whole part) minutes = duration - hours x 60
With dates, each whole day between the two dates adds 1,440 minutes:
duration = days between the dates x 1,440 + (end time - start time)
If there is a break, it is taken off the total. Pay is the decimal hours times the rate.
A worked example
You start work at 09:00 and finish at 17:30, with a 30-minute unpaid break. You are paid $20 an hour.
| Step | Result |
|---|---|
| Start (9 x 60) | 540 minutes |
| End (17 x 60 + 30) | 1,050 minutes |
| Time between (1,050 - 540) | 510 minutes, which is 8 hours 30 minutes |
| Less the break | 480 minutes, which is 8 hours |
| In decimal hours | 8.0 hours |
| Pay (8 x $20) | $160 |
Chart: the hours of the day
The 24 hours of a day, with the time from 09:00 to 17:30 in green. Each block is half an hour.
████████████████████████████████████████████████ Midnight 09:00 17:30 midnight
Past midnight
If the end is earlier than the start, the end must be on the next day. A night shift from 22:00 to 06:00:
| Step | Result |
|---|---|
| Start (22 x 60) | 1,320 minutes |
| End (6 x 60) | 360 minutes |
| End - start | -960 minutes, which is negative |
| Add 1,440 minutes | 480 minutes, which is 8 hours |
████████████████████████████████████████████████ Midnight 06:00 22:00 midnight
The green part on the right is the time from 22:00 to midnight, and the green part on the left is from midnight to 06:00. Together they make 8 hours.
The same start and end
If the start and the end are the same, for example 09:00 and 09:00, the answer with two clock times is 0, because a clock cannot say if you mean 0 hours or 24 hours. The calculator tells you this. To measure a full day, choose the option with dates: 09:00 on Monday to 09:00 on Tuesday is exactly 24 hours.
More than a day
With dates, the time can be as long as you like. From 09:00 on 16 March to 17:45 on 19 March, with a total break of 90 minutes:
| Step | Result |
|---|---|
| Whole days (16 March to 19 March) | 3 days = 4,320 minutes |
| End time - start time (17:45 - 09:00) | 525 minutes |
| Time between | 4,845 minutes, which is 3 days 8 hours 45 minutes |
| Less the break | 4,755 minutes, which is 79.25 hours |
Dates are counted as calendar days. A change to or from daylight saving time, in which a day has 23 or 25 hours, is not counted.
Minutes as decimal hours
Many pay systems want hours as a decimal number. Divide the minutes by 60:
| Minutes | Decimal hours |
|---|---|
| 6 | 0.1 |
| 10 | 0.1667 |
| 15 | 0.25 |
| 20 | 0.3333 |
| 30 | 0.5 |
| 45 | 0.75 |
| 60 | 1 |
15 min ██████████ 0.25 h 30 min ████████████████████ 0.5 h 45 min ██████████████████████████████ 0.75 h 60 min ████████████████████████████████████████ 1 h
So 8 hours 45 minutes is 8.75 hours, not 8.45. This is a common mistake on time sheets.
Some common shifts
| Shift | Time | Decimal hours |
|---|---|---|
| 09:00 to 17:00 | 8 hours | 8.0 |
| 08:30 to 17:00 | 8 hours 30 minutes | 8.5 |
| 07:00 to 19:00 | 12 hours | 12.0 |
| 22:00 to 06:00 | 8 hours | 8.0 |
| 13:00 to 17:00 | 4 hours | 4.0 |
13:00 - 17:00 █████████████ 4 h 09:00 - 17:00 ███████████████████████████ 8 h 08:30 - 17:00 ████████████████████████████ 8.5 h 22:00 - 06:00 ███████████████████████████ 8 h 07:00 - 19:00 ████████████████████████████████████████ 12 h
Tips
- Use the 24-hour clock if you are not sure about AM and PM. 17:30 is clearer than 5:30.
- Check the break rules of your job. In some places, a break of a certain length must be paid.
- Round only at the end. Add up the exact minutes for the week, and then round, if your employer does this.
- Use dates for a shift that crosses two days, if you also need to know the date on which it ended.
What this calculator does not include
- Daylight saving time. On the two days when the clocks change, a night is one hour shorter or longer than it seems.
- Overtime rules, and different rates for nights or weekends.
- Time zones. Use a time zone calculator to compare times in different places.
- Seconds. The times are counted in whole minutes.
This tool gives an estimate for general information only. For pay, check your contract and your local law.