Home › Physics › Speed, Distance & Time Calculator
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.
When to use
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).
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.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
distance_m | number | m | no | Distance travelled in metres (1 km = 1000 m, 1 mile = 1609.344 m). Omit to solve for it. Range: ≥ 0 |
time_s | number | s | no | Elapsed time in seconds (1 h = 3600 s). Omit to solve for it. Range: > 0 |
speed_m_s | number | m/s | no | Average speed in metres per second (km/h ÷ 3.6, mph × 0.44704). Omit to solve for it. Range: ≥ 0 |
Outputs
| Output | 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). |
Example
100 m in 9.58 s (100 m world record): {"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: {"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
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/speed-distance-time(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/speed-distance-time · Markdown: https://tttkmbb.com/physics/speed-distance-time.md · JSON definition: https://tttkmbb.com/physics/speed-distance-time.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="speed-distance-time" - OpenAPI operationId:
solve_speed_distance_time - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
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 calculators
- Acceleration Calculator — When speed changes uniformly over the interval.
- Running Pace Calculator — Pace per kilometre or mile for runners.
- Speed Converter — Convert a known speed between m/s, km/h, mph and knots.