Is there any way to find the distance covered by a train in a particular rail route between two stations?

I frequently travel by trains in Europe, and have often wondered how much distance I have travelled in each trip. As far as I can see, the distance covered by trains between two railway stations is not provided by operators such as Deutsche Bahn, SNCF, etc. Is there any way to find this information? OpenRailwayMap seems to cover a lot of railway lines, but I couldn't see any option to find the distance between two stations. I am generally interested in doing this across Europe, but specifically at least in Germany.

asked Aug 26, 2023 at 18:47 1,435 1 1 gold badge 15 15 silver badges 31 31 bronze badges

How precise do you need it to be? If you want a rough idea you can always use Google Map to either get the distance as a crow flies (using the “measure distance” tool) or the distance by road, which is often – but not alway – relatively close.

Commented Aug 26, 2023 at 21:25

@jcaron I have tried using the road distance by Google Maps, but the road routes often seem to be very different from the rail routes, so I was hoping there would be a way to get a more accurate estimate.

Commented Aug 27, 2023 at 12:44

@RobbieGoodwin Thanks, but (1) "ask the train companies": I am not sure where I should ask, (2) "simply Search the two locations": that is what this question is about, to know how and where to search for this, (3) "why anyone would care": just out of curiosity, (4) "travel time": this is already available on the ticket, (5) "carbon emissions": I agree this would be interesting to know too, but is not part of the current question.

Commented Aug 28, 2023 at 7:40

@GoodDeeds I'm afraid there isn't. I've done a bit of searching; the pamphlet was called "Ihr Reiseplan" and is indeed discontinued. DB wants you to use their navigator for the same information, but they don't provide distance information there.

Commented Aug 28, 2023 at 10:32

@gerrit Thanks, I had missed that question. However, the answers here seem to be better (more general, and the Rome2Rio answer there doesn't seem to work anymore, at least for an example I tried), so wouldn't it be better to close that as a duplicate of this?

Commented Sep 10, 2023 at 15:29

10 Answers 10

You can use a routing engine that allows routing on the train network. E.g. bikerouter.de will do the job as long as all the tracks are available in OpenStreetMap. It usually needs some fine tuning to get the route correct, but this is usually possible if you know the intermediate stops. Example: Paris-Berlin

Many train services are also explicitly available in OSM and can be found by a regular web search, e.g. The local S-Bahn S7 in Frankfurt: https://www.openstreetmap.org/relation/445971 You can't use this information directly to measure the distance between two arbitrary points, but you can use it to guide your measurement as mentioned above.

Screenshot of Bikerouter.de showing a rail route from Paris to Berlin

On Bikerouter.de you need to select the routing profile "Rail" in the upper left corner, then draw your route with some intermediate points. Make sure the router doesn't do any stupid u-turns because you selected the wrong track on a multi-tracked railroad! The distance shown is 1088 km, which should be pretty accurate. The travel time and energy numbers are to be ignored - the routing profile is not properly set up to calculate this for trains. On routes with large bridges also the elevation profile might be wrong - there's no height information of bridges, only of the terrain underneath.