To calculate the duration between two times, subtract the start time from the end time. If the end time is earlier than the start time (e.g., from 10:00 PM to 6:00 AM), assume the end time is on the next day and add 24 hours to the result.
How to Do It Manually
The simplest method is to convert both times to a 24-hour format and then to minutes since midnight. For example, 2:30 PM becomes 14:30, which is 14×60 + 30 = 870 minutes. If the start is 9:15 AM (9×60 + 15 = 555 minutes) and the end is 2:30 PM (870 minutes), the difference is 870 − 555 = 315 minutes, or 5 hours and 15 minutes.
When the end time is on the next day, add 1440 minutes (the number of minutes in a day) to the end time before subtracting. For a shift from 11:00 PM to 7:00 AM, the start is 1380 minutes and the end is 420 minutes; the duration is (420 + 1440) − 1380 = 480 minutes, or 8 hours.
Using a Calculator or Spreadsheet
Most spreadsheet programs handle time arithmetic natively. In Excel or Google Sheets, if cell A1 contains 9:15 AM and B1 contains 2:30 PM, the formula =B1-A1 returns 5:15 when the cells are formatted as time. For overnight shifts, use =MOD(B1-A1,1), which adds a day if the result would be negative.
Online duration calculators work the same way: you enter two times (and optionally dates), and the tool returns the difference in hours and minutes, often also showing total minutes or seconds. Many also allow selecting a time zone, which matters for scheduling across regions.
Why Time Zones and AM/PM Cause Errors
The most common mistake is mixing AM and PM. 9:00 AM to 5:00 PM is 8 hours, but 9:00 PM to 5:00 PM (without a date change) is negative. Always check whether the end time is on the same day or the next day.
Time zones add another layer: if you're scheduling a call between New York and London, 10:00 AM in New York is 3:00 PM in London during standard time. A duration calculator that doesn't ask for time zones will treat both as local times, giving a misleading result. When the times are in different zones, convert both to UTC (or the same zone) before subtracting.
Common Use Cases
- Work shifts: Calculating hours worked for payroll or time tracking.
- Travel: Flight duration, layover length, or driving time between stops.
- Event planning: How long a meeting, class, or conference session lasts.
- Cooking: When a recipe says to bake for 45 minutes and you started at 4:20 PM, what time will it finish?
- Exercise: Tracking workout duration or rest intervals.
How to Handle Dates and Overnight Periods
If you have both date and time (e.g., July 4 at 11:00 PM to July 5 at 2:00 AM), the simplest approach is to convert everything to a single unit like minutes or hours since a reference point. For instance, July 4 at 11:00 PM is 23:00 on day 0; July 5 at 2:00 AM is 2:00 on day 1, which is 26:00 in day-0 terms. The difference is 26:00 − 23:00 = 3 hours.
When using a calculator that only takes times (no dates), the convention is to assume the end time is on the next day if it is earlier than the start time. This works for most practical cases, but for durations longer than 24 hours you must include dates.
Rounding and Precision
Decide whether you need the answer to the nearest minute, quarter-hour, or hour. For payroll, many employers round to the nearest 15 minutes (a quarter-hour). For scientific or billing purposes, you might need seconds or even milliseconds. A duration calculator typically gives you the exact difference, and you can round manually.
When converting hours to decimal (e.g., 7 hours 30 minutes = 7.5 hours), remember that 30 minutes is 0.5 hours, but 45 minutes is 0.75 hours, not 0.45. This is a frequent source of error in timesheet calculations.
Frequently Asked Questions
How do I calculate the duration between two times in Excel?
Enter the start time in one cell and the end time in another, then subtract the start from the end. Format the result cell as time (e.g., h:mm). For overnight durations, use the formula =MOD(B1-A1,1).
What does “military time” have to do with duration?
Military time (or 24-hour time) eliminates AM/PM ambiguity, making subtraction straightforward. 2:00 PM becomes 14:00, so the difference between 9:00 and 14:00 is clearly 5 hours. Many duration calculators accept both 12-hour and 24-hour input.
How do I calculate the time difference between two time zones?
Convert both times to UTC first, then subtract. For example, 9:00 AM EST (UTC−5) is 14:00 UTC; 3:00 PM PST (UTC−8) is 23:00 UTC. The difference is 9 hours. Remember that daylight saving time changes the offset for some zones.
What if the start and end times are on different dates?
Include the date in the calculation. Convert both to a single reference (like Unix time or days since a set date) and subtract. If using a time-only calculator, add 24 hours to the end time if it's on the next day.
Why does my duration calculator show a negative number?
That usually means the end time is earlier than the start time and the calculator isn't set to handle overnight periods. Check if the calculator has an option for “add a day to end time” or manually add 24 hours to the end time.
How do I convert minutes to hours and minutes?
Divide the total minutes by 60. The whole number is the hours, and the remainder is the minutes. For example, 135 minutes ÷ 60 = 2 hours with 15 minutes left over, so the duration is 2 hours and 15 minutes.