Time Duration Calculator
This time duration calculator helps you find the exact difference between two times or dates. It is useful for work hours, scheduling, payroll, travel planning, and event timing.
Time Period
Duration
Enter start and end times to calculate duration.
How Time Duration Is Calculated
Time duration is the difference between a start and end timestamp, measured in a consistent unit. The most accurate method is to convert both timestamps to a total-minutes or milliseconds value, subtract, then convert back to hours, minutes, and days. This correctly handles scenarios that span midnight or cross days without the errors that can occur when subtracting hours and minutes independently.
For example, from 11:30 PM to 2:00 AM the next day: convert to minutes (23:30 = 1,410 min, 2:00 = 120 min + 1,440 for the next day = 1,560 min), subtract to get 150 minutes = 2.5 hours. Doing this in your head risks the common error of thinking 11:30 PM to 2:00 AM is a negative span unless you account for the day boundary.
Common Uses for Time Duration Calculation
Accurate time tracking matters in many contexts: Payroll — hourly employees need exact hours worked for correct pay; rounding errors compound across many employees. Project billing — consultants and freelancers bill by the hour and need to log time accurately per project. Travel planning — calculating flight duration or drive time between cities. Event scheduling — ensuring a meeting, show, or shift starts and ends as planned. Medical — tracking elapsed time since a symptom started or a medication was taken.
Frequently Asked Questions
How do I calculate total hours worked in a week?
Calculate duration for each day separately, then add the results. For each day, convert start and end times to minutes from midnight (hours × 60 + minutes), subtract to get total minutes, and divide by 60 for decimal hours. For example, 8:15 AM to 5:45 PM is (17×60+45) − (8×60+15) = 1,065 − 495 = 570 minutes = 9.5 hours. Sum each day's total for weekly hours. If your employer rounds to the nearest quarter-hour, adjust each day's hours to the nearest 0.25 before summing.
Does daylight saving time affect duration calculations?
Yes, for spans that cross a DST transition. In spring "forward" transitions, the hour between 2:00 AM and 3:00 AM doesn't exist — a shift from 1:00 AM to 4:00 AM is actually only 2 hours, not 3. In fall "back" transitions, the hour between 1:00 AM and 2:00 AM repeats — a shift from midnight to 3:00 AM is actually 4 hours, not 3. Payroll systems and scheduling software should handle this automatically, but manual calculations across overnight shifts in spring or fall need to account for the DST transition to avoid under- or over-paying workers.
How do I convert decimal hours to hours and minutes?
Separate the whole number and the decimal part. The whole number is the hours. Multiply the decimal by 60 to get minutes. For example, 7.75 hours = 7 hours (whole number) + 0.75 × 60 = 45 minutes = 7 hours 45 minutes. Conversely, to convert 7 hours 45 minutes to decimal: 7 + 45/60 = 7 + 0.75 = 7.75. Decimal hours are easier for arithmetic (adding, averaging, multiplying by an hourly rate), while hours:minutes format is easier to read on a timesheet.