Free calculators and unit converters for general and everyday use.

Calculators » Date & Time » Time Difference

Our online tools will provide quick answers to your calculation and conversion needs. On this page, you can calculate time difference between two clock times. Find time duration in hours, minutes and seconds between any two times.

Result window

To calculate hours worked or sum up a group of time intervals, use our timesheet calculator.

Download: Use this time calculator offline with our all-in-one calculator app for Android and iOS.

To calculate time difference, we convert both time values to seconds since midnight using the following formula:

time_{m} = hh*3600 + mm*60 + ss

`if (start_time`

_{m} < end_time_{m})

T = end_time_{m} - start_time_{m}

else

T = 86400 - start_time_{m} + end_time_{m}

where,

time_{m} - Time in seconds since midnight

T - Time interval in seconds

Now convert the time interval to hours, minutes and seconds to arrive at the final result.

h = ⌊T/3600⌋, min = ⌊T/60⌋ mod 60, sec = T mod 60

The steps listed above are for 24-hour time format.

**Sample calculation:** Find time duration between **09:00AM** and **05:00PM**.

**Ans.** The time duration is 8 hour(s), 0 minute(s), and 0 second(s).

Time difference in hours: 8

Time difference in minutes: 480

Time difference in seconds: 28800

© everydaycalculation.com