Time Duration Calculator
Find the hours and minutes between two clock times, including overnight shifts, subtract an unpaid break and get decimal hours for a timesheet.
What is a time duration calculator?
This time duration calculator finds how much time passes between a start time and an end time. It gives the Duration in hours and minutes, the same length as Decimal hours and Total minutes, and, if you enter an unpaid break, the Time minus break and Decimal hours minus break. Decimal hours are the format most timesheets and payroll forms ask for.
You can type times the way you would write them: 24-hour times such as 17:30 or 1730, or 12-hour times such as 5:30 pm, 5pm or 5:30 p.m. When the end time is earlier than the start time, as in a 10 pm to 6 am shift, the calculator assumes the shift ends the next day and labels the result "through midnight". If you only want same-day answers, switch that setting and an end time earlier than the start shows no result instead.
It works with clock times only, for a single range of up to 24 hours. It does not know dates, time zones or daylight saving time, so a shift that spans a clock change, or two places in different time zones, needs a manual adjustment. The examples and FAQs below explain both cases.
Formula
Step 1: turn each time into minutes after midnight
T = hours × 60 + minutes, using the 24-hour clock. A 12-hour time is converted first: add 12 to p.m. hours from 1 to 11, treat 12 a.m. as hour 0 (midnight) and keep 12 p.m. as hour 12 (noon).
| 12-hour | 24-hour | Minutes after midnight |
|---|---|---|
| 12:00 am | 00:00 | 0 |
| 9:15 am | 09:15 | 555 |
| 12:00 pm | 12:00 | 720 |
| 5:30 pm | 17:30 | 1,050 |
| 11:59 pm | 23:59 | 1,439 |
Step 2: subtract
Duration = End − Start. If the answer is negative, the end time is on the next day: in overnight mode the calculator adds 1,440 minutes (24 hours); in same-day mode it shows no result. If start and end are the same, overnight mode reads it as a full 24 hours and same-day mode as 0.
Step 3: break and decimal hours
Time minus break = Duration − break minutes, never less than zero. Decimal hours = minutes ÷ 60, shown to three decimal places. To turn minutes back into hours and minutes, divide by 60: the whole number is the hours and the remainder is the minutes, so 465 minutes = 7 × 60 + 45 = 7 h 45 min.
To check any answer, count forward from the start: 8:45 am plus 8 h 30 min is 5:15 pm. Decimal hours are the minutes written as a fraction of an hour, so the digits after the point are not minutes. Common conversions:
| Minutes | Decimal hours |
|---|---|
| 5 | 0.083 |
| 10 | 0.167 |
| 15 | 0.250 |
| 20 | 0.333 |
| 30 | 0.500 |
| 40 | 0.667 |
| 45 | 0.750 |
| 50 | 0.833 |
Worked example
Example 1: a day shift with a 45-minute lunch
- Start 8:45 am = 8 × 60 + 45 = 525 minutes. End 5:15 pm = 17:15 = 17 × 60 + 15 = 1,035 minutes.
- Duration: 1,035 − 525 = 510 minutes = 8 h 30 min, or 8.500 decimal hours.
- Minus the 45-minute break: 510 − 45 = 465 minutes = 7 h 45 min, or 7.750 decimal hours.
Example 2: an overnight shift, 7:00 pm to 7:00 am with a 60-minute break
- Start 19:00 = 1,140 minutes. End 07:00 = 420 minutes.
- 420 − 1,140 = −720, so the end is on the next day: −720 + 1,440 = 720 minutes = 12 h 0 min (through midnight).
- Minus the break: 720 − 60 = 660 minutes = 11 h 0 min, or 11.000 decimal hours.
- With the setting on "Same day only", the same entry shows no result, because 7:00 am comes before 7:00 pm on one day.
Example 3: the decimal-hours trap
From 6:00 am to 2:20 pm with a 30-minute break: 360 to 860 minutes is 500 minutes, or 8 h 20 min (8.333 decimal hours). Minus the break, that is 470 minutes, or 7 h 50 min. On a timesheet that asks for decimal hours, write 7.833, not 7.50: 50 minutes is 50 ÷ 60 = 0.833 of an hour. Writing 7.50 would drop 20 minutes.
Example 4: a shift on a daylight-saving night
For 10:00 pm to 6:00 am, the calculator shows 8 h 0 min (through midnight) on any night. In the United States, daylight saving time ends at 2:00 a.m. on the first Sunday of November, when clocks go back to 1:00 a.m. and that hour repeats. On the night of October 31 to November 1, 2026, the same shift therefore lasts 9 hours of real time where clocks change. On the night daylight saving time begins (2:00 a.m. on the second Sunday of March, March 8 in 2026), clocks skip from 2:00 to 3:00 and the shift lasts 7 hours. Adjust those nights by hand.
How to use this calculator
- Type the Start time, for example 09:00, 9am or 9:15 pm.
- Type the End time, for example 17:30 or 5:30 pm.
- Leave If the end is earlier than the start on "overnight" for shifts that cross midnight, or choose "Same day only" if an earlier end time should count as a typing error.
- Enter any Unpaid break in whole minutes, or leave it at 0.
- Read the Duration and Decimal hours. With a break entered, use Time minus break and Decimal hours minus break for the timesheet.
Time formats it accepts
- 24-hour: 17:30, 1730, 17.30, 17 30, 0900, or just 9 (read as 09:00).
- 12-hour: 5:30 pm, 5:30pm, 5pm, 530pm, 5:30 p.m., 5:30 PM or 5:30p. Hours must be 1 to 12.
- Not accepted: 24:00 (use 00:00 or 12 am for midnight), words such as "noon", seconds such as 9:30:15, single-digit minutes such as 9:5, and mixed forms such as 17:30 pm.
Breaks, rounding and overtime in the U.S.
The U.S. Department of Labor's guidance under the Fair Labor Standards Act says short rest periods, usually 20 minutes or less, must be counted as hours worked, while bona fide meal periods, typically 30 minutes or more, generally need not be paid if the employee is completely relieved from duty. So a paid coffee break should not go in the unpaid break box. Federal rules also accept rounding start and stop times to the nearest 5 minutes, or the nearest tenth or quarter of an hour, provided that over time it does not leave employees unpaid for time they actually worked. This calculator does not round. Your employer's policy and your state's laws may add their own rules.
Common mistakes
- Typing 12 and 1 without am or pm: they are read as 12:00 (noon) and 01:00, giving 13 h 0 min instead of 1 hour.
- Writing minutes as a decimal: 7 h 50 min is 7.833 hours, not 7.50.
- Subtracting a paid rest break as if it were unpaid.
For a step-by-step guide with timesheet examples, read how to calculate hours between two times. To turn hours into an estimate of take-home pay, use the take-home paycheck calculator.
Sources
Frequently asked questions
Can I type 5pm, or do I need 17:00?
Either works. The calculator accepts 24-hour times (17:00, 1700, 17.00) and 12-hour times with am or pm in upper or lower case, with or without periods or a space (5pm, 5 PM, 5:00 p.m.). Times with no am or pm are read on the 24-hour clock.
Why does 12 to 1 give 13 hours?
Without am or pm, 12 means 12:00 (noon) and 1 means 01:00 in the morning, so the calculator counts from noon to 1 a.m. the next day: 13 h 0 min (through midnight). Type 12 pm and 1 pm, or 12:00 and 13:00, to get 1 h 0 min.
How do I enter midnight?
Use 00:00 or 12 am. 24:00 is not accepted. A shift from 22:00 to 00:00 gives 2 h 0 min (through midnight).
What happens if the start and end times are the same?
In overnight mode, 8:00 to 8:00 is read as a full day: 24 h 0 min (through midnight). In same-day mode it is 0 h 0 min. The calculator never returns more than 24 hours, so for longer spans use the date difference calculator, which works with dates.
Why do I see dashes instead of a result?
Either a time could not be read, or the setting is on "Same day only" and the end time is earlier than the start. Check the format (for example 9:05, not 9:5; 00:00, not 24:00) or switch the setting to overnight. If the unpaid break is longer than the shift, the time minus break shows 0 h 0 min.
Does it handle time zones and daylight saving time?
No. It compares two clock readings as if they were in the same place on a normal day. For a flight or a call between time zones, convert both times to one zone first. For a shift on the night clocks change, add an hour (in November) or subtract an hour (in March), as in Example 4.
How do I convert hours and minutes to decimal hours?
Divide the minutes by 60 and add the result to the hours. 8 h 20 min = 8 + 20 ÷ 60 = 8.333 hours, and 7 h 45 min = 7.750 hours. The calculator shows this in the Decimal hours lines, rounded to three decimal places.
Can I add up a whole week or work out overtime?
The calculator measures one range at a time. Run each shift separately and add the Decimal hours minus break values for the week. Under the federal Fair Labor Standards Act, overtime pay for covered employees is based on hours worked over 40 in a workweek, at least one and one-half times the regular rate, rather than on the length of a single shift. Whether it applies to your job, and any state rules, depends on the job and where you work.