The Philadelphia, Wilmington and Baltimore Railroad (PW&B) was an American railroad that operated independently from 1836 to 1881. It was formed in 1836 by the merger of four state-chartered railroads in three Middle Atlantic states to create a single line between Philadelphia and Baltimore. In 1881, the PW&B was purchased by the Pennsylvania Railroad (PRR), which was at the time the nation's largest railroad. In 1902, the PRR merged it into its Philadelphia, Baltimore and Washington Railroad.