How this calculator works
Clock time is not decimal: an hour holds 60 minutes and a minute holds 60 seconds. Converting to decimal hours divides the minutes by 60 and the seconds by 3600, then adds them to the whole hours. The reverse direction takes a decimal number of hours and rebuilds the clock reading by multiplying by 3600 to get seconds, then splitting that total into hours, minutes and seconds. The payroll table shows the decimal value of every five-minute mark, which is the form many time sheets and billing systems use.
Formula
For a duration H:MM:SS, total seconds = 3600H + 60M + S. Decimal hours = total seconds / 3600, decimal minutes = total seconds / 60 and decimal seconds = total seconds. For the reverse direction, total seconds = decimal hours x 3600, and the clock time is floor(total / 3600) hours, floor((total mod 3600) / 60) minutes and total mod 60 seconds.
Worked example
7 hours 45 minutes 30 seconds is 27,930 seconds, which is 7.758333 decimal hours, 465.5 decimal minutes or 27,930 decimal seconds. Going the other way, 7.5 decimal hours becomes 7:30:00. Fifteen minutes is 0.25 decimal hours and 45 minutes is 0.75.
Advertisement
Frequently asked questions
Why is 7:30 not 7.30 hours?
Thirty minutes is half an hour, so 7:30 is 7.5 decimal hours. Writing 7.30 would be a 12-minute undercount because the fractional part of the decimal number counts hundredths of an hour, not minutes.
Is this the same as decimal time?
No. Decimal time, such as French revolutionary time, divides the whole day into ten hours. This page only rewrites an ordinary duration as a decimal number of hours, minutes or seconds.
How does the reverse direction round?
The decimal hours are converted to seconds and rounded to the nearest whole second before the clock text is built. The decimal outputs keep the entered value, so a value with a fraction of a second still shows the clock rounded to the nearest second.
Can minutes or seconds be 60?
No. Values below 60 are required so the answer cannot be ambiguous. Enter 1 hour 0 minutes instead of 0 hours 60 minutes.