Search holidays, national days and tools

Press Enter to open the first result, or Esc to close.

Time duration calculator

Find the time between two times, or between two dates and times, in days, hours, minutes and seconds.

Time between two times

Dates are optional. With no end date, an earlier end time is the next day.

From 9:00 PM to 6:30 AM the next day

9 hours 30 minutes Spans midnight

9:30:00 in total · 9.50 hours

The end time is earlier than the start time, so it is counted on the next day.

Total hours
9.50
Total minutes
570
Total seconds
34,200
In h:mm:ss
9:30:00

This is clock time. On the nights the clocks change for daylight saving time, the real elapsed time is an hour more or less.

How it's worked out

Both moments are turned into seconds: the whole days between the two dates, plus the difference between the two clock times. The total is then split into days, hours, minutes and seconds, and also given as total hours (to two decimal places), total minutes and total seconds. Everything is counted in whole seconds, so there is no rounding drift.

Across midnight: 10:45 PM to 3:20 AM

With no dates, an end time earlier than the start is taken as the next day. From 10:45 PM to midnight is 1 hour 15 minutes, and from midnight to 3:20 AM is 3 hours 20 minutes, so the duration is 4 hours 35 minutes, or 4.58 hours.

Across several days: Monday 8:15 AM to Thursday 4:40 PM

From Monday, October 5, 2026 at 8:15 AM to Thursday, October 8, 2026 at 8:15 AM is exactly 3 days. From 8:15 AM to 4:40 PM adds 8 hours 25 minutes. The duration is 3 days 8 hours 25 minutes: 80 hours 25 minutes in total, or 80.42 hours.

Across a daylight saving change: October 31 to November 1, 2026

From Saturday, October 31, 2026 at 10:00 PM to Sunday, November 1 at 6:00 AM is 8 hours on the clock. In most of the US the clocks go back an hour at 2:00 AM that night, so 9 hours actually pass. In spring it runs the other way: on the night of March 8, 2026, 10:00 PM to 6:00 AM is 8 clock hours but only 7 real ones. The calculator shows clock time and, when you enter dates, points out a change in your own time zone.

Time duration in Excel or Google Sheets

Put the start date and time in A2 and the end in B2 (for example 10/5/2026 8:15 AM), then:

The duration, formatted as [h]:mm:ss:

=B2-A2

Total hours as a decimal (format the cell as a number):

=(B2-A2)*24

Total minutes:

=(B2-A2)*1440

Total seconds:

=(B2-A2)*86400

Days and hours as text, such as "3 days 8:25":

=INT(B2-A2)&" days "&TEXT(B2-A2,"h:mm")

For times without dates that may cross midnight, use =MOD(B2-A2,1) instead of =B2-A2. Spreadsheets count clock time, so, like this calculator, they ignore daylight saving changes. These formulas work the same in Excel and Google Sheets.

Which calculator do you need?

Related tools

Frequently asked questions

How do I calculate the duration between two times?

Take the start time from the end time. If the minutes of the end are smaller, borrow an hour as 60 minutes. For example, 1:20 PM to 4:05 PM is 16:05 − 13:20 = 2 hours 45 minutes. The calculator does this to the second.

What if the end time is after midnight?

Leave the end date blank and an end time earlier than the start is counted on the next day: 10:45 PM to 3:20 AM is 4 hours 35 minutes, and the result is marked "Spans midnight".

How do I find the time between two dates and times?

Enter both dates as well as both times. The calculator counts the whole days between the dates, adds the difference between the clock times and shows days, hours, minutes and seconds, plus total hours. If the end is before the start, the duration is shown as negative.

Does daylight saving time change the result?

The result is clock time. On the nights the clocks change, the real elapsed time is an hour more (in autumn) or less (in spring). When you enter dates, the calculator checks your device's time zone and says if a change falls in between.

How do I calculate time duration in Excel or Google Sheets?

With the start date and time in A2 and the end in B2, =B2-A2 formatted as [h]:mm:ss gives the duration. Multiply by 24 for decimal hours, by 1,440 for minutes or by 86,400 for seconds. For times without dates that cross midnight, use =MOD(B2-A2,1).

Related guides