Skip to main content

Distance-Speed-Time Triangle Calculator

Solve distance, speed, or time from the other two — plus multi-leg average speed and there-and-back round-trip average speed (harmonic mean) — with automatic unit conversion between km/mi/m/ft and kmh/mph/m/s/ft/s.

Input

Output

Result
MetricValue
No data yet
Formula
Was this helpful?

Guides

The Distance-Speed-Time Triangle Calculator solves the classic distance = speed × time relationship for whichever value you don't already know, and covers two travel-planning cases the basic triangle can't: the average speed across a multi-leg trip, and the average speed of a there-and-back round trip made at two different speeds.

It's built for students working through motion problems, anyone planning a road trip or comparing travel options, and for checking distance/speed/time math without redoing the unit conversions by hand.

How to use it

  1. Pick what you want to Solve For — Distance, Speed, Time, a multi-leg average, or a round-trip average.
  2. Choose your Distance Unit and Speed Unit — the calculator converts between them automatically, so you can enter a speed in mph and get a distance back in kilometers.
  3. Fill in the fields for your chosen mode.
  4. Read the Result table, and check Formula for which equation was used.

Results update automatically as you type. For example, 60 km/h for 2.5 hours returns a distance of 150 km.

Multi-leg average speed

For a trip made in stages at different speeds, enter one distance,speed pair per line in Legs — e.g. 100,50 then 50,25 for a 100 km leg at 50 km/h followed by a 50 km leg at 25 km/h. The calculator sums each leg's distance and time, then divides total distance by total time for the true average speed (37.5 km/h in that example) — not a plain average of the two speeds (which would incorrectly give 37.5 only by coincidence here; in general the two differ because slower legs take proportionally longer).

Round-trip average speed (harmonic mean)

If you travel the same distance there and back at two different speeds, the average speed for the whole trip is the harmonic mean of the two speeds, not their arithmetic mean:

average speed = 2 × v₁ × v₂ ÷ (v₁ + v₂)

This is always pulled toward the slower speed, because you spend more time traveling at it. Driving out at 50 km/h and back at 25 km/h averages 33.3 km/h overall — not 37.5 km/h, which is what a simple average would (wrongly) suggest.

Privacy

This calculator runs entirely in your browser. Your numbers are never uploaded, logged, or stored — the computation happens locally on your device.

distance speed timespeed calculatoraverage speedd=sttravel timeharmonic meanround trip speedphysicsmath

Use it from code

From 3 credits per call

REST API

curl -X POST https://api.iotools.cloud/v1/tool/distance-speed-time-triangle-calculator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "solve_d",
    "distanceUnit": "km",
    "speedUnit": "kmh",
    "speed": "60",
    "timeHours": "2.5"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `distance-speed-time-triangle-calculator` tool (Distance-Speed-Time Triangle Calculator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.