The Pilatus Railway (German: Pilatusbahn, PB) is a mountain railway in Switzerland and is the steepest rack railway in the world, with a maximum gradient of 48% and an average gradient of 35%. The line runs from Alpnachstad, on Lake Alpnach, to a terminus near the Esel summit of Pilatus at an elevation of 2,073 m (6,801 ft), which makes it the highest railway in the canton of Obwalden and the second highest in Central Switzerland after the Furka line. At Alpnachstad, the Pilatus Railway connects with steamers on Lake Lucerne and with trains on the Brünigbahn line of Zentralbahn.
The first project to build the line was proposed in 1873, suggesting a 1,435 mm (4 ft 8 1⁄2 in) standard gauge and 25% maximal gradient. It was concluded that the project was not economically viable. Eduard Locher, an engineer with great practical experience, then proposed an alternative project with the maximum grade increased to 48%, cutting the distance in half. Conventional systems at the time could not negotiate such gradients because the cogwheel that is pressed to the rack from above may, under higher gradients, jump out of engagement with the rack, eliminating the train's driving and braking power. Instead, Locher placed a horizontal double rack between the two rails with the rack teeth facing each side. This was engaged by two flanged cogwheels mounted on vertical shafts underneath the car.
This design eliminated the possibility of the cogwheels climbing out of the rack, and prevented the car from toppling over, even under severe crosswinds common in the area. The system was also capable of guiding the car without the need for flanges on the wheels. Indeed, the first cars on Pilatus had no flanges on running wheels, but they were later added to allow cars to be moved through tracks without rack rails during maintenance. The line was opened using steam traction on 4 June 1889, and was electrified on 15 May 1937, using an overhead electric supply of 1550 V DC.
The government provided no subsidy for the construction of the line. Instead, Locher established his own company "Locher Systems" to build the railway. The railway was built entirely with private capital and has remained financially viable throughout its life.
The Pilatus Railway was named a Historic Mechanical Engineering Landmark by the American Society of Mechanical Engineers in 2001.