🛠️ Other ToolsFree · No signup

Time Duration Calculator

Calculate the exact duration between two times — hours, minutes, and seconds. Supports AM/PM and 24-hour formats, overnight durations, and multi-day spans.

Duration

8h 30m 0s

30,600 total seconds

Hours

8

Minutes

30

Seconds

0

Total Minutes

510

About the Time Duration Calculator

A time duration calculator computes the exact time elapsed between two time points — hours, minutes, and seconds — handling AM/PM format, 24-hour format, midnight crossings, and multi-day spans. Knowing exact duration is essential for payroll and billing (hours worked), project management (time spent on tasks), cooking and manufacturing (process duration), sports and fitness (elapsed time, lap times), and scheduling (meeting length, event planning). Time arithmetic is deceptively tricky: 5:45 PM to 9:15 PM is not 4:70 PM but rather 3 hours 30 minutes; times crossing midnight require special handling (e.g., 11:00 PM to 7:00 AM is 8 hours, not -4 hours). The calculator handles all these edge cases automatically, outputting duration in total hours, total minutes, and the hours:minutes:seconds breakdown. Converting to decimal hours (e.g., 7 hours 45 minutes = 7.75 hours) simplifies payroll and billing calculations. This tool is used across industries — from healthcare workers logging shift hours to film crews tracking production time to project managers billing clients.

Formula

Duration = End_seconds − Start_seconds (+ 86400 if negative) | Decimal hours = hours + minutes/60 + seconds/3600

How It Works

Convert both times to total seconds from midnight (or a fixed reference). Duration = end_seconds − start_seconds. If negative (overnight), add 86,400 (seconds in a day). Decompose duration: hours = floor(duration_s / 3600); remaining = duration_s mod 3600; minutes = floor(remaining / 60); seconds = remaining mod 60. AM/PM conversion: 12 AM = 0 hours; 1 AM = 1 h; 12 PM = 12 h; 1 PM = 13 h; 11 PM = 23 h. Example 1: 9:00 AM to 5:30 PM. Start = 9×3600 = 32400 s. End = 17×3600 + 30×60 = 63000 s. Duration = 63000 − 32400 = 30600 s = 8 h 30 min = 8.5 decimal hours. Example 2 (overnight): 11:00 PM to 7:00 AM. Start = 83400 s. End = 25200 s. Duration = 25200 − 83400 + 86400 = 28200 s = 7 h 50 min.

Tips & Best Practices

  • For payroll calculations, convert time duration to decimal hours before multiplying by hourly rate. 7 hours 45 minutes = 7 + 45/60 = 7.75 hours. At $20/hour: 7.75 × $20 = $155. Many time-tracking systems store time as minutes and convert to decimal hours for billing.
  • Lunch and break deductions: if calculating net work hours, subtract unpaid break time from total duration. If an employee works 8:00 AM to 5:00 PM with a 30-minute unpaid lunch, net hours = 9.0 − 0.5 = 8.5 hours.
  • Time zones: this calculator assumes both times are in the same time zone. For events spanning time zone changes (flights, international calls), convert both times to UTC first, then calculate the duration in UTC, then convert results back to the desired local time if needed.

Who Uses This Calculator

Employees and freelancers calculating hours worked for weekly timesheets and billing. Healthcare professionals logging shift duration and patient care hours. Project managers tracking time spent on tasks and billing clients for professional services. Athletes and coaches measuring training session durations, rest periods, and race splits.

Optimised for: USA · UK · Canada · Australia · Calculations run in your browser · No data stored

Frequently Asked Questions

How do I calculate hours worked between two times?

Subtract start time from end time. For example, 9:00 AM to 5:30 PM = 8 hours 30 minutes = 8.5 hours. For overnight shifts (e.g. 11:00 PM to 7:00 AM), add 24 hours to the end time: 7:00 AM + 24h = 31:00, then 31:00 - 23:00 = 8 hours.

How do I convert time duration to decimal hours?

Divide minutes by 60 and add to whole hours. Example: 2 hours 45 minutes = 2 + (45/60) = 2.75 hours. Decimal hours are used for payroll calculations. Multiply by hourly rate directly: 2.75 hours × $20/hour = $55.

How many working hours are in a year?

A standard full-time schedule is 40 hours/week × 52 weeks = 2,080 hours per year. Subtracting typical US paid holidays (10 days = 80 hours): approximately 2,000 productive hours. The UK standard is 37.5 hours/week = 1,950 hours annually.