Time Duration Calculator

Work out the hours and minutes between two times, add or subtract time, and total up a timesheet.

What this time duration calculator does

Enter a start time and an end time and the calculator gives the time between them in hours and minutes, in decimal hours and in total minutes. With the default inputs, 9:00 to 17:30 is 8 h 30 min, which is 8.50 decimal hours or 510 minutes.

It has three modes. Between two times measures a period within a day or across midnight. Add or subtract moves a time of day forward or back by a number of hours and minutes, and tells you if the answer lands on a different day. Add up times totals a list of durations, which is what you need for a weekly timesheet.

Times are entered on a 24-hour clock (your browser may show the picker in 12-hour format with AM and PM; the result is the same). Results that are times of day are shown both ways, so 02:05 is also 2:05 AM.

Key takeaways

  • Duration = end time minus start time; add 24 hours if the end is on the next day.
  • Minutes are sixtieths of an hour: 30 minutes is 0.50 hours, 45 minutes is 0.75, and 20 minutes is 0.33.
  • 7 h 30 min is 7.50 decimal hours, not 7.30. Mixing the two up underpays or overcharges.
  • Adding time past midnight rolls over to the next day; the calculator says how many days it moved.
  • The same start and end time is 0 hours on the same day, or exactly 24 hours if it ends the next day.

How to use the calculator

  1. Pick a mode with the tabs at the top: "Between two times", "Add or subtract" or "Add up times".
  2. For a duration, enter the start and end times. If the end time is earlier than the start, such as a night shift from 22:00 to 06:00, tick "Ends the next day". Without the tick, the calculator shows a notice instead of guessing.
  3. To add or subtract, enter the starting time, choose Add or Subtract, and type the hours and minutes. Minutes above 59 are fine: 90 minutes is treated as 1 h 30 min.
  4. To total several durations, enter hours and minutes for each entry. Use "+ Add entry" for more rows and Remove to delete one.
  5. Read the result panel. Use decimal hours for payroll and invoices, and hours and minutes for everything else.

How the duration is worked out

Duration (minutes) = (end hour × 60 + end minute) - (start hour × 60 + start minute) + 1,440 if the end is on the next day

1,440 = minutes in a day (24 × 60)
Hours and minutes = whole hours in the duration, plus the minutes left over
Decimal hours = duration in minutes ÷ 60, rounded to 2 places

Converting both times to minutes after midnight is what makes the subtraction reliable. Subtracting clock times digit by digit goes wrong whenever the minutes need to borrow from the hours: 17:15 minus 8:45 is not 9:30 but 8 h 30 min.

For adding and subtracting, the calculator adds the duration to the start time in minutes and wraps the answer into a single day. Each full 1,440 minutes past midnight moves the result one day on; going below midnight moves it one day back.

Worked examples

A night shift that crosses midnight

A shift starts at 22:00 and finishes at 06:00 the next morning. With "Ends the next day" ticked, the calculator adds a full day to the end time and gives 8 h 0 min, or 8.00 decimal hours and 480 minutes. A 19:00 to 07:00 shift is 12 h 0 min.

Adding time past midnight

A flight leaves at 22:15 and takes 3 hours 50 minutes. Adding 3 h 50 min to 22:15 gives 02:05 (2:05 AM) the next day. Times in this mode are clock times in one place, so for a flight across time zones, convert the arrival with the time zone converter afterwards.

Counting back from a deadline

If you need nine hours' notice before a 07:30 start, subtract 9 h 0 min from 07:30. The answer is 22:30 (10:30 PM) the previous day. Smaller steps work the same way: 2 h 45 min before 09:15 is 06:30.

A weekly timesheet

Daily hours of 8:15, 7:50, 8:30, 8:05 and 7:40 add up to 40 h 20 min, which is 40.33 decimal hours or 2,420 minutes. Enter each day as a row in "Add up times" to get the total.

Common shift lengths

StartEndDurationDecimal hoursMinutes
09:0017:008 h 0 min8.00480
08:3017:008 h 30 min8.50510
07:0015:308 h 30 min8.50510
13:2021:057 h 45 min7.75465
22:0006:00 next day8 h 0 min8.00480
19:0007:00 next day12 h 0 min12.00720
23:3007:15 next day7 h 45 min7.75465
12:0012:00 next day24 h 0 min24.001,440

Durations are the full time between start and end. Subtract unpaid breaks separately.

Converting minutes to decimal hours

Payroll systems, invoicing tools and spreadsheets usually want hours as a decimal. The conversion is the minutes divided by 60. Some values are exact; others repeat and are rounded to two places.

MinutesDecimal hours
50.08
60.10
100.17
120.20
150.25
200.33
250.42
300.50
400.67
450.75
500.83
550.92

Decimal hours = minutes ÷ 60, rounded to two decimal places.

7:30 is not 7.30 hours. Seven and a half hours is 7.50 decimal hours. At $20 an hour, paying 7.30 instead of 7.50 hours short-changes someone by $4.00 for the day. Many employers bill or pay in 6-minute (0.10 hour) or 15-minute (0.25 hour) steps for this reason: those steps convert to tidy decimals.

Midnight, noon and other edge cases

  • Same start and end time. On the same day this is 0 h 0 min. With "Ends the next day" ticked it is exactly 24 h 0 min.
  • Midnight is 00:00. On a 12-hour clock it is 12:00 AM, and noon is 12:00 PM. The full day from 00:00 to 23:59 is 23 h 59 min.
  • Periods longer than a day. The duration mode covers up to 24 hours. For longer spans, add or subtract whole days with the add mode, or use the date calculator.
  • Daylight saving changes. On the night the clocks change, a shift that crosses the change is an hour longer or shorter than the clock times suggest. The calculator uses clock times and does not adjust for this.
  • Adding many hours. 30 hours after 18:00 is 00:00 two days later, and the calculator labels it "+2 days".

Frequently Asked Questions

How do I calculate the hours between two times?

Convert both times to minutes after midnight, subtract the start from the end, and divide by 60. If the end is on the next day, add 1,440 minutes first. From 9:00 to 17:30 is 510 minutes, which is 8 hours 30 minutes or 8.50 decimal hours.

How do I calculate hours for a night shift that goes past midnight?

Tick "Ends the next day". The calculator then adds 24 hours to the end time before subtracting. A shift from 22:00 to 06:00 is 8 hours, and 23:30 to 07:15 is 7 hours 45 minutes.

How do I convert minutes to decimal hours?

Divide the minutes by 60. 15 minutes is 0.25 hours, 30 minutes is 0.50 and 45 minutes is 0.75. Values such as 20 minutes repeat, so they are rounded to 0.33.

Why does my timesheet total look wrong in a spreadsheet?

Usually because hours and minutes were typed as a decimal, so 7:30 became 7.30. Seven and a half hours is 7.50 decimal hours. Total the durations in hours and minutes first, then convert the total to decimal hours.

What time is it 3 hours 50 minutes after 22:15?

02:05 the next day, which is 2:05 AM. The add or subtract mode shows the resulting time on both 24-hour and 12-hour clocks and says when it moves to another day.

How do I subtract hours from a time?

Choose Add or subtract, set the operation to Subtract and enter the hours and minutes. 9 hours before 07:30 is 22:30 on the previous day.

What is the duration if the start and end times are the same?

Zero if both are on the same day. If you tick "Ends the next day", the duration is exactly 24 hours.

Does the calculator subtract lunch breaks?

Not automatically. Work out the time between clock-in and clock-out, then use Add or subtract to take off an unpaid break, or enter shifts net of breaks in the Add up times mode.

Does it account for daylight saving time?

No. It works with clock times, so on the night the clocks go forward or back, a shift that spans the change is one hour shorter or longer in reality than the result shows.

Related Calculators