Free Tools / Time Duration Calculator

Time Duration Calculator

Enter a start and an end time to get the duration — 9:15 AM to 5:40 PM is 8 h 25 min (8.42 hours). Or add or subtract hours and minutes from a time to find when something starts or ends.

Step by step

How to calculate the time between two times

  1. Use the 24-hour clock5:40 PM = 17:40. 9:15 AM = 09:15.
  2. Subtract minutes, then hours40 − 15 = 25 minutes; 17 − 9 = 8 hours → 8 h 25 min.
  3. Borrow an hour if neededFor 17:10 − 09:45, minutes go negative: borrow 1 hour = 60 minutes. 70 − 45 = 25 min, 16 − 9 = 7 h → 7 h 25 min.
  4. OvernightIf the end is earlier than the start, add 24 hours to the end: 06:00 + 24:00 − 22:00 = 8 h.

A quick check: count whole hours to the nearest hour, then add the leftover minutes. 9:15 → 5:15 is 8 hours, plus 25 minutes.

Walkthrough

How to use the Time Duration calculator

Fill in the fields above and press Calculate. Results appear straight away, in your browser — nothing is sent or stored.

  1. I want to — choose from: Find the time between two times, Add time to a start time, Subtract time from a time.
  2. Start time — starts at 9:15 AM; replace it with your own figure.
  3. End time — starts at 5:40 PM; replace it with your own figure. (shown when relevant)
  4. Hours — starts at 2; replace it with your own figure. (shown when relevant)
  5. Minutes — starts at 30; replace it with your own figure. (shown when relevant)

Change any value and press Calculate again to compare scenarios. All figures are estimates for planning; check them against your own policy, contract and local rules before using them for payroll.

Clock arithmetic

Adding and subtracting time

To find an end time, add the hours and minutes to the start and carry every 60 minutes into an hour: 10:50 + 2 h 25 min = 12:75 → 13:15 (1:15 PM). Subtracting works the same way in reverse. If the result passes midnight, the calculator tells you it is the next or previous day.

  • Shift ends: start 6:30 AM + 8.5 hours = 3:00 PM.
  • Meeting starts: needs to end by 4 PM and lasts 1 h 45 min → start by 2:15 PM.
  • Medication or rest intervals: last dose 9:30 PM + 8 hours = 5:30 AM.
Quick answers

Time between common times

How long is 9 AM to 5 PM?

8 h 0 min (8.00 hours).

How long is 8:30 AM to 5 PM?

8 h 30 min (8.50 hours).

How long is 9:15 AM to 5:40 PM?

8 h 25 min (8.42 hours).

How long is 7 AM to 3:30 PM?

8 h 30 min (8.50 hours).

How long is 10 PM to 6 AM?

8 h 0 min (8.00 hours).

How long is 11:45 PM to 7:15 AM?

7 h 30 min (7.50 hours).

How long is 1:20 PM to 4:05 PM?

2 h 45 min (2.75 hours).

How long is 6 AM to 6 PM?

12 h 0 min (12.00 hours).

How long is 12 PM to 12 AM?

12 h 0 min (12.00 hours).

How long is 3:50 PM to 11:10 PM?

7 h 20 min (7.33 hours).

Units

Durations in hours, decimal hours and minutes

The same duration can be written several ways. 8 h 25 min = 8.4167 decimal hours = 505 minutes = 30,300 seconds. Payroll and billing need decimal hours (convert with the decimal time converter); schedules and rotas usually show hours and minutes.

Examples

Worked examples

Real-world scenarios, worked through step by step.

Shift length

6:45 AM to 3:15 PM = 8 h 30 min = 8.5 hours.

Overnight

9:30 PM to 5:50 AM = 8 h 20 min (add 24 hours to the end).

Adding time

10:50 AM + 2 h 25 min = 1:15 PM.

Subtracting time

Must arrive by 8:00 AM, journey 1 h 35 min → leave by 6:25 AM.

Edge cases

Durations that cross days or time zones

  • More than 24 hours: use dates as well as times — the work hours calculator handles multi-day spans.
  • Different time zones: convert both times to the same zone first (the time zone converter does this), then subtract.
  • Daylight saving changes: an overnight span on the night the clocks change is an hour shorter or longer than the clock times suggest.
  • 24-hour times: if your times are in military format (e.g. 2230), convert with the military time converter or type them as 22:30.
At work

Common uses at work

Time between two times is the basis of every shift calculation: hours worked, overtime, breaks and differentials. For a full week use the time card calculator. For teams, time tracking calculates every duration automatically from clock-ins, so nobody subtracts times by hand.

Shifts

Common shift lengths

Durations for shift patterns that come up most often, including overnight shifts:

StartEndDurationDecimal hours
7:00 AM3:00 PM8 h 00 min8.00
7:00 AM7:00 PM12 h 00 min12.00
8:30 AM5:00 PM8 h 30 min8.50
9:00 AM5:30 PM8 h 30 min8.50
3:00 PM11:00 PM8 h 00 min8.00
7:00 PM7:00 AM12 h 00 min12.00
11:00 PM7:00 AM8 h 00 min8.00
10:30 PM6:45 AM8 h 15 min8.25
6:15 AM2:45 PM8 h 30 min8.50

These are total spans; subtract unpaid meal breaks to get paid time — the break time calculator does both.

Tips

Mental math shortcuts

  • Count to the next whole hour first. 9:40 to 3:15 → 9:40 to 10:00 is 20 min, 10:00 to 3:00 is 5 h, plus 15 min → 5 h 35 min.
  • Use 24-hour times for anything past noon. 2:20 PM is 14:20; it makes subtraction straightforward.
  • Overnight: split at midnight. 10:30 PM to 6:15 AM → 1 h 30 min before midnight + 6 h 15 min after = 7 h 45 min.
  • Check with the opposite operation. If the duration is right, start + duration should equal the end time.

For schedules with many shifts, automatic time tracking removes the arithmetic entirely and keeps an audit trail of every start and stop.

Units

Durations in seconds and minutes

DurationMinutesSecondsDecimal hours
15 min159000.25
30 min301,8000.50
45 min452,7000.75
1 h 30 min905,4001.50
2 h 15 min1358,1002.25
7 h 30 min45027,0007.50
8 h48028,8008.00
12 h72043,20012.00
By industry

How different industries use it

  • healthcare: Shift lengths, medication intervals and handover times are all duration calculations, usually in 24-hour time.
  • construction and field service: Time on site versus travel time between jobs.
  • Events and hospitality: Shift and service windows that run past midnight.
Totals

Adding up durations across a week

To total several durations, add the hours and minutes separately and carry every 60 minutes into an hour:

DayDuration
Monday8 h 25 min
Tuesday7 h 50 min
Wednesday8 h 40 min
Thursday9 h 05 min
Friday6 h 45 min
Total40 h 45 min (40.75 h)

Minutes: 25 + 50 + 40 + 5 + 45 = 165 minutes = 2 h 45 min. Hours: 8 + 7 + 8 + 9 + 6 = 38. Total 40 h 45 min. The weekly hours calculator does this for you, in either format.

Spreadsheet formulas

Do it in Excel or Google Sheets

Put the start time in A2 and the end time in B2 (formatted as times).

  • Duration as h:mm, including overnight
    =TEXT(MOD(B2-A2,1),"h:mm")
  • Duration in decimal hours
    =MOD(B2-A2,1)*24
  • Duration in minutes
    =MOD(B2-A2,1)*1440
  • Add 2 h 30 min to A2
    =A2+TIME(2,30,0)

MOD(…,1) wraps negative results into the next day, so overnight spans work without an IF.

Use cases

Who uses the Time Duration calculator — and why

  • Employees checking shift length.
  • Managers building rotas.
  • Event planners scheduling sessions.
  • Students timing study blocks.
  • Healthcare staff timing intervals.
  • Freelancers measuring work sessions.
Methodology & sources

How we calculate

  • Duration = end − start; if the end is earlier, 24 hours are added and the result is marked “next day”.
  • Add/subtract: minutes are carried in 60s and the day change is reported.
  • All calculations run in your browser; nothing you type is sent to StaffTiming or stored.

Formulas checked against the sources above. Last reviewed: October 2026. This tool gives estimates for planning, not legal, tax or payroll advice.

Glossary

Key terms explained

Duration
The length of time between two moments.
Elapsed time
Another word for duration.
Time of day
A clock reading such as 5:40 PM.
24-hour clock
Times from 00:00 to 23:59, avoiding AM/PM.
Borrowing
Converting 1 hour into 60 minutes when subtracting.
Overnight span
A duration that crosses midnight.
Decimal hours
Duration written as a decimal for payroll.
Time zone offset
The difference between local time and UTC.
FAQs

Frequently asked questions

How do I calculate the time between two times?

Subtract the start from the end using 24-hour times. If the end is earlier, add 24 hours.

How many hours is 9 to 5?

8 hours.

How many hours from 10 PM to 6 AM?

8 hours.

How do I add minutes to a time?

Add the minutes and carry every 60 into an hour.

How do I subtract times with minutes?

Subtract minutes first. If negative, borrow 1 hour (60 minutes) from the hours.

Does this work across midnight?

Yes. An end time earlier than the start is treated as the next day.

Can I enter 24-hour times?

Yes — 17:40, 1740 and 5:40 PM all work.

How do I convert the result to decimal hours?

Divide the minutes by 60 and add to the hours; the calculator shows both.

What about durations over 24 hours?

Use the work hours calculator, which takes dates and times.

How long is 12 PM to 12 AM?

12 hours — noon to midnight.

Can I calculate seconds?

Yes, the result includes the duration in seconds.

How do I subtract a duration from a time?

Choose “Subtract time” and enter the hours and minutes.

How many minutes are between two times?

Calculate the duration and multiply the hours by 60, then add the minutes. 2 h 45 min = 165 minutes.

How long is a 7 AM to 7 PM shift?

12 hours before breaks.

How do I count hours on a clock?

Count whole hours to the nearest hour mark, then add the remaining minutes.

How many hours between 8:30 AM and 5:15 PM?

8 hours 45 minutes (8.75 hours).

How many hours between 11 PM and 7 AM?

8 hours.

What time is 8 hours after 10:30 PM?

6:30 AM the next day.

How do I calculate the time between two times in minutes?

Convert both times to minutes after midnight (hours × 60 + minutes) and subtract. Add 1,440 if the end is the next day.

Beyond The Calculator

Automate this with real tracked data.

StaffTiming records hours as they happen and turns them into payroll-ready timesheets, so you never re-type a calculation.

Start Free Trial View Pricing