/tid

Time Converter - Seconds, Minutes, Hours, Days

Convert time units like milliseconds, seconds, minutes, hours, days, weeks, and years instantly and locally.

Common time intervals

Interval Seconds
1 minute60
1 hour3 600
1 day86 400
1 week604 800
1 year (365.25 d)31 557 600

How time conversion is calculated

All time units are converted via seconds as the base unit. A year is defined as 365.25 days to account for leap years, matching the Julian calendar definition.

  • 1 minute = 60 seconds
  • 1 hour = 3,600 seconds
  • 1 day = 86,400 seconds
  • 1 week = 604,800 seconds
  • 1 year (365.25 d) = 31,557,600 seconds

About this tool

Time converter turns between seven common time units: milliseconds, seconds, minutes, hours, days, weeks and years. Type a number in one field and the others update instantly. Everything is computed through seconds as the base unit using precise floating-point arithmetic. A year is defined as 365.25 days (a Julian year) to average out leap years, the same convention used in astronomy and in the SI light-year. Handy for timesheets, project estimation, video encoding and log analysis.

How to use it

  1. Type the value you know in one of the fields (e.g. 90 in minutes).
  2. All other fields update at the same time with the equivalent value (90 min = 5,400 s = 1.5 h).
  3. Use the "Common time intervals" reference table for the most-used conversions.
  4. Clear a field to reset, or type a new value into any field.

Examples

A 90-minute video
Input90 min
Output1.5 hours = 5400 seconds = 5 400 000 milliseconds = 0.0625 days
Useful for storage sizing at known bitrates or for estimating transcoding time.
A two-week sprint
Input2 weeks
Output14 days = 336 hours = 20 160 minutes = 1 209 600 seconds
At 8-hour working days that becomes 80 work-hours per person per sprint (10 days × 8 h).
Log timestamp: 4,200,000 ms
Input4 200 000 ms
Output4200 s = 70 min = 1.1667 hours
JavaScript and JVM timestamps are usually in milliseconds since epoch. Divide by 1000 for Unix seconds.

Common use cases

  • Project managers estimating duration in weeks, days or hours and converting to billing units.
  • Developers dealing with timeouts, cache TTLs and millisecond timestamps in logs.
  • Video producers converting run-time, clip length and timestamps.
  • Students solving physics and astronomy problems with SI units.
  • Analysts converting session duration, response time and retention windows.

Frequently asked questions

Why 365.25 days per year and not 365 or 366?
We use Julian years, which is the average once leap years are averaged in: every fourth year has 366 days, the rest 365. The mean 365.25 gives a clean conversion that holds across multi-year spans, unlike picking one specific calendar year. Astronomy and physics use the same definition (including the SI light-year = 9.461·10¹⁵ m). For an exact calendar date in a specific year use a calendar module rather than a plain time converter.
Is a month included?
No, "month" is deliberately excluded because it is ambiguous: calendar months vary from 28 to 31 days, a "work month" is about 22 business days, a payroll month may be 30 days. For rough conversion use 1 month ≈ 30.4375 days (365.25/12), which gives 730.5 hours or 2,630,000 seconds, but for calendar-accurate math you need proper date handling (month rollovers, leap years) in code.
Is the tool accurate for milliseconds and below?
Yes, for values within JavaScript’s safe integer range (±2⁵³ ≈ ±9.007·10¹⁵). That covers milliseconds from about year 285,000 BCE to year 285,000 CE and microseconds over a substantial range. For microseconds and nanoseconds scale manually: 1 s = 1,000,000 µs = 1,000,000,000 ns. The tool uses IEEE 754 doubles, so very small fractions may round: type 0.1 + 0.2 and JavaScript returns 0.30000000000000004.
Can I use decimals or negative numbers?
Yes to both. Decimals are useful for fractional values (1.5 hours = 5,400 seconds) and negative numbers for time deltas going backwards, e.g. when calculating "time since" against a future point. Use either a dot or a comma; the tool accepts both locale formats. Watch out for very large negative values outside the safe floating-point range.

Technical background

All units are defined as seconds per unit: ms = 0.001, s = 1, min = 60, h = 3600, d = 86,400, week = 604,800, year = 31,557,600 (365.25 days). Conversion: seconds = value × factor, other_value = seconds / other_factor. Computation uses JavaScript native floats (IEEE 754 double precision), giving about 15–17 significant digits. Display rounding is applied to avoid IEEE 754 artefacts like 0.30000000000000004. Conversion is driven by `initConverter` from `@/lib/convert` and reacts to input events. Zero and empty fields are treated as "no value" and blank the others.