Time Duration Calculator – Calculate Time Between Two Times
Calculate the duration between any two times with our free online time calculator. Find hours, minutes, and seconds between start and end times, including overnight calculations.
Understanding Time Duration Calculations
Time duration calculations find the elapsed time between two clock times. This is different from converting time units – here you're measuring the span between a start and end time. It's essential for scheduling, payroll, project planning, and tracking work hours.
The tricky part is overnight durations – when the end time is after midnight. If you start work at 10 PM and finish at 6 AM, that's 8 hours, not -16 hours! This calculator automatically handles overnight calculations by adding 24 hours when needed.
How to Calculate Time Duration
Same Day Calculation
When both times are on the same day, simply subtract start from end.
17:30 - 09:00 = 8 hours 30 minutesOvernight Calculation
When end time is after midnight, add 24 hours to the end time.
06:00 + 24:00 = 30:00
30:00 - 22:00 = 8 hoursConverting to Decimal
For payroll or billing, convert minutes to decimal hours.
8h 30m = 8 + 30/60 = 8.5 hours12-Hour Format
Convert AM/PM to 24-hour format for calculation.
2:00 PM = 14:00
12:00 AM = 00:00Worked Examples
Example 1: Standard work day
Problem: Calculate duration from 9:00 AM to 5:30 PM
Solution: Convert to 24-hour: 09:00 to 17:30
17:30 - 09:00 = 8 hours 30 minutes
Decimal: 8.5 hours. Total minutes: 510.
Example 2: Night shift
Problem: Calculate duration from 10:00 PM to 6:00 AM (next day)
Solution: Convert to 24-hour: 22:00 to 06:00
End is before start, so add 24 hours: 06:00 + 24:00 = 30:00
30:00 - 22:00 = 8 hours. This is an overnight shift.
Example 3: Meeting duration
Problem: A meeting runs from 2:15 PM to 4:45 PM. How long?
Solution: 14:15 to 16:45
16:45 - 14:15 = 2 hours 30 minutes
Decimal: 2.5 hours. Total minutes: 150.
Example 4: Full day calculation
Problem: How many hours from midnight to 11:59 PM?
Solution: 00:00 to 23:59
23:59 - 00:00 = 23 hours 59 minutes
Just 1 minute short of 24 hours. Total: 1,439 minutes.
Example 5: Payroll calculation
Problem: Employee works 8:30 AM to 12:00 PM, then 1:00 PM to 5:15 PM. Total hours?
Solution: Morning: 08:30 to 12:00 = 3h 30m
Afternoon: 13:00 to 17:15 = 4h 15m
Total: 7h 45m = 7.75 hours for payroll.
Quick Fact
The concept of dividing the day into 24 hours comes from ancient Egypt around 1500 BCE. They used sundials that divided daylight into 12 hours. Night was also divided into 12 hours based on star positions. The 60-minute hour and 60-second minute came from Babylonian base-60 mathematics, later adopted by Greek astronomers.
Time Duration Reference
Standard Work Day
9:00 AM to 5:00 PM
8 hours
480 minutes
Full Shift
8:00 AM to 4:30 PM
8.5 hours
510 minutes
Night Shift
11:00 PM to 7:00 AM
8 hours
480 minutes
School Day
8:00 AM to 3:00 PM
7 hours
420 minutes
Movie Length
Typical feature film
2 hours
120 minutes
TV Episode
With commercials (1 hour slot)
~42 minutes
Actual content time
Frequently Asked Questions
How do I calculate hours for payroll?
Calculate the duration, then convert to decimal hours. Divide minutes by 60 and add to hours. For example, 7h 45m = 7 + 45/60 = 7.75 hours. Multiply by hourly rate for pay.
What if I work through midnight?
This calculator handles overnight shifts automatically. If end time is earlier than start time (like 22:00 to 06:00), it adds 24 hours to calculate the correct duration across midnight.
How do I subtract lunch break?
Calculate total time at work, then subtract break time separately. For example: 9:00-17:00 is 8 hours. Subtract 30-minute lunch = 7.5 hours worked.
Can I calculate duration across multiple days?
This calculator handles single overnight periods (up to 24 hours). For multi-day durations, calculate each day separately and add them up, or use a date/time calculator that handles full dates.
What's the difference between duration and time of day?
Time of day is a specific moment (3:00 PM). Duration is a span of time (3 hours). You subtract two times of day to get a duration. Duration is measured in hours/minutes; time of day is shown on a clock.
How accurate is this calculator?
It calculates to the second. Enter times with minute precision (HH:MM) and get results in hours, minutes, and seconds. For time clock applications, this level of precision is more than sufficient.
Other Free Tools
Age Calculator – Find Your Exact Age in Years & Days
Calculate your exact age in years, months, and days with our free online age calculator. Enter your birthdate to find your precise age as of today or any specific date.
Date Difference Calculator – Find Days Between Two Dates
Calculate the exact difference between any two dates in days, weeks, months, and years with our free online date difference calculator. Instant and accurate date comparison.
Days Until / Since Calculator – Countdown to Any Date
Find out how many days until or since any date with our free online countdown calculator. Perfect for counting down to events, deadlines, holidays, and special occasions.
Leap Year Checker – Is It a Leap Year? Find Out Online
Check if any year is a leap year with our free online leap year checker. Instantly verify using Gregorian calendar rules with a clear explanation of why it is or isn't a leap year.
Day of the Week Calculator – Find What Day Any Date Falls On
Find out what day of the week any past, present, or future date falls on with our free online day of the week calculator. Works for any date in history.
Date Arithmetic Calculator – Add or Subtract Days from a Date
Add or subtract days, weeks, or months from any date with our free online date arithmetic calculator. Find past and future dates from any starting date instantly.
Time Converter – Convert Seconds, Minutes, Hours, Days Online
Convert between any time unit with our free online time converter. Quickly convert between seconds, minutes, hours, days, weeks, months, and years with precise results.
Free Online Standard Calculator – Fast & Easy Math
Use our free standard calculator online to perform quick arithmetic operations including addition, subtraction, multiplication, and division. Simple, fast, and accurate for everyday math needs.