The S40 is a regional railway line of the Zurich S-Bahn on the Zürcher Verkehrsverbund (ZVV), Zurich transportation network, in the cantons of Schwyz, St. Gallen and Zurich.
The line runs from Einsiedeln to Rapperswil via the junction stations of and , crossing the Seedamm. It is operated by the Südostbahn (SOB).
All services use Südostbahn rolling stock.
The train frequency is usually 30 minutes, and the trip takes 37 minutes.