How to Calculate the Duration Between Two Times or Dates
How to find the duration between two times by hand, including the borrow step when minutes run short, plus how the same idea extends to two full dates and times.
Subtracting 9:58 from 13:57 looks like it should take five seconds: subtract the hours, subtract the minutes, done. Try it directly, though, and the minutes column breaks: 57 minus 58 is negative, which a clock cannot display. This is the one step that trips up manual time subtraction more than anything else, and it has a clean, mechanical fix once you have seen it done correctly. This guide walks through how to find the duration between two times step by step, then extends the same idea to a gap that spans more than one calendar day. Every example below can be checked directly against the Time Duration Calculator, which has a dedicated tab for each case.
Duration between two times, step one: use 24-hour format
Before any subtraction happens, both the start and end time need to be in an unambiguous format. A 12-hour clock repeats itself twice a day, so "7:58" alone does not say whether it is morning or evening, and subtracting two 12-hour times without first resolving that is a common source of an answer that is exactly 12 hours off.
In 24-hour format, what time is 16:30? Subtract 12 from any hour past 12: 16:30 is 4:30 PM, and 00:00 is midnight.
Converting to 24-hour time is mechanical: any AM time keeps its hour number, except 12 AM (midnight), which becomes 0. Any PM time adds 12 to its hour number, except 12 PM (noon), which stays 12. So 7:58 AM becomes 7:58, 7:58 PM becomes 19:58, 12:00 AM becomes 0:00, and 12:00 PM stays 12:00. Every worked example in this guide already uses 24-hour time for exactly this reason.
Step two: subtract minutes first, then hours
The general method has two columns, minutes and hours, and minutes gets handled first because it is the column that might need a borrow.
If the end time's minutes are equal to or larger than the start time's minutes, subtraction is direct: subtract minutes from minutes, then hours from hours, and the two results are the answer. Take 9:00 to 17:30: minutes are 30 minus 0, which is 30, and hours are 17 minus 9, which is 8. The duration is 8 hours and 30 minutes, with no borrowing needed anywhere.
If the end time's minutes are smaller than the start time's minutes, direct subtraction cannot work, and this is where the borrow step comes in.
The borrow case, worked in full
Take the exact case from the opening: 13:57 minus 9:58. The minutes column asks for 57 minus 58, which is negative, so a direct subtraction fails.
The fix is to borrow one hour from the hours column and convert it into 60 extra minutes for the minutes column. Thirteen hours and fifty-seven minutes becomes twelve hours and one-hundred-seventeen minutes (57 plus the borrowed 60), which is still the exact same point in time, just expressed differently, the same way "2 dollars and 30 cents" and "1 dollar and 130 cents" describe the same amount of money.
With that rewrite, the subtraction becomes straightforward: 12:117 minus 9:58. Minutes: 117 minus 58 is 59. Hours: 12 minus 9 is 3. The result is 3 hours and 59 minutes.
Checking this against a full conversion to minutes confirms it: 13:57 is 13 times 60 plus 57, which is 837 minutes since midnight. 9:58 is 9 times 60 plus 58, which is 598 minutes since midnight. The difference, 837 minus 598, is 239 minutes, and 239 minutes is exactly 3 hours and 59 minutes (3 times 60 is 180, plus 59 is 239). Both methods land on the identical answer, which is exactly what a correct borrow step should do.
A second borrow example, to see the pattern again
One worked example is rarely enough to make a mechanical rule stick, so here is a second case with different numbers: 16:05 minus 8:47.
Minutes first: 5 minus 47 is negative, so borrow again. Sixteen hours and five minutes becomes fifteen hours and sixty-five minutes (5 plus the borrowed 60). Now subtract: minutes, 65 minus 47 is 18; hours, 15 minus 8 is 7. The result is 7 hours and 18 minutes.
Confirming in total minutes: 16:05 is 965 minutes since midnight, 8:47 is 527 minutes since midnight, and 965 minus 527 is 438 minutes, which is 7 hours and 18 minutes (7 times 60 is 420, plus 18 is 438). The two methods agree again.
Why borrowing works: it is the same idea as ordinary subtraction
Anyone comfortable subtracting multi-digit numbers by hand has already done a version of this exact move. In ordinary base-10 subtraction, borrowing takes a 10 from the next column over when a digit is too small to subtract from directly, for example turning 52 minus 27 into working with "4 tens and 12 ones" instead of "5 tens and 2 ones." Time subtraction is identical in spirit, just with 60 as the size of one borrowed unit instead of 10, because there are 60 minutes in an hour rather than 10 units in the next decimal place. Once that parallel clicks, the borrow step in time subtraction stops feeling like a special trick and becomes just subtraction in a different base.
When the end time is earlier on the clock: crossing midnight
A different problem shows up when the end time's hour is smaller than the start time's, such as a shift from 22:00 to 6:00. Read literally on a single clock face, 6:00 comes before 22:00, but in context this almost always means the end time falls on the next day, an overnight shift, not that time ran backward.
Going backward crosses midnight in the same way. If you ask 10 hours ago what time was it at 3:00 AM, the answer is 5:00 PM the previous day.
The fix is to add 24 hours to the end time before subtracting. Six o'clock becomes 30:00, and 30:00 minus 22:00 is 8:00, an 8-hour overnight span. This is exactly the assumption built into the Time Duration Calculator's Two Clock Times tab (and the matching tool on the Hours Calculator): whenever a straightforward subtraction of two clock times comes out negative, 24 hours gets added back automatically, on the assumption that the end time belongs to the next day.
This assumption has one honest limitation worth knowing: a clock-times-only calculation cannot tell the difference between a zero-length gap and a full 24-hour gap when the start and end time are identical, since both look like "0:00" using clock times alone. A gap that might be exactly one full day, or that needs to be pinned to specific calendar dates for any other reason, needs the full date-and-time method instead.
Extending to two full dates and times
Everything so far covers the duration between two times within a single calendar day, since a clock resets to 0:00 every 24 hours and cannot, by itself, represent a gap longer than a day. Once a gap might span multiple calendar days, the cleanest method stops being "subtract clock times and adjust for midnight" and becomes "convert both points to one continuous timeline, then subtract."
Worked example. Take a start of December 30, 2024 at 18:00 and an end of January 2, 2025 at 09:15, a gap that crosses both a month and a year boundary. Counting forward in full days from the start: December 30 at 18:00 to December 31 at 18:00 is 1 day, to January 1 at 18:00 is 2 days, to January 2 at 18:00 would be 3 days. The actual end time, January 2 at 09:15, is 8 hours and 45 minutes earlier than that 3-day mark, so the true elapsed time is 3 days minus 8 hours 45 minutes, which works out to 2 days, 15 hours and 15 minutes.
The reason this method stays reliable across month-ends, year-ends and leap days is that it never asks "how many calendar date boxes were crossed," which depends on how many days each specific month happens to have. It only asks "how much total time separates two fixed points," measured as a plain count of seconds from one instant to the other, then divided back into days, hours, minutes and seconds at the very end, largest unit first. That is exactly the approach the Time Duration Calculator's Two Dates & Times tab takes, and it is why the same tool handles a two-day gap and a two-year gap with identical logic underneath.
Converting the result to decimal hours
A duration written as hours and minutes, like 3:59 or 7:18, is easy to read but does not multiply cleanly against an hourly rate, since misreading the colon as a decimal point gives a meaningless number. Payroll and billing generally want decimal hours instead, which treats minutes as sixtieths of an hour rather than hundredths.
Payroll uses time clock conversion to turn hours and minutes into decimals: 7:45 becomes 7.75 hours, because 45 minutes is 0.75 of an hour. A clock out calculator does this after subtracting the start time and any unpaid break. The shifts people search for most are quick to answer. How many hours is 9 to 5? Eight, and how many hours is 9am to 5pm is the same question in 12-hour form. How long is 24 hours? Exactly one day, or 1,440 minutes. How long is 2000 hours? 83 days and 8 hours.
| Shift | Duration | Decimal hours |
|---|---|---|
| 8am to 4pm is how many hours? | 8 hours | 8.00 |
| 8-5 is how many hours? | 9 hours | 9.00 |
| How many hours is 9 to 5? | 8 hours | 8.00 |
| 7am to 3:30pm | 8 hours 30 minutes | 8.50 |
| 9am to 5:45pm | 8 hours 45 minutes | 8.75 |
| 10pm to 6am (overnight) | 8 hours | 8.00 |
Converting the two borrow-case results from earlier shows how: 3 hours and 59 minutes is 3 plus 59 divided by 60, which is 3.9833, usually rounded to 3.98 decimal hours. 7 hours and 18 minutes is 7 plus 18 divided by 60, which is 7.30 decimal hours exactly, since 18 divided by 60 is exactly 0.30. Once a duration is in decimal form, multiplying it by an hourly rate gives a wage directly, which is the reasoning behind converting at all rather than leaving the figure as hours and minutes. The salary calculator on this site picks up from exactly that point, turning an hourly figure into every other pay period once the hours themselves are known.
Working across time zones
Every method in this guide assumes both the start and end time are already expressed in the same time zone. That assumption fails the moment two events happened in different places: two people who both clocked a time of "9:00" local time, one in New York and one eight time zones away, were not marking the same actual moment, and subtracting their local clock readings directly produces a duration that is wrong by however many hours separate the two zones. Converting both readings to one shared time zone first, using something like this site's time zone calculator, removes the mismatch before it has a chance to introduce an error, and every method described above then applies normally to the converted, same-zone readings.
Common mistakes
Skipping the 24-hour conversion. Subtracting 12-hour times directly, without first resolving AM and PM, is the single most common way to land on an answer that is off by exactly 12 hours.
Borrowing the wrong amount. Subtracting 1 minute instead of converting a borrowed hour into 60 extra minutes produces a total that is subtly wrong rather than obviously wrong, which makes it an easy mistake to miss when checking the answer by eye.
Forgetting to add 24 hours for an overnight span. Treating an end time that is earlier on the clock as an error, or worse, silently ignoring the sign, instead of recognizing it as a next-day crossing, is the clock-time equivalent of the borrow mistake above.
Assuming a gap stays within one day when it does not. Any time the possibility of a multi-day gap exists, the clock-times-only method cannot be trusted on its own, since it has no way to represent more than 24 hours; the full date-and-time method is the only reliable option once that possibility is on the table.
Which method to use
Manual subtraction by hand is worth doing at least once, since it is the only way to really see the borrow step happen and trust that a calculator is not doing anything mysterious. For everyday use, the Time Duration Calculator's Two Clock Times tab handles a same-day gap, including the overnight-crossing case, instantly. Its Two Dates & Times tab handles anything that might cross one or more calendar days, down to the second. The Hours Calculator covers the same same-day question with an added unpaid-break field, useful specifically for a payroll-style shift rather than a bare duration.
Business days versus calendar days
Every method above measures calendar time: every day counts the same, whether it falls on a Tuesday or a Sunday. A lot of real deadlines, though, are phrased in business days instead, "5 business days from today" or "net 10 working days," and that is a genuinely different calculation, not just a stricter version of the same one.
A business-day count skips weekends entirely rather than including them in the total. The mechanical way to do it by hand is to step forward one calendar day at a time, only counting a step if it lands on Monday through Friday, and simply passing over Saturday and Sunday without counting them at all.
Worked example. Take 5 business days starting from a Wednesday. Thursday is business day 1, Friday is business day 2, then Saturday and Sunday are skipped without being counted, Monday becomes business day 3, Tuesday becomes business day 4, and Wednesday of the following week becomes business day 5. Five business days forward from a Wednesday lands exactly one calendar week later, on the following Wednesday, even though only five of those seven calendar days actually counted toward the total.
That same gap looks completely different measured the calendar way this calculator uses: Wednesday to the following Wednesday is 7 full calendar days, not 5, because the calendar method counts every day, weekends included. Neither number is wrong, they are answering two different questions, one asking "how many working days" and the other asking "how much calendar time."
The mismatch grows with a longer gap, since every weekend the span crosses adds two calendar days that a business-day count skips over entirely. Ten business days almost always spans more than ten calendar days once the weekends in between are accounted for, and the exact gap between the two counts depends on which day of the week the count starts on and how many weekends fall inside the span.
Public holidays complicate a business-day count further, since a proper working-day calculation in most workplaces also excludes recognised holidays, not just weekends, and which dates count as a holiday varies by country, industry and even by individual employer's calendar. This calculator does not attempt that calculation, since it has no single correct list of holidays to exclude, and it deliberately reports calendar time consistently instead. When a deadline is specifically phrased in business or working days, count weekends (and any known holidays) out by hand using the step-forward method above, or check whichever scheduling tool your workplace already uses for its own holiday list.
However you think of the question
This same subtract-and-borrow method answers a lot of differently worded questions. Someone comparing a start and an end moment, working out a gap in hours and minutes, or trying to turn two clock readings into a single elapsed figure is doing the identical arithmetic, whether they think of it as a shift length, a stopwatch reading, or a countdown that has already finished. A result read out in bare minutes, one split into hours and minutes, and a plain subtraction of one time from another are all the same underlying calculation, just phrased differently depending on what prompted the question in the first place. The Time Duration Calculator on this site handles every version of that question in one place, with a dedicated tab for the same-day case and another for the full multi-day case.
Try the examples yourself
Whether the question is the duration between two times on the same clock or a gap spanning several calendar days, every number in this guide, the 13:57-minus-9:58 borrow case, the 16:05-minus-8:47 case, the overnight 22:00-to-6:00 example, and the multi-day December-to-January example, was checked by hand and then confirmed against the Time Duration Calculator directly. Type any of them in to see the identical result appear, or use your own two times or dates to see the same method run automatically.
The time duration calculator checks any of these examples. It works as a time between calculator for clock times and an elapsed time calculator for full dates, and it doubles as an hours and minutes calculator when the answer is a simple total. To calculate time between two times, or the hours between two times on different days, enter both and read the breakdown; calculations with time that cross midnight are handled without borrowing errors.