Time Units Converter

Convert between Seconds, Minutes, Hours, and Years instantly with scientific precision.

Milliseconds
3,600,000ms
Seconds
3,600s
Minutes
60m
Hours
1h
Days
0.041667d
Weeks
0.005952wk
Months (Avg)
0.001369mo
Years
0.000114y
Decades
0.000011dec
Centuries
0.000001cen

Common Use Cases

๐Ÿ’ป

Development

Convert timeout values from seconds to milliseconds (e.g. 5s = 5000ms) for JavaScript functions.

๐ŸŽฌ

Video Editing

Calculate total runtime frames or convert "90 minutes" into seconds for ffmpeg commands.

๐Ÿ“…

Planning

Convert project estimates from "hours" to "work weeks" instantly (e.g. 120 hours = 3 weeks).

๐Ÿƒ

Sports

Convert marathon times or lap splits into total seconds for easier comparison and graphing.

How to Use

  1. Enter Value: Type the amount of time you want to convert (e.g., 90).
  2. Select Unit: Choose the starting unit from the dropdown (e.g., Minutes).
  3. Get Results: The tool instantly calculates the equivalent duration in all other units, from milliseconds to centuries.
  4. Copy: Click the copy icon on any card to use the result in your code or documents.

Time Conversion in Code

Converting time units is a common task in programming. Here is how to convert Seconds to Formatted Time in different languages.

JavaScriptSeconds to H:M:S
function formatTime(seconds) {
  const h = Math.floor(seconds / 3600);
  const m = Math.floor((seconds % 3600) / 60);
  const s = seconds % 60;
  return `${h}h ${m}m ${s}s`;
}

console.log(formatTime(3665));
// Output: "1h 1m 5s"
Pythontimedelta
import datetime

seconds = 3665
time_str = str(datetime.timedelta(seconds=seconds))

print(time_str)
# Output: "1:01:05"
PHPgmdate
$seconds = 3665;
echo gmdate("H:i:s", $seconds);
// Output: "01:01:05"
Gotime.Duration
package main

import (
	"fmt"
	"time"
)

func main() {
	seconds := 3665
	d := time.Duration(seconds) * time.Second
	fmt.Println(d.String())
    // Output: "1h1m5s"
}

Frequently Asked Questions

How many days are in a year?

In scientific and astronomical contexts (Julian year), a year is calculated as 365.25 days to account for leap years. This tool uses this exact value for precision.

How many seconds in a day?

There are exactly 86,400 seconds in a standard day (60 seconds ร— 60 minutes ร— 24 hours).

Microseconds vs Milliseconds?

A millisecond (ms) is 1/1000th of a second. A microsecond (ยตs) is 1/1,000,000th of a second. Microseconds are 1000x smaller than milliseconds.

What is a decade?

A decade is a period of 10 years. A century is 100 years. A millennium is 1000 years.

Related Tools