Source: Norfolk Southern.

Shares of railroad giant Norfolk Southern (NYSE:NSC) have performed extremely well lately, climbing toward all-time record highs as investors get more confident about the railroad industry's future. In particular, even though Norfolk Southern has more exposure to some of the toughest segments in the railroad sector than peers like Union Pacific (NYSE:UNP), its most recent earnings report showed just how well the company is adapting to changing conditions.

A quarter full of records for Norfolk Southern

Norfolk Southern's second-quarter results read like a page from the record books, as the railroad managed to set new high-water marks in a number of key measures of its financial performance. Operating revenues from its railways climbed 9% to $3 billion, and operating income jumped 22% to climb above the $1 billion mark. That sent net income to a new record of $562 million, or $1.79 per share, easily eclipsing the $1.46 per share that the company posted in the year-ago quarter.

Norfolk Southern's strength came from all quarters. The railroad's metals and construction segment showed the fastest sales growth rate at 17%, but the 11% jump in intermodal revenue and even a rise of 7% in the long-struggling coal segment pointed to the breadth of the company's rebound.

Source: Norfolk Southern.

But even more encouraging for Norfolk Southern were signs that it is becoming more efficient in its operations. The railroad's operating ratio fell to 66.5%, which was not only a record but was five full percentage points lower than it was this time last year. Given the importance of keeping operating expenses as low as possible, the achievement shows how much progress Norfolk Southern has made in maximizing its profit opportunity. As CEO Wick Moorman said, "We see continued strength across most of our business segments and are optimistic that overall economic conditions will drive growth."

How Norfolk Southern can keep steaming ahead

The broader challenge Norfolk Southern and regional peer CSX (NASDAQ:CSX) have faced involves more than a quarter's worth of results, though. Railroads have had to deal with the waning influence of coal, which historically has been a key driver of the entire industry's profitability. In particular, because of the proximity of Norfolk Southern's rail network to the coal-rich eastern U.S., the railroad has been under threat from long-term trends suggesting potential declines in coal production and shipment volume. The second quarter's bounce in coal-related revenue and shipments came largely from utilities replenishing depleted inventories of coal for use in power-generation plants, but export volumes fell, and most experts expect environmental constraints and continued plentiful supplies of cleaner-burning natural gas to eat into coal demand for the foreseeable future.

Oil tankers have become a key part of railroad shipping. Image source: Flickr/Roy Luck.

What's important, therefore, is for Norfolk Southern to come up with strategies to replace coal shipments in the long run. So far, Norfolk Southern has done a good job tapping into increased demand from the oil and gas industry, and during the second quarter, shipments of chemicals climbed by 10% from the year-ago quarter. Railroads have profited from shipping fracking sand and production-enhancing chemicals to oil and gas shale regions, and then transporting crude oil from those production areas on the return trip. Because of its western geographical exposure, Union Pacific typically gets more credit for its work to capture oil and gas revenue, but Norfolk Southern and other railroads can count on continuing to get their share of business as long as the domestic energy boom lasts.

What's next for Norfolk Southern?

Currently, investors have high hopes for Norfolk Southern for the foreseeable future, believing that 10%-11% earnings growth in 2014 will accelerate to 13% higher earnings by next year. As competition gets fiercer, Norfolk Southern will have to work harder to fend off CSX, Union Pacific, and other major carriers in North America. In the long run, though, Norfolk Southern has demonstrated the ability to think past its areas of historical business strength to consider how it can prosper in the future, and that should bode well for the stock over time.