What this calculator does
Convert time intervals between subsecond, second, minute, hour, day, week, month, and year units.
How it works
The calculator evaluates seconds = value × seconds-per-source-unit; result = seconds ÷ seconds-per-target-unit. Inputs are checked before calculation, and invalid values such as zero denominators or out-of-range selections produce a clear error instead of a misleading result.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
3-
?value=Time valueNumber · Required · Default: 1
-
?fromUnit=From unitChoice · Required · Default: day · Accepted values: ns, us, ms, s, min, h, day, week, month, year
-
?toUnit=To unitChoice · Required · Default: h · Accepted values: ns, us, ms, s, min, h, day, week, month, year
Outputs
2-
resultConverted timeNumber · Primary output
-
secondsEquivalent secondsNumber
Inputs and results
The inputs are Time value, From unit, To unit. Results include Converted time, Equivalent seconds.