Copied

Reviewed & updated for 2026 by Methodology & sources · How we calculate

How to calculate time duration

Subtract the start time from the end time. If the minutes don't subtract cleanly, borrow 60 minutes from the hours. Convert both times to 24-hour format to avoid AM/PM confusion.

Example: 9:15 AM to 5:40 PM

  1. Convert to 24-hr: 09:15 to 17:40
  2. Subtract minutes: 40 − 15 = 25 min
  3. Subtract hours: 17 − 9 = 8 hours
  4. Result: 8 hours 25 minutes (= 8.42 decimal hours)

Time duration formula

duration = end time − start time

If end < start, add 24 hours to end (crosses midnight)

Midnight handling: if the end time appears earlier than the start time (e.g., 10 PM to 6 AM), add 24 hours to the end. Example: 22:00 to 06:00 → add 24 → 30:00 − 22:00 = 8 hours. If the end is on the next day but later on the clock (09:00 to 17:30 the next day), tick the next-day box and the calculator adds the 24 hours for you.

For conversions between units (SI definitions, NIST SP 330): 1 minute = 60 seconds, 1 hour = 60 minutes = 3,600 seconds, 1 day = 24 hours = 1,440 minutes = 86,400 seconds.

Common time durations

Event H:M Minutes Seconds
Half an hour 0:30 30 1,800
8-hour shift 8:00 480 28,800
40-hour work week 40:00 2,400 144,000
Full day 24:00 1,440 86,400
Full week 168:00 10,080 604,800

Decimal time conversion

Timesheets that multiply hours by a pay rate need decimal hours rather than hours:minutes. To convert: decimal hours = hours + (minutes ÷ 60).

Minutes Decimal hours
15 min 0.25
30 min 0.50
45 min 0.75
5 min 0.08
10 min 0.17
20 min 0.33
25 min 0.42
40 min 0.67
50 min 0.83
55 min 0.92

Time zones and duration

This calculator assumes both times are in the same time zone. For cross-timezone durations, convert both times to UTC first, then subtract. A 3 PM ET departure and 6 PM PT arrival (on the same day) is actually a 6-hour flight, not 3 hours, ET is 3 hours ahead of PT, so 3 PM ET = 12 PM PT, and 12 PM to 6 PM = 6 hours.

Time duration for payroll

For hourly employees, time duration directly determines pay. The standard workflow:

  1. Calculate clock-in to clock-out duration for each day.
  2. Subtract unpaid breaks, such as a lunch break.
  3. Convert to decimal hours (e.g., 7h 30m = 7.5).
  4. Multiply by hourly rate for daily gross pay.
  5. Sum the days for the pay period.
  6. Apply overtime: under the federal Fair Labor Standards Act, covered non-exempt employees must get at least 1.5× their regular rate for hours over 40 in a workweek (U.S. Department of Labor).

Use our Salary to Hourly Calculator to convert between pay structures, or the Salary Calculator for a full take-home pay estimate.

Frequently asked questions

How do I calculate hours between two times?

Put both times on a 24-hour clock and take the start from the end, minutes first. From 9:30 AM to 5:45 PM: 17:45 − 09:30 gives 45 − 30 = 15 minutes and 17 − 9 = 8 hours, so 8 hours 15 minutes (8.25 in decimal hours). When the end minutes are smaller, borrow 60 from the hours: 5:15 − 2:45 becomes 4:75 − 2:45 = 2 hours 30 minutes.

How do I convert hours and minutes to decimal?

Minutes ÷ 60, added to the whole hours. 8 hours 30 minutes is 8 + 30/60 = 8.50; 7 h 15 min is 7.25; 6 h 45 min is 6.75. Worth memorising: 15 min = 0.25, 30 min = 0.50, 45 min = 0.75. A timesheet that multiplies hours by a pay rate needs this form.

How do I calculate hours worked for payroll?

Work out each day's clock-in to clock-out time, take off any unpaid break, and convert to decimal hours. Clocking 8:00 AM to 5:00 PM with a 30-minute unpaid lunch is 9 − 0.5 = 8.5 hours; at an example rate of $20 an hour that is $170 before deductions. Add up the days for the pay period. Federal law (the Fair Labor Standards Act) requires covered, non-exempt employees to be paid at least one and a half times their regular rate for hours over 40 in a workweek, per the Department of Labor.

How many minutes are in X hours?

Hours × 60: 1 hour = 60 min, 2 hours = 120 min, 3 hours = 180 min, 8 hours = 480 min, 24 hours = 1,440 min, and a 168-hour week is 10,080 min. Half hours work the same way: 1.5 h = 90 min, 7.5 h = 450 min. Going the other way, divide by 60: 500 min ÷ 60 = 8.33 hours, or 8 hours 20 minutes.

How do I calculate time across midnight?

Add 24 hours to the end time before subtracting. A 10:00 PM to 6:00 AM shift is 22:00 to 30:00 (6:00 + 24), which is 8 hours. The calculator above does this on its own whenever the end time is earlier than the start, and the next-day box adds the 24 hours when the end is later in the clock but on the following day.

What is elapsed time?

It is how long something took: the gap between a start and a finish. A race that starts at 9:00 AM and ends at 10:35 AM has an elapsed time of 1 hour 35 minutes. It is always a length of time, so it is never negative.

How do I add hours and minutes?

Add the minutes together and the hours together, then carry every 60 minutes into an hour. 2 h 45 min + 1 h 30 min: 45 + 30 = 75 min, which is 1 h 15 min, and 2 + 1 + 1 = 4 h, so 4 hours 15 minutes. In decimals it is 2.75 + 1.5 = 4.25, the same answer.

How do I subtract time?

Take minutes from minutes and hours from hours, borrowing 60 minutes when needed. 5 h 20 min − 2 h 45 min: 20 − 45 won't go, so rewrite 5 h 20 min as 4 h 80 min; 80 − 45 = 35 and 4 − 2 = 2, giving 2 hours 35 minutes. It is ordinary borrowing in base 60.

How many hours is 9am to 5pm?

8 hours: 17:00 − 09:00. Take off a 30-minute unpaid lunch and it is 7.5 hours paid; an hour's lunch leaves 7. Five such days with a half-hour lunch come to 37.5 hours, not 40.

How do I convert minutes to hours?

Divide by 60: 30 min = 0.5 h, 90 min = 1.5 h, 120 min = 2 h, 1,440 min = 24 h. For hours and minutes instead of a decimal, keep the whole hours and turn the remainder back into minutes: 500 min is 8 remainder 20, so 8 hours 20 minutes. The Convert tab above works in both directions.

Hours, minutes, and seconds between any two times

Time Duration Calculator

Free time duration calculator, duration, add/subtract, unit converter.

Duration

—