CSX Corp (CSX) posted a smaller fourth-quarter profit that missed Wall Street estimates, as coal volumes stayed weak, and its shares fell 3 percent.

Coal shipments have been a problem for CSX and its competitor Norfolk Southern as the shift to natural gas caused utility coal stockpiles to surge as demand for coal from power producers declined.

CSX has higher exposure to coal than its peers, reflecting the railroad's geography, which includes the U.S. Appalachian coal basin. Though inventory levels have been decreasing, analysts had said companies would be unlikely to see any positive effect in the fourth quarter.

About a quarter of the company's revenue comes from coal. For the fourth quarter ended Dec. 27, coal volumes for CSX fell five percent. Revenue from coal fell 9 percent in the quarter.

Intermodal and chemical shipments were important factors contributing to CSX's growth in revenue and volumes for most of 2013. For the latest quarter, intermodal revenue rose 10 percent, while chemicals rose 17.

CSX said in a statement announcing its financial results that it earned $426 million, or 42 cents a share, in the quarter, compared with $449 million, or 44 cents, a year ago. Last year, CSX was helped by a tax gain on real estate that added 6 cents a share to its quarterly earnings.

Analysts, on average, had been expecting the company to earn 44 cents a share, on revenue of $3.01 billion, according to Thomson Reuters I/B/E/S.

Overall revenue increased 5 percent to $3.0 billion.

Volumes of all shipments rose 6 percent.

Chief Executive Michael Ward said in the statement that CSX was on track to benefit from an expanding U.S. economy.

The company said it was on target to keep a high-60s operating ratio by 2015.

CSX, based in Jacksonville, Florida, is the first of the major U.S. railroads to report quarterly results.

Shares of the railroad, which CSX have risen almost 40 percent over the year and touched a 10 year high of $29.25 on Wednesday, while the benchmark S&P 500 rose 12 percent.

CSX shares were trading at $28.31 after hours after closing at $29.23 on the New York Stock Exchange.