Economists have widely endorsed pricing CO2 emissions to internalize climate change-related externalities. Doing so would significantly affect coal, the most carbon-intensive energy source. However, U.S. coal markets exhibit an additional distortion: the railroads that transport coal to power plants can exert market power. This paper estimates how coal-by-rail markups respond to changes in coal demand. I identify markups in a major intermediate goods market using both reduced-form and structural methods. I find that rail carriers reduce coal markups when downstream power plant demand changes due to a drop in the price of natural gas (a competing fuel). My results imply that decreases in coal markups have increased recent U.S. climate damages by $11.9 billion, compared to a counterfactual where markups did not change. Incomplete passthrough would likely erode the environmental benefits of an incremental carbon tax, shifting the tax burden towards upstream railroads. Still, a non-trivial tax would likely increase welfare.