Home › Unit Conversion › Time Converter
Time Converter
Converts durations between nanoseconds, microseconds, milliseconds, seconds, minutes, hours, days, weeks, fortnights, 30-day months, 365-day years and Julian years (365.25 days).
When to use
You need a duration in another unit, e.g. hours to minutes, days to weeks or seconds to milliseconds.
Do not use when: You need the time between two calendar dates (use date-difference), a date shifted by a duration (use add-days), or a clock-time difference (use time-duration).
Formula
result = value × factor, factor = (1 from_unit in s) / (1 to_unit in s)
Calendar units are fixed averages: month_30 = 30 days, year_365 = 365 days, year_julian = 365.25 days; real calendar months (28–31 days) and leap years need a date calculator.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
value | number | yes | Amount to convert, expressed in from_unit. | |
from_unit | enum: ns | us | ms | s | min | h | day | week | fortnight | month_30 | year_365 | year_julian | yes | Unit of the input value. Accepted symbols: ns, us, ms, s, min, h, day, week, fortnight, month_30, year_365, year_julian; spelled-out names and common abbreviations are accepted too. | |
to_unit | enum: ns | us | ms | s | min | h | day | week | fortnight | month_30 | year_365 | year_julian | yes | Unit to convert into (same symbols as from_unit). |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
result | number | Converted value expressed in to_unit (rounded to 6 decimals; see result_text for very small or very large values). | |
result_text | string | The conversion as text with 6 significant figures, e.g. "5 mi = 8.04672 km". | |
formula | string | Relation used, e.g. "1 mi = 1.609344 km". | |
factor | number | Multiplier from from_unit to to_unit (result = value × factor); absent for non-linear conversions. | |
conversion_table | object | The input value expressed in every supported time unit (6 significant figures), keyed by unit symbol. |
Example
3 hours to minutes: {"value":3,"from_unit":"h","to_unit":"min"} → {"result":180,"factor":60,"formula":"1 h = 60 min","conversion_table":{"s":10800,"day":0.125}}
90 days to weeks: {"value":90,"from_unit":"day","to_unit":"week"} → {"result":12.857143,"conversion_table":{"h":2160,"month_30":3,"year_365":0.246575}}
GET https://tttkmbb.com/api/v1/calculate/time?value=3&from_unit=h&to_unit=min
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/time(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/time · Markdown: https://tttkmbb.com/conversion/time.md · JSON definition: https://tttkmbb.com/conversion/time.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="time" - OpenAPI operationId:
convert_time - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
FAQ
How long is a month or a year here?
month_30 is exactly 30 days and year_365 exactly 365 days (year_julian is 365.25 days, the astronomical convention). For real calendar arithmetic use date-difference or add-days.
Does 'day' account for daylight-saving changes?
No. A day is exactly 86,400 s; clock changes and leap seconds are ignored.
Related calculators
- Date Difference Calculator — Exact days between two calendar dates.
- Time Duration Calculator — Duration between two clock times.
- Add or Subtract Days Calculator — Add a duration to a date.