The Jacksonville, Florida-based company said Tuesday it earned $507 million, or 52 cents per share. That's roughly in line with last year's $509 million, or 51 cents per share.

The railroad's profit exceeded the 50 cents per share analysts surveyed by Zacks Investment Research, but its $2.94 billion revenue fell short of the $3.04 billion revenue Wall Street expected.

CSX affirmed its prediction for 2015 profit growth in the mid-single digits despite the ongoing coal weakness and the overall decline in volume.

The railroad's stock gained 1 percent in after-hours trading to sell for $28.

CSX Chairman and CEO Michael Ward said the railroad worked to worked to control costs and improve service while dealing with market challenges.

"Commodity prices and the strength of the U.S. dollar are challenging many of our markets," Ward said.

Coal revenue fell 19 percent in the quarter to $583 million because demand from U.S. utilities and export markets was weaker than expected.

The stronger U.S. dollar and economic problems elsewhere have hurt coal exports. Domestic coal demand has shrunk over the past several years because low natural gas prices and concerns about pollution regulations prompted many utilities to switch from coal to gas.

Edward Jones analyst Logan Purk said most of the factors hurting CSX's results are out of the railroad's control, such as the health of the economy, natural gas prices and weather.

"The two items that CSX can really control — pricing and efficiency — they're hitting it out of the park," Purk said.

The railroad cut its expenses 11 percent to just over $2 billion because of lower fuel prices, lower costs related to shipping volume and improved efficiency.

CSX operates more than 21,000 miles of track in 23 Eastern states and two Canadian provinces.

CSX shares have fallen 23 percent since the beginning of the year, while the Standard & Poor's 500 index has declined roughly 3 percent.

_____

Elements of this story were generated by Automated Insights (http://automatedinsights.com/ap) using data from Zacks Investment Research. Access a Zacks stock report on CSX at http://www.zacks.com/ap/CSX