Time Duration Calculator
Find the elapsed time in hours and minutes between a start and end time.
How it works
This calculator finds the elapsed time between a start time and an end time, expressed in hours and minutes โ a common need for timesheets, scheduling, and tracking how long a task or activity actually took.
The core calculation converts both times to total minutes since midnight, then subtracts the start from the end: an end time of 5:30 PM (1050 minutes) minus a start time of 9:15 AM (555 minutes) gives 495 minutes, which converts back to 8 hours and 15 minutes.
If the end time is earlier than the start time โ for example, a start of 10:00 PM and an end of 6:00 AM โ the calculator assumes the duration crosses midnight into the next day, adding 24 hours (1,440 minutes) before subtracting, correctly handling overnight shifts, late flights, or any span that spills past midnight.
This midnight-crossing logic is important because a naive subtraction would otherwise produce a negative or nonsensical result for any overnight span โ treating a 10 PM to 6 AM shift as "negative 16 hours" rather than the correct 8 hours worked is a common manual-calculation mistake this calculator avoids automatically.
Common practical uses include calculating hours worked for payroll or invoicing, figuring out how long a flight or drive takes based on departure and arrival times, or determining the total duration of an event from its start and end times.
For calculations spanning more than 24 hours, or involving specific calendar dates rather than just times of day (like "how many hours between March 3rd 2pm and March 10th 9am"), a full date-and-time difference calculation is needed rather than this time-of-day-only tool, since a single time-of-day duration doesn't capture how many full days may also be involved.
Breaking a longer time span into smaller, precisely-tracked durations is also standard practice in time management and billing contexts โ freelancers and contractors calculating billable hours, or shift workers verifying scheduled versus actual hours, often rely on exactly this kind of start-time-to-end-time subtraction as their basic building block.
Can it handle overnight shifts?
Yes โ if the end time is before the start time, it's treated as happening the next day.
How is the duration actually calculated?
Both times are converted to total minutes since midnight, then the start is subtracted from the end (adding 24 hours first if the result would be negative), and the result is converted back to hours and minutes.
What happens if I enter the same start and end time?
The calculator returns a duration of 0 hours and 0 minutes, correctly treating it as no elapsed time rather than assuming a full 24-hour span.
Can this calculate durations longer than 24 hours?
No โ this tool is designed for a single time-of-day span (with one midnight crossing at most); for multi-day durations, a full date-and-time difference calculator is needed.
Why would a naive subtraction give the wrong answer for overnight shifts?
Subtracting a later start time directly from an earlier end time (like 10 PM to 6 AM) produces a negative number without adjustment โ the calculator adds 24 hours automatically to correct for the midnight crossing.
Is this useful for payroll calculations?
Yes โ entering a clock-in and clock-out time gives the exact hours and minutes worked, a common step in calculating hourly pay or verifying timesheet entries.
Does it account for AM/PM correctly?
Yes โ enter times with AM/PM (or 24-hour format, depending on the interface) and the calculator interprets them correctly before computing the duration.
Can I use this to calculate flight or travel duration?
Yes โ enter the departure and arrival times to get the elapsed travel time, though be mindful that trips crossing time zones need the times adjusted to the same zone first for an accurate result.
Is this useful for freelance or contract billing?
Yes โ calculating exact billable hours from a recorded start and end time is a common freelance and contracting use case for this type of calculation.
What's a common mistake people make calculating elapsed time manually?
Forgetting to add 24 hours when a shift crosses midnight, which produces a negative or nonsensical result instead of the correct overnight duration โ exactly what this calculator handles automatically.