# 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).

- Calculator id: `time` · Category: Unit Conversion (`conversion`) · Tool name: `convert_time`
- Canonical page: https://tttkmbb.com/conversion/time · This document: https://tttkmbb.com/conversion/time.md · JSON definition: https://tttkmbb.com/conversion/time.json

## Purpose

Converts durations between nanoseconds, microseconds, milliseconds, seconds, minutes, hours, days, weeks, fortnights, 30-day months, 365-day years and Julian years (365.25 days).

**Use when:** 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).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `value` | number |  | required | 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 |  | required | 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 |  | required | Unit to convert into (same symbols as from_unit). |

## Output

| Field | 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. |

## 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.

## Data Sources

- NIST Special Publication 811 – Guide for the Use of the International System of Units (SI), Appendix B conversion factors — https://www.nist.gov/pml/special-publication-811 (standard, retrieved 2026-09-23)
- BIPM – The International System of Units (SI Brochure, 9th edition) — https://www.bipm.org/en/publications/si-brochure (standard, retrieved 2026-09-23)
- Wikipedia – Conversion of units — https://en.wikipedia.org/wiki/Conversion_of_units (reference, retrieved 2026-09-23)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/time?value=…&from_unit=…&to_unit=…`
- `POST https://tttkmbb.com/api/v1/calculate/time` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/time · OpenAPI operationId `convert_time` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "time", "inputs": {…}}`

## Example

- 3 hours to minutes: inputs `{"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: inputs `{"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
```

## Limitations

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). 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. All values are computed from the formula above; no measurement or live data is involved.

## 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

- [Date Difference Calculator](https://tttkmbb.com/everyday/date-difference.md) — Exact days between two calendar dates.
- [Time Duration Calculator](https://tttkmbb.com/everyday/time-duration.md) — Duration between two clock times.
- [Add or Subtract Days Calculator](https://tttkmbb.com/everyday/add-days.md) — Add a duration to a date.
