Time is the one everyday quantity that is not counted in tens. There are 60 seconds in a minute and 60 minutes in an hour, so "7.30 hours" and "7 hours 30 minutes" are not the same thing. That mismatch causes real problems on timesheets, invoices for hourly work, video and audio edits, and any system that stores durations as a raw number of seconds.
This guide explains how to move between the three common ways of writing a duration (hours:minutes:seconds, decimal hours and total seconds), how to work out the time between two clock readings including shifts that cross midnight, and the mistakes that most often end up on a payslip or invoice.
Three ways to write the same duration
| Format | Example | Where you see it |
|---|---|---|
| Hours:minutes:seconds | 1:30:00 | Clocks, video players, race times |
| Decimal hours | 1.5 | Timesheets, payroll, invoices |
| Total seconds | 5,400 | Software, logs, APIs, spreadsheets |
All three describe the same ninety minutes. The conversions are straightforward once you remember that the base is 60, not 100.
The conversion formulas
H:M:S to total seconds
Total seconds = hours × 3600 + minutes × 60 + seconds
Example: 2 h 15 m 30 s = 2 × 3,600 + 15 × 60 + 30 = 8,130 seconds.
Total seconds to H:M:S
Hours = floor(total / 3600)
Minutes = floor((total mod 3600) / 60)
Seconds = total mod 60
Example: 100,000 seconds.
- 100,000 / 3,600 = 27 whole hours (97,200 seconds)
- Remainder 2,800 / 60 = 46 whole minutes (2,760 seconds)
- Remainder = 40 seconds
Result: 27:46:40, which is also 1 day, 3 hours, 46 minutes and 40 seconds.
Hours and minutes to decimal hours
Decimal hours = hours + minutes / 60
Example: 7 h 45 m = 7 + 45/60 = 7.75 hours.
Decimal hours back to minutes
Multiply the decimal part by 60. Example: 7.3 hours = 7 hours + 0.3 × 60 = 7 hours 18 minutes, not 7 hours 30 minutes.
Common minute-to-decimal values
| Minutes | Decimal |
|---|---|
| 6 | 0.1 |
| 15 | 0.25 |
| 20 | 0.333... |
| 30 | 0.5 |
| 40 | 0.667 |
| 45 | 0.75 |
Some employers round time to the nearest 6 or 15 minutes; this table is why 6-minute increments are popular, since each is exactly 0.1 hour.
Use the Time Duration Calculator
The Time Duration Calculator has three tabs.
H:M:S → total
- Open the tool on the H:M:S → total tab.
- Enter Hours, Minutes and Seconds.
- Read Total seconds, Total minutes, Total hours (to four decimals) and Total days.
Seconds → H:M:S
- Switch to Seconds → H:M:S.
- Type a value in Total seconds, for example a duration exported from software.
- Read the result as Hours : minutes : seconds, with a Days figure for long durations.
Between two times
- Switch to Between two times.
- Set Start time and End time.
- Read Duration in hours and minutes, In minutes, and In decimal hours.
If the end time is earlier than the start, the tool treats it as the next day, which is exactly what you want for night shifts. From 09:00 to 17:30 it returns 8h 30m, or 8.50 decimal hours; from 22:00 to 06:30 it also returns 8h 30m.
Other ways to do it
Spreadsheets
Excel and Google Sheets store times as fractions of a day, so:
=B2-A2gives the duration between two times (format the cell as[h]:mm).=(B2-A2)*24converts that duration into decimal hours.=MOD(B2-A2,1)handles shifts that cross midnight.=A2/86400turns a number of seconds into a time value you can format as[h]:mm:ss.
The square brackets in [h] stop the hours wrapping back to zero after 24, a common source of confusion when adding up a week of shifts.
Mental arithmetic
For a quick check, convert everything to minutes, do the arithmetic, and convert back. 1 h 45 m plus 2 h 30 m is 105 + 150 = 255 minutes = 4 h 15 m.
Mistakes that cost money
Treating minutes as decimals
The most expensive timesheet error is writing 7 h 30 m as 7.30. At an hourly rate of 25, 7.5 hours pays 187.50 while 7.30 hours pays 182.50. Over a month of entries, the difference adds up. Always convert with minutes / 60.
Forgetting unpaid breaks
A 09:00 to 17:30 day is 8.5 hours elapsed. If a 30-minute lunch is unpaid, paid time is 8 hours. Subtract breaks after calculating the elapsed time. For a full week of clock-ins and clock-outs, the Time Card Calculator is designed for exactly this.
Midnight shifts giving negative time
Subtracting 22:00 from 06:30 gives a negative number unless your method handles the day change. The calculator and the MOD formula both do.
Rounding too early
Round only the final total. Rounding each day's decimal hours to one place and then summing can shift the weekly total by several minutes.
Related tools
- Converting annual pay to an hourly rate: Salary Calculator
- Differences between calendar dates: Date Difference Calculator
- Simple unit pages: minutes to hours and hours to minutes
- Timing a task live: Stopwatch
Frequently asked questions
How do I convert hours and minutes to decimal hours?
Divide the minutes by 60 and add the result to the hours. For example, 7 hours 45 minutes is 7 + 0.75 = 7.75 hours.
How do I convert decimal hours back to hours and minutes?
Multiply the decimal part by 60. So 7.3 hours is 7 hours and 18 minutes.
How many seconds are in an hour?
There are 3,600 seconds in an hour (60 × 60) and 86,400 in a day.
How do I calculate hours worked across midnight?
Treat the end time as the next day. In the calculator's Between two times tab, an end time earlier than the start is handled automatically.
Why does my spreadsheet show 03:00 instead of 27 hours?
The cell is formatted as a clock time, which wraps at 24 hours. Use the custom format [h]:mm to show total hours.