| Rank | Country | Value |
|---|---|---|
| 1 | United States | 148,553 |
| 2 | China | 109,767 |
| 3 | Russian Federation | 85,544 |
| 4 | India | 68,103 |
| 5 | Canada | 48,150 |
| 6 | Germany | 33,401 |
| 7 | France | 27,716 |
| 8 | South Africa | 20,953 |
| 9 | Poland | 18,620 |
| 10 | Italy | 17,305 |
| 11 | United Kingdom | 16,179 |
| 12 | Kazakhstan | 16,006 |
| 13 | Spain | 15,963 |
| 14 | Romania | 10,769 |
| 15 | Türkiye | 10,546 |
| 16 | Sweden | 9,714 |
| 17 | Iran, Islamic Republic of | 9,455 |
| 18 | Czechia | 9,357 |
| 19 | Hungary | 8,037 |
| 20 | Finland | 5,918 |
| 21 | Belarus | 5,474 |
| 22 | Austria | 4,962 |
| 23 | Uzbekistan | 4,732 |
| 24 | Korea, Republic of | 4,308 |
| 25 | Switzerland | 4,122 |
| 26 | Bulgaria | 4,031 |
| 27 | Algeria | 4,000 |
| 28 | Norway | 3,885 |
| 29 | Congo, The Democratic Republic of the | 3,641 |
| 30 | Slovakia | 3,626 |
| 31 | Belgium | 3,612 |
| 32 | Serbia | 3,348 |
| 33 | Viet Nam | 3,159 |
| 34 | Netherlands | 3,041 |
| 35 | Croatia | 2,617 |
| 36 | Portugal | 2,527 |
| 37 | Chile | 2,396 |
| 38 | Greece | 2,339 |
| 39 | Morocco | 2,295 |
| 40 | Azerbaijan | 2,139 |
| 41 | Lithuania | 1,919 |
| 42 | Latvia | 1,859 |
| 43 | Mongolia | 1,821 |
| 44 | Tunisia | 1,777 |
| 45 | Israel | 1,720 |
| 46 | Malaysia | 1,655 |
| 47 | Ireland | 1,650 |
| 48 | Uruguay | 1,498 |
| 49 | Georgia | 1,387 |
| 50 | Slovenia | 1,209 |
| 51 | Moldova, Republic of | 1,149 |
| 52 | Botswana | 886 |
| 53 | Cameroon | 884 |
| 54 | Mauritania | 728 |
| 55 | Armenia | 698.40 |
| 56 | North Macedonia | 683 |
| 57 | Madagascar | 673 |
| 58 | Gabon | 648 |
| 59 | Côte d'Ivoire | 639 |
| 60 | Tajikistan | 620 |
| 61 | Burkina Faso | 518 |
| 62 | Kyrgyzstan | 417 |
| 63 | United Arab Emirates | 279 |
| 64 | Luxembourg | 271 |
| 65 | Hong Kong | 230.10 |
The total length of rail line in the country operated for passenger transport, goods transport, or both.
Data source: World Bank Development Indicators