Time Duration Calculator

Calculate the duration between two times in hours and minutes

Enter start and end times using 24-hour format (hours 0-23, minutes 0-59). Select Yes if the period crosses midnight.

Calculating time durations accurately including overnight periods

Time duration is one of the most common calculations people need in daily life, yet it is surprisingly easy to get wrong. Subtracting two times on paper requires managing the fact that hours count to 24 and minutes count to 60, not to 10 or 100. If a task starts at 09:45 and ends at 14:20, the duration is not simply 14:20 minus 09:45. You need to handle the minute column first: 20 minutes minus 45 minutes requires borrowing an hour, giving 80 minutes minus 45 minutes = 35 minutes, and then 13 hours minus 9 hours = 4 hours, for a total of 4 hours and 35 minutes. This calculator handles all of that arithmetic automatically so you get a reliable answer in seconds.

The calculation works by converting both times to a total number of minutes since midnight. Start time: hours multiplied by 60 plus minutes. End time: the same. The duration is end minus start. The result is then converted back to hours and minutes for display. Total minutes and total seconds are also shown, which is useful when you need to perform further calculations, enter the value into a timesheet, or compare durations across different activities.

Overnight periods add complexity. If someone starts a shift at 22:00 and ends at 06:00 the next day, a simple subtraction gives a negative result, which is wrong. This calculator provides a "Crosses midnight?" option. When set to Yes, 1440 minutes (one full day) is added to the end time before the subtraction, giving the correct positive duration. For the example above: end = 6 x 60 = 360 minutes, plus 1440 = 1800; start = 22 x 60 = 1320. Duration = 1800 - 1320 = 480 minutes = 8 hours.

Time duration calculations are useful in many contexts. Employees calculating hours worked for hourly wages need to know the exact duration of each shift, including any that span midnight. Students timing study sessions or practice intervals benefit from knowing exactly how long they spent. Athletes tracking training sessions, event organizers scheduling programs, and project managers logging work hours all routinely need to find the difference between two clock times.

24-hour format and common time conversions

This calculator uses 24-hour (military) format to avoid ambiguity between AM and PM. In 24-hour format, midnight is 00:00, noon is 12:00, and 11 PM is 23:00. To convert a 12-hour PM time to 24-hour format, add 12 to the hours (except 12 PM, which stays as 12:00). For AM times, keep the hours as-is (except 12 AM midnight, which becomes 00:00). For example, 3:30 PM becomes 15:30, and 11:45 AM stays as 11:45.

If you need to work with 12-hour AM/PM times, simply convert the hours before entering them. The calculator accepts any hour from 0 to 23 and any minute from 0 to 59. Values outside these ranges are caught and flagged as errors so you can correct the entry immediately rather than receiving a silently wrong result.

From total minutes to hours and payroll applications

The total minutes output is especially useful in payroll and billing contexts. Many time tracking systems store durations in minutes rather than hours:minutes format. If you are logging 4 hours and 37 minutes of work, that is 277 minutes total. To calculate pay, you would multiply 277 by the per-minute rate, or divide by 60 first to get the decimal hours (4.617 hours) and multiply by the hourly rate. The calculator shows both the hours-and-minutes form and the total minutes so you can use whichever is more convenient for your downstream calculation.

Total seconds is also included for completeness. This is useful in sports and performance timing, where elapsed seconds matter. A swimmer with a start at 00:01 and end at 00:03:45 (entered as 0:01 to 0:03 with an offset for seconds -- note this calculator works to the minute level) can combine the minutes output with manual seconds arithmetic for precise timing work. For most everyday purposes, the hours-and-minutes result is sufficient and immediately usable.

Last updated: 2026-05-06