How to Calculate Time Duration Between Two Dates

Learning how to calculate time duration helps you work out exactly how much time passes between two moments, whether you are planning a trip, logging work hours or checking how long an event lasted. The method is simple once you see it: subtract the earlier moment from the later one, then split the result into days, hours and minutes. This guide explains the method in plain terms, works through the example shown on the tool page, and answers the questions people ask most often.

To skip the manual maths, use our free Duration Calculator and enter your two dates and times to see the result in seconds. The key point is simple: duration is elapsed time, so you count the time that actually passed, without adding an extra day for the start or end date.

The Formula

Time duration is elapsed time, not a calendar count. That is the first thing to understand, because it changes how you treat the start and end points: the duration is the gap between two moments, and both moments are fixed points on the clock, not whole days to be added together. The formula used on the tool page is: Duration = End date and time – Start date and time.

Each part is straightforward. The start is the earlier moment, for example 1 January 2026 at 09:00. The end is the later moment, for example 3 January 2026 at 17:30. Once you have the difference, split it into full days first, then hours, then minutes: full days = total minutes divided by 1,440; remaining hours = remaining minutes divided by 60; the rest is minutes. Because a day has 1,440 minutes and an hour has 60 minutes, this split gives a result that is easy to read, such as 2 days, 8 hours and 30 minutes.

Because the calculation works on exact clock times, it stays accurate across month boundaries and leap years. A duration that crosses midnight, a month end or 29 February is handled the same way, because the subtraction counts real minutes, not calendar labels.

How to Calculate Time Duration Step by Step

  1. Write down the start date and time. This is the earlier moment, for example 1 January 2026 at 09:00.
  2. Write down the end date and time. This is the later moment, for example 3 January 2026 at 17:30. Check that the end is after the start, or the result will be negative.
  3. Subtract the start from the end. The difference is the total elapsed time, which you can express in minutes: in the example it is 3,390 minutes.
  4. Split the total into full days. Divide the total minutes by 1,440 and keep the whole number: 3,390 minutes gives 2 full days, using 2,880 minutes.
  5. Split the remainder into hours and minutes. Divide the remaining minutes by 60 for hours, and the rest is minutes: 510 minutes gives 8 hours and 30 minutes. The final result is 2 days, 8 hours and 30 minutes.

Always keep the two moments in the same format. If one time uses a 12-hour clock and the other a 24-hour clock, convert both to the same format first, or the subtraction will be wrong. The same applies to dates: write both in the same day-month-year order before you start.

Worked Example

Take the example shown on the tool page: a start of 1 January 2026 at 09:00 and an end of 3 January 2026 at 17:30. From 09:00 on 1 January to 09:00 on 3 January is exactly 2 full days. From 09:00 to 17:30 on 3 January is 8 hours and 30 minutes more.

Adding those parts together gives a duration of 2 days, 8 hours and 30 minutes. In other units, that is 56.5 hours in total, or 3,390 minutes. The half hour in 56.5 hours is the same 30 minutes at the end of the result.

Try the same steps with your own dates. A shorter gap, such as 10:15 to 14:45 on the same day, gives 4 hours and 30 minutes, with no full days at all, because the same split into days, hours and minutes applies whatever the size of the gap.

Common Mistakes / Good to Know

  • Counting both the start and end days: duration is elapsed time, so do not add an extra day for the start or end date. The gap between 09:00 on day one and 09:00 on day three is 2 days, not 3.
  • Forgetting the time of day: using dates alone gives a rough answer. Two moments on the same dates can differ by hours, so always include the clock times when they matter.
  • Mixing up 12-hour and 24-hour times: 17:30 is 5:30 in the evening, not 5:30 in the morning. Convert both times to the same format before subtracting.
  • Ignoring leap years and month lengths: a manual day count can go wrong across February or a 30-day month, but subtracting exact dates and times handles leap years correctly, since it counts real days.

One more point worth remembering: durations are usually quoted in the largest sensible units, so a result of 3,390 minutes is normally written as 2 days, 8 hours and 30 minutes. Keep the raw total as well when you need it, for example for billing hours or adding up several durations.

Frequently Asked Questions

What is the formula for time duration?

The formula is: Duration = End date and time minus Start date and time. Split the result into full days of 1,440 minutes, then hours of 60 minutes, and the remaining minutes.

How do you calculate duration across midnight?

Treat the two moments as points on a continuous timeline and subtract the earlier one from the later one. Crossing midnight makes no difference, because the subtraction counts the real minutes that passed.

How long is 2 days, 8 hours and 30 minutes in hours?

It is 56.5 hours, or 3,390 minutes. Two days give 48 hours, plus 8 hours is 56 hours, and the extra 30 minutes is half an hour.

Does the duration include the start and end days?

No. Duration measures elapsed time only, so you do not add an extra day for the start or end date. The result is the gap between the two moments.

For a related date calculation, try our Birth Date Calculator. And for the full method behind working out someone’s age, read How to Calculate Age from Date of Birth Manually.

4 thoughts on “How to Calculate Time Duration Between Two Dates”

Leave a Comment