Class I railroad CSX Corporation (CSX -1.21%), the largest freight carrier serving the eastern seaboard of the U.S., released quarterly earnings on Tuesday that beat expectations despite a long-term decline in coal shipments, once upon a time the most important revenue driver for railroads. CSX kicks off earnings season for North America's Class I freight railroads, and its ability to improve financial performance in the face of a large drop in coal shipment revenue bodes well not just for CSX, but for its peers as well.

Photo credit: Wiki Commons/Nate Beal

CSX booked $3 billion in revenue in the third quarter, up 4% from 2012, with increases in chemical and intermodal shipments more than compensating for a 9% drop in coal revenue and moderate growth in most other categories. Net earnings eked up 2% to $463 million, while a buyback program lowering the number of shares outstanding led to a 5% increase in earnings per share, from $0.44 per share to $0.46 per share. Analysts polled by Reuters were instead expecting an earnings decrease to $0.43 per share.

Analysts expected lower revenue and earnings largely on the back of a poor coal performance. CSX's track geography in the eastern U.S. and Canada leaves it heavily exposed to Appalachian coal, and that has been a liability for the company in recent years. Coal has been steadily falling in both price and volume as natural gas, a cheaper and cleaner fuel, has replaced coal as an energy source at power plants. Coal has been pressured by stricter environmental regulations making dirty coal-fired power plants more expensive to operate on one end, and by much cheaper natural gas made available by the fracking boom in North America on the other.

Coal has historically been the single most important commodity for the entire rail industry, and the decline in coal has been worrisome for all rail companies. The fact that CSX, with trackage in the heart of coal country, has been able to overcome this trend is heartening. The developments that boosted CSX to an earnings win, intermodal freight and chemicals, should benefit the entire industry. Revenue from intermodal freight -- the containers that can be easily transported by ship, truck, or train -- gained 8% in revenue on the back of higher conversions from highway shipments as well as successful pricing increases.

Chemicals were up largely on the back of the shale oil and gas boom. Even as fracking has chipped away at a prime driver of rail volumes, it has created new opportunities for rail. Crude oil produced from shale formations nationwide needs to get shipped to refineries on the East Coast, while sand used in the fracking process gets shipped to production areas. This activity led to an 11% surge in chemicals revenue in the third quarter. If even coal-heavy CSX was able to turn the changing energy landscape into a benefit as well as a liability, that's good news for the entire North American rail industry.

As railroads report earnings over the next few weeks, investors should see even more positive results from those with geographies less dependent on Appalachian coal and with more exposure to oil shale plays and western intermodal ports. Union Pacific (UNP -0.38%) will report earnings on Thursday, and while that railroad's western-centric trackage would ordinarily benefit from these developments, Union Pacific was hurt by flooding in Colorado that wiped out some of its track. That will depress Union Pacific's quarterly numbers, but the broader trends will still benefit the railroad. Other western railroads, including Canadian Pacific, Canadian National, and Warren Buffett's Burlington National Santa Fe, should all stand to see even greater benefits from the tailwinds that boosted CSX to its surprise earnings beat.