A cog railway or rack and pinion railway is a mountain railway with a special centre rack rail mounted in the middle of the sleepers between the regular rails. The trains are fitted with one or more cog wheels that mesh into this rack rail (picture). This then allows the locomotives to haul the train up steeply inclined slopes.
- Mount Washington in New Hampshire, built in 1869, the only railway in the world built entirely on a trestle (3.1 miles or 5.2 km long)
- Manitou and Pike's Peak Railway, Colorado Springs, Colorado, United States
- Jungfrau Joch, on the border of the cantons of Bern and Valais, Switzerland
- Mount Pilatus near Lucerne - the world's steepest, max. 48%
- Schneebergbahn, Lower Austria, Austria
- Zugspitzbahn, connecting Garmisch-Partenkirchen and the Zugspitze, Germany
- The Nilgiri branch of the South Indian Railway, between Mettupalayam and Conoor in Tamil Nadu
- Snowdon Mountain Railway in Snowdonia, Wales the only rack railway in the UK.