Connect via MCP →

Enter Calculation

Formula

Formula: Seconds to HH:MM:SS Calculator

Advertisement

Results

Time (HH:MM:SS)
1h 1m 1s
from 3,661 seconds
Hours 1
Minutes 1
Seconds 1

What This Calculator Does

The Seconds to HH:MM:SS Calculator converts any number of total seconds into a clear, human-readable format of hours, minutes, and seconds. Whether you have a duration measured by a stopwatch, a video length in seconds, or a computed time interval, this tool breaks it down into the familiar HH:MM:SS components.

How to Use It

Enter the total number of seconds you want to convert into the input field and submit. The calculator returns the equivalent number of whole hours, minutes, and remaining seconds. It works for small values (a few seconds) up to very large ones (millions of seconds spanning many hours).

The Formula Explained

The conversion relies on integer division and the modulo (remainder) operation. The number of full hours is the total seconds divided by 3600 (the number of seconds in an hour), rounded down. The minutes come from the remainder after removing whole hours, divided by 60. Finally, the leftover seconds are the total modulo 60.

In symbols: $$H = \left\lfloor \frac{S}{3600} \right\rfloor,\quad M = \left\lfloor \frac{S \bmod 3600}{60} \right\rfloor,\quad Sec = S \bmod 60$$

Diagram showing a block of total seconds splitting into hours, minutes, and seconds with division factors
Total seconds are divided by 3600 and 60 to extract hours, minutes, and remaining seconds.

Worked Example

Suppose you have 3661 seconds. Hours = \(\left\lfloor 3661 / 3600 \right\rfloor = 1\). The remainder after 1 hour is \(3661 - 3600 = 61\) seconds. Minutes = \(\left\lfloor 61 / 60 \right\rfloor = 1\). Remaining seconds = \(61 \bmod 60 = 1\). So 3661 seconds equals 1h 1m 1s, or 01:01:01.

Example converting a number of seconds into HH:MM:SS shown as three colored segments
A worked split of total seconds into the HH:MM:SS components.

FAQ

Does it handle values over 24 hours? Yes. The result simply shows the total number of hours, which can exceed 24 — it does not wrap into days.

What if I enter a decimal? The calculator floors the input to whole seconds before converting.

How many seconds are in one hour? There are 3600 seconds in an hour (60 minutes \(\times\) 60 seconds).

Last updated: