Skip to content

About RailKM

Exact track distance for every Indian Railways journey

RailKM is a free, fast distance and multi-via route engine for Indian Railways. It computes the shortest track kilometres between any two of 8,989 indexed stations, chains up to eight stops into a single break-journey plan, and lists every intermediate halt with its cumulative distance.

What RailKM does

  • Computes the shortest track distance between any origin and destination.
  • Chains multi-via journeys (up to eight stops) for break-journey routing.
  • Lists every intermediate station with cumulative kilometres.
  • Flags double-backs where the route revisits a station.
  • Resolves legacy ⇄ modern station codes such as JHS ⇄ VGLJ and CSTM ⇄ CSMT.
  • Estimates standard-class fares and exports a print / PDF route card.

How the distance engine works

The network is modelled as a weighted graph of 8,989 stations connected by 18,994 track segments. RailKM runs a binary-heap Dijkstra search that minimises total track kilometres, then walks the resolved path to produce a leg-by-leg breakdown with cumulative distance at every halt. Every result is computed on the fly, in the browser, from a single pre-rendered graph file.

Where the data comes from

Distances are derived from open Indian Railways timetable data published byDataMeet. Per-segment kilometres are reconstructed from train timetables and validated against known route distances. RailKM is an independent project and is not affiliated with, endorsed by, or operated by Indian Railways or IRCTC.

Accuracy & limitations

RailKM reports the shortest track route by total kilometres — not the fastest or the most frequently served train path. Figures are indicative and may differ slightly from published timetables due to data availability. For ticketing, timings and official fares, always confirm with Indian Railways or IRCTC.

What RailKM is not

RailKM does not sell tickets and does not provide live running status. It is a planning and reference tool for distances, intermediate stations, break-journey feasibility and approximate fares.

Start mapping

Open the mapper to plan a route, or browse the pre-computed directory of popular railway distance routes.