# Speed, Distance & Time Calculator

> Solves the uniform-motion relation speed = distance / time for whichever of the three quantities is omitted, and reports the speed in m/s, km/h and mph and the time as h:mm:ss.

- Calculator id: `speed-distance-time` · Category: Physics (`physics`) · Tool name: `solve_speed_distance_time`
- Canonical page: https://tttkmbb.com/physics/speed-distance-time · This document: https://tttkmbb.com/physics/speed-distance-time.md · JSON definition: https://tttkmbb.com/physics/speed-distance-time.json

## Purpose

Solves the uniform-motion relation speed = distance / time for whichever of the three quantities is omitted, and reports the speed in m/s, km/h and mph and the time as h:mm:ss.

**Use when:** You know any two of distance, elapsed time and average speed for travel at constant (average) speed and need the third.

**Do not use when:** Speed changes during the motion (use acceleration or free-fall), or you want a running pace per km or mile (use running-pace).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `distance_m` | number | m | optional | Distance travelled in metres (1 km = 1000 m, 1 mile = 1609.344 m). Omit to solve for it. (min 0) |
| `time_s` | number | s | optional | Elapsed time in seconds (1 h = 3600 s). Omit to solve for it. (> 0) |
| `speed_m_s` | number | m/s | optional | Average speed in metres per second (km/h ÷ 3.6, mph × 0.44704). Omit to solve for it. (min 0) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `solved_for` | string |  | Which input was computed: distance_m, time_s or speed_m_s. |
| `distance_m` | number | m | Distance travelled. |
| `distance_km` | number | km | Distance in kilometres. |
| `time_s` | number | s | Elapsed time. |
| `time_formatted` | string |  | Elapsed time as hours:minutes:seconds, rounded to the second. |
| `speed_m_s` | number | m/s | Average speed. |
| `speed_km_h` | number | km/h | Average speed in kilometres per hour (× 3.6). |
| `speed_mph` | number | mph | Average speed in miles per hour (÷ 0.44704). |

## Formula

`speed_m_s = distance_m / time_s; distance_m = speed_m_s × time_s; time_s = distance_m / speed_m_s; speed_km_h = 3.6 × speed_m_s; speed_mph = speed_m_s / 0.44704`

Uniform (constant or average) motion in a straight line; the result is the average speed over the interval, not an instantaneous value.

## Data Sources

- HyperPhysics – Motion equations for constant acceleration — http://hyperphysics.phy-astr.gsu.edu/hbase/mot.html (reference, retrieved 2026-09-23)
- NIST Special Publication 811 – Guide for the Use of the SI, Appendix B (conversion factors) — https://www.nist.gov/pml/special-publication-811 (standard, 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/speed-distance-time?`
- `POST https://tttkmbb.com/api/v1/calculate/speed-distance-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/speed-distance-time · OpenAPI operationId `solve_speed_distance_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": "speed-distance-time", "inputs": {…}}`

## Example

- 100 m in 9.58 s (100 m world record): inputs `{"distance_m":100,"time_s":9.58}` → `{"solved_for":"speed_m_s","speed_m_s":10.4384,"speed_km_h":37.5783,"speed_mph":23.3501,"distance_km":0.1}`
- 150 km at 25 m/s: inputs `{"distance_m":150000,"speed_m_s":25}` → `{"solved_for":"time_s","time_s":6000,"time_formatted":"1:40:00","speed_km_h":90}`

```
GET https://tttkmbb.com/api/v1/calculate/speed-distance-time?distance_m=100&time_s=9.58
```

## Limitations

Speed changes during the motion (use acceleration or free-fall), or you want a running pace per km or mile (use running-pace). Uniform (constant or average) motion in a straight line; the result is the average speed over the interval, not an instantaneous value. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Can I enter km and hours instead of metres and seconds?**

No; convert first (1 km = 1000 m, 1 h = 3600 s, 1 km/h = 0.27778 m/s). Outputs include km, km/h and mph twins so you rarely need to convert results.

**What if I give all three values?**

The calculator returns an INVALID_PARAMETER error: supply exactly two, and the third is computed.

## Related

- [Acceleration Calculator](https://tttkmbb.com/physics/acceleration.md) — When speed changes uniformly over the interval.
- [Running Pace Calculator](https://tttkmbb.com/fitness/running-pace.md) — Pace per kilometre or mile for runners.
- [Speed Converter](https://tttkmbb.com/conversion/speed.md) — Convert a known speed between m/s, km/h, mph and knots.
