Time to Decimal Calculator
Convert HH:MM:SS time values to decimal hours and back, including seconds precision.
Decimal hours
1.5125
To six decimal places
HH:MM:SS
01:30:45
1h 30m 45s
Calculation steps
- 1. Divide seconds by 3 600: 45 ÷ 3 600 = 0.012500
- 2. Divide minutes by 60: 30 ÷ 60 = 0.500000
- 3. Add to whole hours: 1 + 0.500000 + 0.012500 = 1.5125
01:30:45 = 1.5125 decimal hours
How to use Time to Decimal Calculator
What this calculator does
This calculator converts HH:MM:SS time values (the way a stopwatch or video player shows time) to decimal hours (the way many exports, spreadsheets, and analysis pipelines want time), and back the other way. Unlike a payroll-focused tool, this one keeps seconds precision — useful when sub-minute durations actually matter.
How to calculate decimal hours from HH:MM:SS
The formula is:
decimal hours = hours + (minutes ÷ 60) + (seconds ÷ 3 600)
Three contributions: whole hours stay as-is, minutes divide by 60, and seconds divide by 3 600 (because there are 3 600 seconds in an hour). Add the three together. Going the other way:
total_seconds = round(decimal × 3 600)
hours = ⌊total_seconds ÷ 3 600⌋
minutes = ⌊(total_seconds mod 3 600) ÷ 60⌋
seconds = total_seconds mod 60
The round-to-total-seconds step matters: it avoids floating-point
artefacts where the seconds field would otherwise read 60 due to a
multiplication like 0.5125 × 3 600 = 1844.9999998 instead of 1845.
Worked examples
1:30:45 (one hour thirty minutes forty-five seconds) →
1 + 30/60 + 45/3600 = 1 + 0.5 + 0.0125 = 1.5125 decimal hours.
Three more for reference:
0:15:00→0 + 0.25 + 0 = 0.25(a quarter of an hour, exact).2:00:30→2 + 0 + 0.008333… = 2.008333…(carry three decimal places for sub-minute clarity).0:01:30→0 + 0.016667 + 0.008333 = 0.025(90 seconds is exactly one-fortieth of an hour).
Use cases beyond payroll
Video editing: many NLE export panels accept decimal hours for a
total session length, especially when integrating with cloud rendering
services or transcription APIs that bill by the hour. A 47-minute
edit project is 0:47:00 = 0.7833 hours, which slots cleanly into a
billing API field that expects Number rather than a colon-formatted
string.
Scientific timing: lab equipment and physics experiments often log
durations as decimal seconds or hours. Converting from a stopwatch
reading like 2:35:12 to 2.5867 lets you drop the value directly
into a spreadsheet cell and run statistics on it without parsing the
colons.
Sleep tracking: if you slept from 23:15 to 06:43, the
elapsed time is 7:28, or 7.4667 hours in decimal. Cross-referencing
that against weekly average columns in a sleep journal is much
cleaner in decimal than in colon time.
Race analysis: a 100-mile run finished in 15:42:30 is 15.7083
hours. Divide miles by decimal hours to get an honest average pace in
mph; trying that arithmetic in HH:MM:SS form requires three extra
mental conversions.
Sub-second precision considerations
This calculator handles whole seconds. For sub-second timing, the arithmetic continues the same way:
- 1 millisecond =
1/3 600 000 ≈ 0.000 000 277 8hours. - 1 microsecond =
1/3 600 000 000hours.
In practice, very few use cases need decimal hours below the millisecond level — they need a different unit altogether (seconds, milliseconds, or frame counts). The decimal-hour representation is optimised for the range from a few seconds to thousands of hours; at the microsecond end, you’re carrying eleven zeros of unused precision.
SMPTE timecode and frame-rate gotchas
Video timecode is a notable exception to the “seconds are seconds” assumption. Common frame rates:
| Frame rate | 1 frame in seconds | 1 frame in hours |
|---|---|---|
| 24 fps | 0.041 667 s | 0.000 011 574 h |
| 25 fps (PAL) | 0.040 000 s | 0.000 011 111 h |
| 29.97 fps (NTSC) | 0.033 367 s | 0.000 009 269 h |
| 30 fps | 0.033 333 s | 0.000 009 259 h |
NTSC’s drop-frame timecode (29.97 fps but counted as 30) means that a
project labelled 01:00:00:00 runs for roughly 3 600 actual seconds
minus a small number of dropped frame-counts per hour. If you’re
converting timecodes from a broadcast workflow, account for this
explicitly — the conversion above assumes wall-clock seconds.
Common mistakes to avoid
Treating the decimal point as a colon. 1.30 decimal hours is
not 1 hour 30 minutes — it’s 1 hour 18 minutes. The fractional
part of decimal hours is a fraction of an hour, not a count of
minutes. 1 hour 30 minutes in decimal is 1.50.
Forgetting to clamp minutes and seconds to 0–59. If you type
75 in the minutes field, that’s actually 1 hour 15 minutes; the
calculator clamps to 59 so the input format stays honest.
Comparing rounded values for equality. 1:30:45 is exactly
1.5125, but 1.5125 rounded to two decimal places (1.51) is no
longer exactly 1:30:45 — it’s about 1:30:36. If you need lossless
round-tripping, carry at least four decimal places.
Privacy
This calculator runs three division operations in JavaScript on your device. There are no fetch calls, no analytics on the values you type, no server-side logging.
Frequently asked questions
How do I convert 1:30:45 to decimal hours?
1 + 30/60 + 45/3600 = 1 + 0.5 + 0.0125 = 1.5125 decimal hours. The calculator above shows the three division steps as you type. For a quick sanity check: 1:30:45 is one and a half hours plus 45 seconds — and 45 seconds is 45/3600 = 0.0125 of an hour, which is what the .0125 tail in 1.5125 represents.What is the difference between this and a payroll converter?
What about sub-second precision — milliseconds or frames?
1/3600000 of an hour, so 100ms = 0.000028 hours. SMPTE timecode for video uses frames rather than fractional seconds — at 24fps, each frame is 1/86400 hour, at 30fps it's 1/108000. Video editors typically expose a 'show as decimal hours' option in their export settings; if not, do the conversion in a spreadsheet and treat sub-second precision as needed for your project.Why do my calculator and stopwatch disagree about a duration?
HH:MM:SS, others round, so the same elapsed time can read one second different. Frame-rate snapping: video editors typically align time to whole frames (e.g. 23.976 fps), so a 01:30:45 shown in a player can actually be 01:30:45;02 (45 seconds plus 2 frames). Drop-frame timecode: NTSC video uses 29.97 fps but counts at 30 fps, dropping two frame numbers per minute (except every tenth minute) — wall clock and timecode-clock diverge over long durations. For most uses, whole-second precision is fine.Is my data uploaded anywhere?
Related tools
Hours to Decimal Calculator
Convert hours and minutes to decimal hours for payroll timesheets and back again.
Time Duration Adder
Add up multiple time durations.
Time Zone Converter
Convert times across world time zones.
Date Difference Calculator
Find the exact difference between two dates.
Working Days Calculator
Count working days between two dates.
Fraction to Decimal Calculator
Convert any fraction to its decimal — or any decimal to its best-fit fraction with mixed number.