How to Calculate Average Train Speed — With Examples
Average train speed explained: the difference between time-average and distance-average speed, with practical examples and the formula used by TrainSpeedTest.net.
Time-average speed = total distance ÷ total time, including stops. Moving average speed excludes stationary periods, so it is always higher. TrainSpeedTest.net calculates a time-weighted moving average from GPS samples above the stationary threshold.
- Time-average includes every stop and delay
- Moving average only counts time spent actually moving
- The gap between them reveals how much time was spent stopped
- TrainSpeedTest.net weights each sample by its time interval
Time-average example
180 km in 2 hours
Moving average example
Same trip, minus 20 min stopped
Stationary threshold
Below this, treated as stopped
Worked example result
312.5 km in 2:45:00
Average Speed Has Two Different Answers
Average speed sounds simple, but there are two different ways to define it — and they give genuinely different numbers for the exact same trip.
Time-Average Speed
Formula: total distance divided by total time. This is what most people mean by "average speed." If a train travels 180 km in 2 hours, the time-average speed is 90 km/h. This figure includes all stops, slow sections, and station dwell time.
Moving Average Speed
Many speedometers — including TrainSpeedTest.net — calculate moving average speed: the average speed during the time the vehicle was actually moving, above a threshold typically 1-2 km/h. This is always higher than the time-average speed because it excludes stationary periods.
Worked Example: Two Answers, One Trip
Consider a journey of 180 km taking 2 hours total, with 20 minutes spent stopped at stations.
Time-average speed
180 km ÷ 2 h = 90 km/h.
Moving average speed
180 km ÷ 1.67 h (moving time only) ≈ 107.8 km/h.
How TrainSpeedTest.net Calculates Average Speed
TrainSpeedTest.net accumulates a weighted sum of speed readings from all GPS samples collected while the speed is above 0.5 m/s (the stationary threshold). The average is weighted by the time interval each sample represents — more accurate than a simple mean of all samples, since GPS sampling intervals are not always perfectly even.
A Second Worked Example, From Real Trip Data
A rider recorded a trip with the following figures: max speed 182.4 km/h, moving average 134.7 km/h, distance 312.5 km, duration 2:45:00 (9,900 seconds).
Calculating the Time-Average for That Trip
Time-average = 312,500 m ÷ 9,900 s × 3.6 = 113.6 km/h. The difference between this and the recorded moving average (134.7 vs 113.6 km/h) is explained by station stops and slow running through urban sections.
Why the Gap Matters
The size of the gap between time-average and moving-average speed is itself informative — a large gap tells you a significant portion of the journey was spent stopped or crawling through restricted sections, even if the train ran fast whenever it was actually moving.
Frequently Asked Questions
Try the Train Speed Test
Measure your train speed live in your browser — no app required.
Works on iPhone, Android & any modern browser · Always free