Skip to content
Calculator · Motion

Speed, distance and time calculator

Enter any two of distance, speed and time to get the third, add the legs of a trip to get its real average speed, or turn a race time into a pace. A car drives the trip on the road above a timeline of where the time goes.

Distance
Speed
Time
Show the speed in
Show the distance in
Units for the legs
Each leg: distance and speed (leave 0 to skip)
1
2
3
4
Average speed…
In km/h…
In mph…
In m/s…
Pace…
Working

Speed = distance ÷ time. Over several legs, average speed is total distance ÷ total time. Units are exact by definition: 1 mile = 1,609.344 m, 1 foot = 0.3048 m, 1 nautical mile = 1,852 m and 1 knot = 1 nautical mile per hour.

One formula, three ways round

Know any two of distance, speed and time and the third follows. Keep the units matched, and turn minutes into hours before dividing.

v = d ÷ t

Slow legs last longer

Average speed is total distance over total time. Over equal distances the car spends longer at the low speed, so 60 out and 40 back averages 48.

2 × 60 × 40 ÷ (60 + 40) = 48

Pace is speed upside down

Runners count minutes per kilometre or per mile. A 25 minute 5K is 5:00 per km, which is 12 km/h.

pace = t ÷ d

How do you calculate speed, distance and time?

Speed is distance divided by time, distance is speed times time, and time is distance divided by speed. A drive of 150 km in 2 hours averages 150 ÷ 2 = 75 km/h. Keep the units matched: kilometres with hours for km/h, metres with seconds for m/s.

For a trip in several legs, average speed is the total distance over the total time, never the average of the speeds. Drive 60 km at 60 km/h and come back at 40 km/h and the round trip averages 48 km/h, not 50. Why is in Why average speed is not the average of the speeds.

Key results

  • The three formulas: speed = distance ÷ time, distance = speed × time, time = distance ÷ speed.
  • Average speed: total distance ÷ total time. 60 km/h out and 40 km/h back over the same road gives 48 km/h, because the slow half takes longer.
  • Pace: time ÷ distance. A 5 km run in 25 minutes is 5:00 per km; a 4 hour marathon is 5:41 per km.
  • Units: 1 mile = 1.609344 km and 1 m/s = 3.6 km/h exactly, so 100 km/h is 62.14 mph.

Six worked examples

Each button loads the example into the calculator. The trips and race times are made-up examples.

150 km in 2 hours: 75 km/h

find the speed

Speed = distance ÷ time = 150 km ÷ 2 h = 75 km/h. That is 46.6 mph or 20.83 m/s. It is the average over the drive; the car will have gone faster and slower along the way.

Distance 150 km Time 2 h Average speed 75 km/h In m/s 20.83 m/s

90 km/h for 2 hours 30 minutes: 225 km

find the distance

Turn the time into hours first: 2 h 30 min is 2.5 h, not 2.3 h. Then distance = speed × time = 90 × 2.5 = 225 km.

Speed 90 km/h Time 2.5 h Distance 225 km In miles 139.8 mi

300 km at 100 km/h: 3 hours

find the time

Time = distance ÷ speed = 300 ÷ 100 = 3 hours of driving. Stops come on top: with a 20 minute break the trip takes 3 h 20 min, and its average speed drops to 300 ÷ 3.33 = 90 km/h.

Distance 300 km Speed 100 km/h Driving time 3 h 00 min With a 20 min stop 90 km/h average

60 there, 40 back: 48 km/h, not 50

average speed

Out: 60 km at 60 km/h takes 1 hour. Back: 60 km at 40 km/h takes 1.5 hours. That is 120 km in 2.5 hours, so the average is 120 ÷ 2.5 = 48 km/h.

Averaging the speeds gives 50 km/h and predicts the trip takes 2 h 24 min, 6 min too short. The car spends more time going slowly, so the slow speed counts for more.

Total distance 120 km Total time 2 h 30 min Average speed 48 km/h Average of speeds 50 km/h (wrong)

Town, highway, town: 62.96 km/h

several legs

30 km of town traffic at 30 km/h (1 h), 120 km of highway at 100 km/h (1 h 12 min) and 20 km at 40 km/h (30 min) make 170 km in 2 h 42 min: an average of 62.96 km/h.

Here the average of the three speeds, 56.67 km/h, comes out too low, because most of the distance is on the fast highway. Averaging speeds is wrong in either direction; only total distance over total time is right.

Total distance 170 km Total time 2 h 42 min Average speed 62.96 km/h Average of speeds 56.67 km/h (wrong)

A 4 hour marathon: 5:41 per km

running pace

Pace = time ÷ distance = 240 min ÷ 42.195 km = 5.688 min per km, which is 5:41 per km or 9:09 per mile. As a speed that is 10.55 km/h. A 25 minute 5K is 5:00 per km.

Distance 42.195 km Time 4:00:00 Pace 5:41 /km Per mile 9:09 /mi

Common speeds in each unit

Speedkm/hmphm/sTime for 100 km
Walking (example)5 km/h3.107 mph1.389 m/s20 h 00 min
Cycling (example)20 km/h12.43 mph5.556 m/s5 h 00 min
Town driving (example)50 km/h31.07 mph13.89 m/s2 h 00 min
Country road (example)80 km/h49.71 mph22.22 m/s1 h 15 min
Motorway (example)110 km/h68.35 mph30.56 m/s54 min 33 s
High-speed train (example)300 km/h186.4 mph83.33 m/s20 min

Typical example speeds, converted with 1 m/s = 3.6 km/h and 1 mile = 1.609344 km exactly. Real speed limits vary by country and road.

How the calculator works

Every input is turned into metres, seconds and metres per second, the formula is applied, and the answer is turned back into the unit you picked. The unit factors are exact by definition: 1 mile = 1,609.344 m, 1 foot = 0.3048 m, 1 nautical mile = 1,852 m, 1 knot = 1 nautical mile per hour.

For several legs, each leg's time is its distance divided by its speed. Average speed is the sum of the distances over the sum of the times. The tool also shows the average of the speeds, and the travel time that number would wrongly predict.

Pace is time divided by distance, shown as minutes and seconds per kilometre and per mile.

What the model leaves out

  • Stops and traffic: the tool works with steady speeds. A real trip with stops has a lower average speed than its moving speed.
  • Speed and velocity: velocity has a direction. A round trip back to the start has an average velocity of zero, but an average speed of total distance over total time.
  • Acceleration: speeding up and slowing down are treated as instant changes from one leg to the next.

Common misconceptions

"Average speed is the average of the speeds." Only when each speed lasts the same time. Over equal distances the slow legs last longer and pull the average down.

"2.5 hours is 2 hours 50 minutes." Hours have 60 minutes, so 2.5 h is 2 h 30 min. Mixing these up is a common source of wrong answers.

"Driving faster on the way back makes up for a slow start." Time lost at a low speed is never fully won back. To average 60 km/h over a round trip after going out at 30 km/h, you would need to come back in no time at all.

Frequently asked questions

What is the formula for speed, distance and time?

Speed = distance ÷ time, distance = speed × time, and time = distance ÷ speed. Use matching units, such as kilometres, hours and km/h.

How do you calculate average speed?

Divide the total distance by the total time. 60 km at 60 km/h and 60 km back at 40 km/h is 120 km in 2.5 hours, an average of 48 km/h.

Why is average speed not the average of the speeds?

Because you spend more time at the lower speed. Over equal distances the slow leg lasts longer, so it pulls the average down. The right average for equal distances is the harmonic mean.

How do you work out running pace?

Divide the time by the distance. 25 minutes for 5 km is 5 minutes per km. A 4 hour marathon of 42.195 km is 5:41 per km.

How do you convert km/h to m/s?

Divide by 3.6, because 1 km/h is 1,000 m in 3,600 s. So 90 km/h is 25 m/s. To go from m/s to km/h, multiply by 3.6.

Keep learning

More simulations

More students and teachers tools

See all science tools