Time Duration Calculator

Add and subtract hours and minutes, or find the time between two clock times.

Inputs

These are example values. Change any of them to calculate your own.

Try:

Breaks or overtime? Use the timesheet calculator.

Read 3:45 as

1:02:30 is always hours, minutes and seconds.

Durations

One per row, like 1h 45m, 105m, 90s, or 1:45 read as set above. Minutes over 59 carry into hours.

Row 1

Read as 2 h 45 min

Add or subtract
Row 2

Read as 3 h 20 min

Add or subtract
Row 3

Read as 1 h 35 min

Add or subtract
Row 4

Read as 4 h 15 min

Add or subtract
Row 5

Read as 50 min, subtracted

Add or subtract

Results

Total duration

11:05:00

11 hours 5 minutes, from 4 rows added and 1 subtracted.

Decimal hours
11.0811.083333 to six places
Total minutes
66560 minutes an hour
Total seconds
39,9003,600 seconds an hour
Days and hours
0 d 11 h 5 minLess than a day
Added
11:55:004 rows
Subtracted
0:50:001 row

Copy just the number, for a spreadsheet or payroll:

How this was calculated

  1. Row 1 in seconds, 2:45: 2 h 45 min = 2 × 3,600 + 45 × 60 = 9,900 s
  2. Row 2 in seconds, 3h 20m: 3 h 20 min = 3 × 3,600 + 20 × 60 = 12,000 s
  3. Row 3 in seconds, 95m: 1 h 35 min = 1 × 3,600 + 35 × 60 = 5,700 s
  4. Row 4 in seconds, 4.25: 4 h 15 min = 4 × 3,600 + 15 × 60 = 15,300 s
  5. Row 5 in seconds, 0:50: 50 min = 50 × 60 = 3,000 s (subtracted)
  6. Add and subtract: 9,900 + 12,000 + 5,700 + 15,300 − 3,000 = 39,900 s
  7. Back to hours, minutes and seconds: 39,900 s ÷ 3,600 = 11 h, remainder 300 s; 300 ÷ 60 = 5 min, remainder 0 s → 11:05:00
  8. Decimal hours: 39,900 ÷ 3,600 = 11.083333 h (11.08 to two decimals); minutes: 39,900 ÷ 60 = 665 min
  9. In Excel or Google Sheets: enter each duration as a time (2:45:00), add them with =SUM() and format the total as [h]:mm:ss so it doesn’t start again at 0 after 24 hours; multiply by 24 for decimal hours.
Durations and running total
RowEnteredDurationDecimal hoursRunning total
12:452:45:002.752:45:00
23h 20m3:20:003.336:05:00
395m1:35:001.587:40:00
44.254:15:004.2511:55:00
50:50−0:50:00−0.8311:05:00

Assumptions

  • 1 hour = 60 minutes = 3,600 seconds, and a day is 24 hours.
  • Hours are not wrapped at 24: 25:30:00 is 25 hours 30 minutes, not a time of day.
  • A number on its own is in hours (in minutes when 3:45 is read as minutes and seconds).
  • h:mm:ss is rounded to the nearest second, or to the decimals of a second you typed; decimal hours are shown to 2 places and copied to 6.

Calculated in your browser. This site doesn't send or store the numbers you enter.

Updated Report a problem with this calculator

What this calculator answers

It does three jobs with hours, minutes and seconds. It adds and subtracts a list of durations, such as hours logged for a client, lap times or the legs of a trip, and gives the total even when it passes 24 hours or drops below zero. It finds the time between two clock times, including a span that crosses midnight. And it adds a duration to a clock time, or subtracts one, to say what time it will be and on which day. Every result comes in h:mm:ss, decimal hours, total minutes and total seconds.

How to use it

  • Find: the job. Total of durations adds and subtracts rows; Time between two clock times takes a start and an end; Clock time plus or minus a duration takes a start and a duration.
  • Durations (one per row): type them the way you have them. 1:45, 1h 45m, 105m, 1.75h and 6300s are all 1 hour 45 minutes; 1:45:30 adds 30 seconds. A number on its own is hours, so 4.25 is 4 hours 15 minutes. Minutes or seconds over 59 carry over: 95m is read as 1 h 35 min and 1:75 as 2 h 15 min. :45 is read as 0:45, and ISO 8601 durations such as PT1H45M work too. Under each row the calculator says how it read the entry.
  • Add or subtract: set each row to Add or Subtract, and the total can be negative. For a clock time plus or minus a duration, Add goes later and Subtract earlier.
  • Read 3:45 as: hours and minutes (the default), or minutes and seconds for song, video and lap times. In minutes-and-seconds mode a number on its own is minutes, and hundredths are kept: laps of 1:32.45, 1:30.8 and 1:31.27 total 0:04:34.52, an average of 1:31.51 a lap.
  • Start time and end time: 9, 9am, 930, 9:30 pm, 21:30 and noon all work. A number without am or pm is on the 24-hour clock, so 5 is 5:00 a.m.; type 5pm or 17:00 for the evening. 24:00 is the midnight that ends the day.
  • End is on: Auto puts the end on the next day whenever it is at or before the start, which is how an overnight shift reads. Choose Same day or Next day to say so yourself; Next day with an end after the start gives a span of more than 24 hours.

Rows are added with Add row, copied with Duplicate, or pasted from a spreadsheet column with Paste rows. The Try buttons load the cases below: a night shift from 10:30 p.m. to 7:15 a.m., three lap times, a trip with two connections, 11:20 p.m. plus 3 h 50 min, and a 40-hour budget with 43 h 25 min used. Two Copy buttons under the result copy just the total, as h:mm (h:mm:ss when there are seconds) or as decimal hours, for a timesheet cell or an invoice. Save for comparison keeps up to three results side by side, with the difference from the first.

This page has no break or pay fields. For several shifts, unpaid breaks or overtime, use a timesheet calculator. For a time between two clock times of up to 24 hours, in whole minutes, Continue in the Timesheet Calculator carries the start and end into Monday of a time card.

How to add and subtract hours and minutes

Convert every duration to seconds, add and subtract the seconds, then convert the total back. Using one unit is what makes minutes past 59 carry into hours, and borrowing an hour happen, without any special rules.

seconds=h×3600+m×60+sdecimal hours=seconds3600\text{seconds} = h \times 3600 + m \times 60 + s \qquad \text{decimal hours} = \frac{\text{seconds}}{3600}
  • hh, mm and ss are the hours, minutes and seconds of one duration.
  • To go back, divide the total seconds by 3,600 for whole hours, divide what is left by 60 for minutes, and what is left after that is seconds.

Worked example: a week of client hours

One client’s hours for a week were logged four different ways: 2:45 on Monday, 3h 20m on Tuesday, 95m on Wednesday and 4.25 on Thursday. A 50-minute call that can’t be billed comes off.

  1. Each entry in seconds: 2:45 is 2 × 3,600 + 45 × 60 = 9,900 s; 3h 20m is 12,000 s; 95m is 95 × 60 = 5,700 s (1 h 35 min); 4.25 hours is 4.25 × 3,600 = 15,300 s (4 h 15 min); the call, 0:50, is 3,000 s.
  2. Add and subtract: 9,900 + 12,000 + 5,700 + 15,300 − 3,000 = 39,900 s.
  3. Back to hours and minutes: 39,900 ÷ 3,600 = 11 h with 300 s left, and 300 ÷ 60 = 5 min, so the total is 11:05:00.
  4. Decimal hours: 39,900 ÷ 3,600 = 11.083333…, or 11.08 hours to two decimals. In minutes, 39,900 ÷ 60 = 665.

The four days add up to 11:55:00 before the call comes off.

How many hours are between two times?

Subtract the start from the end on the 24-hour clock. From 8:45 a.m. to 5:20 p.m. is 17:20 − 8:45 = 8:35, or 8.58 hours. When the end is at or before the start, the span crosses midnight, as the next section shows.

Times that cross midnight

When the end time is at or before the start, the end is on the next day: add 24 hours to the end before you subtract.

time between={end−startsame day(end+24 h)−startend on the next day\text{time between} = \begin{cases} \text{end} - \text{start} & \text{same day} \\ (\text{end} + 24\ \text{h}) - \text{start} & \text{end on the next day} \end{cases}

A night shift from 10:30 p.m. to 7:15 a.m. is (7:15 + 24:00) − 22:30 = 31:15 − 22:30 = 8:45:00, or 8.75 hours. The calculator also splits it at midnight: 1:30:00 on the start day and 7:15:00 on the next, which helps when each calendar day is logged or paid separately.

Choosing Same day when the end is earlier gives a negative answer, with a note: 3 p.m. is 2 hours before 5 p.m. Choosing Next day when the end is later gives more than a day, such as 9:00 a.m. to 10:00 a.m. the next day, 25 hours.

12-hour and 24-hour time

On the 24-hour clock, add 12 to the hours from 1 p.m. to 11 p.m. (5:30 p.m. is 17:30) and write 12 a.m. as 00:00. Noon is 12:00. The a.m. and p.m. labels are ambiguous for noon and midnight themselves, as NIST notes, so this calculator reads 12 a.m. as midnight at the start of a day, 12 p.m. as noon, and accepts 24:00 for midnight at the end of a day. Under each time it shows both forms, for example “10:30 PM (22:30)”.

Adding hours to a clock time

Add the duration to the start, then take off 24 hours for each day that passes. At 11:20 p.m., 3 h 50 min later is 23:20 + 3:50 = 27:10; less 24 hours that is 3:10 a.m. the next day. Subtracting works the same way backward: going back past midnight lands on the day before, and a duration of several days counts the midnights crossed.

Totals over 24 hours and negative totals

Hours keep counting past 24, so a total reads as a length of time, not a time of day. A trip of 6:50, 2h 45m, 12:35, 75m and 1.5 hours totals 24:55:00, or 1 day 55 minutes and 24.92 decimal hours.

When the rows subtracted are larger, the total is negative. A 40-hour budget with 43 h 25 min used gives −3:25:00, or −3.42 hours: the budget is overrun by 3 hours 25 minutes. The minus sign applies to the whole total.

Converting minutes to decimal hours

Divide the minutes by 60. To go back, multiply the decimal part by 60: 0.75 hours is 45 minutes. With seconds, add them divided by 3,600: 1:45:30 is 1 + 45 ÷ 60 + 30 ÷ 3,600 = 1.758333 hours, 1.76 to two decimals.

MinutesDecimal hours (to 6 places)To 2 decimals
10.0166670.02
50.0833330.08
60.10.10
100.1666670.17
120.20.20
150.250.25
200.3333330.33
300.50.50
400.6666670.67
450.750.75
500.8333330.83

Round only the total. Three 20-minute sessions are 1.00 hour, but rounding each one first gives 0.33 + 0.33 + 0.33 = 0.99. The calculator keeps every second and rounds only what it shows; the Copy button for decimal hours gives six decimal places.

Adding hours and minutes in Excel or Google Sheets

Enter each duration as a time, such as 2:45:00, add them with =SUM(A1:A5), and format the total cell as [h]:mm:ss. The square brackets let the hours go past 24; with a plain h:mm format the hours never go past 24, so a 24:55 total shows as 0:55. Google Sheets uses the same [h] elapsed-hours token.

A spreadsheet stores a time as a fraction of a day, so multiplying by 24 gives decimal hours (=A6*24), and by 1,440 minutes. For two clock times that may cross midnight, =MOD(B1-A1, 1) adds the missing day before you multiply.

Reading the result

  • The headline is the total, the time between, or the new clock time, with the same value in words.
  • Decimal hours is shown to two decimals, with six under it when two aren’t exact. Total minutes and total seconds follow, and for totals, days and hours (24 hours to a day), the time added and subtracted, and the average row when every row adds (useful for laps).
  • Copy buttons copy just the h:mm (or h:mm:ss) total or the decimal hours.
  • How this was calculated converts each entry to seconds, adds and subtracts, and converts back, so any total can be checked by hand.
  • Durations and running total lists each row with its sign, decimal hours and the total so far. For a span across midnight, Time on each day splits it at midnight. Both download as CSV.

Assumptions and limitations

  • Clock times have no date or time zone, and daylight saving time is not counted. A shift from 10:00 p.m. to 6:00 a.m. shows 8:00:00 even on the night in November when the clocks go back and it lasts 9 hours; add a 1:00 row for that night, or subtract one for the March night.
  • Hours are not wrapped at 24, and 1 day is 24 hours.
  • Totals keep every millisecond typed. h:mm:ss is shown to the nearest second, or to the tenths, hundredths or thousandths of a second you typed; decimal hours to two places.
  • Each entry can be up to 1,000,000 hours, with up to 100 rows. A day in an entry (2d, P2D) is 24 hours, and an ISO 8601 week (P1W) is 7 days. ISO 8601 years and months (P1Y, P2M) are refused, because their length depends on the dates.
  • There are no breaks, pay rates, rounding rules or overtime on this page.

Common mistakes

  • Treating 1:45 as 1.45 hours. 1:45 is 1.75 hours; 1.45 hours is 1 hour 27 minutes. Minutes are sixtieths of an hour, not hundredths.
  • Typing minutes as a bare number. Here 45 means 45 hours. Type 45m or 0:45; the calculator flags whole numbers of 15 or more read as hours.
  • Reading 3:45 the wrong way. A video of 3:45 is 3 minutes 45 seconds. Choose minutes and seconds before adding media or lap times.
  • Subtracting across midnight without the extra day. 7:15 − 22:30 is −15:15 until 24 hours are added; Auto does that for you.
  • Mixing up 12 a.m. and 12 p.m. 12 a.m. is midnight at the start of the day. If in doubt, type noon, midnight or a 24-hour time.
  • Subtracting local times across time zones. A flight that leaves at 10:00 in one zone and lands at 14:00 in another did not take 4 hours unless the zones match. Add the flight times the itinerary lists instead.
  • Formatting a spreadsheet total as h:mm. It shows 0:55 for a 24:55 total; use [h]:mm.

Questions

How many hours is 9 a.m. to 5:30 p.m.?

8 hours 30 minutes, or 8.5 hours. In 24-hour time the end is 17:30, and 17:30 − 9:00 = 8:30. Any unpaid lunch comes off that; with a 30-minute lunch it is 8 hours.

Is 12 a.m. midnight or noon?

This calculator reads 12 a.m. as midnight at the start of the day and 12 p.m. as noon, the way digital clocks show them. NIST points out that both are ambiguous in writing, so typing midnight, noon, 0:00, 12:00 or 24:00 leaves no doubt.

Sources

  1. NIST Guide to the SI, Chapter 5: Units Outside the SI (Table 6) National Institute of Standards and Technology (NIST SP 811) 1 min = 60 s, 1 h = 60 min = 3,600 s and 1 d = 24 h = 86,400 s, the conversions behind every step.
  2. Times of Day FAQs National Institute of Standards and Technology 12 a.m. and 12 p.m. are ambiguous, though a clock shows p.m. from the moment it reads 12:00 at noon; on a 24-hour clock 0000 is midnight at the start of a day and 2400 midnight at its end.
  3. Daylight Saving Time Rules National Institute of Standards and Technology In most of the US, clocks skip from 2 a.m. to 3 a.m. on the second Sunday of March (one hour less that day) and go back from 2 a.m. to 1 a.m. on the first Sunday of November (one hour repeated).
  4. Format numbers as dates or times Microsoft Support (Excel) The [h]:mm format shows elapsed time in hours past 24; [mm]:ss shows elapsed minutes.
  5. Calculate the difference between two times Microsoft Support (Excel) Subtracting two times and multiplying by 24, 1,440 or 86,400 gives hours, minutes or seconds; with the h, mm and ss format codes, hours never go past 24.
  6. Date and number formats (Google Sheets) Google for Developers The [h+], [m+] and [s+] tokens show the elapsed hours, minutes or seconds in a time duration.
  7. RFC 3339, Appendix A: ISO 8601 Collected ABNF IETF (RFC Editor) The ISO 8601 duration format, P with weeks, days, months or years, then T with hours, minutes and seconds (PT1H45M).