In an interview with CNBC a few years ago, legendary investor Warren Buffett was asked what set of numbers he would choose if he could only look at a single economic indicator for a month. While the Oracle of Omaha was hesitant to pick just one, he went with rail car loadings as his "desert island" indicator. You might say Buffett's a little biased, considering he bought up North America's second-largest railroad himself, but it makes sense. Railroads are the circulatory system of the economy, moving raw goods to factories and finished products to consumers. So it should be good news to more than rail investors to hear great results this quarter from some of North America's biggest railroads, including Canadian National (CNI 1.56%), Norfolk Southern (NSC 1.95%), and Canadian Pacific (CP 0.20%) this week, following on the heels of CSX (CSX 1.07%) and Union Pacific (UNP 4.99%) last week.

Photo courtesy of Canadian National

North America's Class I rail stocks have been in a transition period in recent years, as railroads have struggled with big declines in coal. Coal has historically been the largest volume driver and the most important commodity for railroads, but coal production has fallen steadily as natural gas has replaced it as the primary feedstock for power plants thanks to its cheap, abundant supply made possible by the shale fracking boom in North America.

That trend has caused analysts to expect hard times for the railroads, but in the third quarter every major railroad that has reported so far handily beat earning estimates. Sources of strength for the railroads were widespread and varied, with railroads reporting strong growth in intermodal cargo, automobiles, industrial materials and consumer goods, all signs of a broadly growing economic base. Railroads also benefited from dramatically increased shipments of crude oil, chemicals, and fracking sand made possible by the same shale energy boom that's hurt coal volumes.

The party kicked off with the East Coast's largest railroad, when CSX announced an earnings beat thanks largely to intermodal carloads and fracking-related shipments more than making up for declining coal. Union Pacific kept the good news coming, with significant increases in cars and industrial goods like cement, steel, and finished machines.

Norfolk Southern is the second-largest railroad on the East Coast, meaning that it, like CSX, has historically been highly geared to Appalachian coal shipments. Norfolk overcame its own coal deficit primarily with nearly 7% growth in intermodal shipments, 9% growth in metals and construction materials, and 14% growth in chemicals, again driven by shipments of crude oil from new shale production fields to East Coast refineries. Despite a 2% decline in coal, total unit volumes grew by 4%. Total earnings for the third quarter grew 20% on the back of these results.

Canadian National never had a very high exposure to coal, so when its coal shipments fell 1% it barely made a dent in earnings, which grew 13%. Canadian National's network, which uniquely hits the West Coast, East Coast, and Gulf Coast in a "T" pattern stretching across the continent, was bolstered by shipments of chemicals like crude oil, intermodal cargo, and metals and minerals. Overall, Canadian National's carloads increased 2.7%. Thanks to better pricing and longer-distance contracts, revenue grew 8%.

Canadian Pacific is one of the smaller Class I railroads in the U.S., but it has significant trackage in North America's shale oil production plays. Unlike most railroads, Canadian Pacific actually saw intermodal carloads fall. Coal carloads fell as well, but better pricing allowed coal revenue to actually tick up 5%. Canadian Pacific saw more significant increases in both carloads and revenue from industrial and consumer products, fertilizers, and grain.

All together, the railroads are painting a picture of strengthening demand for a wide range of products and commodities that point to an expanding economy. Demand for rail transportation is what's considered a derived demand: There will be greater demand for rail transportation when manufacturers and producers need more raw materials, and when end consumers need more finished goods. As Warren Buffett knows well, rail carloads are a good indicator of the health of the tangible economy. Despite a weakening environment for coal, North American railroads are doing rather well. That means they have demand from manufacturers to create new products, demand from ports to ship out new exports and deliver new imports, and demand from consumers for finished goods. Railroad investors should be pleased, of course. But anyone hoping for a sustained American economic recovery should be pleased as well.