Union Pacific's results offer insight into the nation's economic health because of the variety of cars, crops, chemicals and containers of imported goods it carries. It has more than 32,400 miles of track in 23 states in the West, Midwest and Gulf coast.

The decline in coal is a concern for railroad investors. Coal demand has been weak in the past year because of relatively cheap natural gas prices and last year's mild winter. In the fourth quarter, Union Pacific hauled 17 percent less coal than the year before. Agricultural shipments were hurt by a drought and the temporary shutdown of some ethanol plants.

Chief Financial Officer Rob Knight predicted coal volumes will likely decline slightly in 2013, partly because at the start of the year the railroad lost a contract to haul 10 million tons of it.

But Knight said growth in other areas, especially crude oil hauled from areas like the Bakken Shale in North Dakota, will help the railroad.

"We're winning in terms of leveraging our network to serve these new markets," Knight said.

Eric Butler, Union Pacific's vice president of marketing, said shipments of crude oil are expected to continue growing in 2013, although not quite as much as last year.

"Crude oil will be one of the strongest parts of our business," Butler said.

The growth in automotive shipping, particularly from Mexico, and intermodal shipping, in which the railroad moves containers taken off ships and trucks, should also help Union Pacific.

Citi Research analyst Christian Wetherbee said in a research note said the long-term outlook for Union Pacific appears bright even if the fourth-quarter was helped by several unusual items. Wetherbee said UP benefited from a lower tax rate, lower interest expenses and higher-than-normal income outside of its main segments.

Wetherbee said even though UP lost one coal contract, it was able to re-price several other long-term coal contracts at significantly higher prices, which should boost earnings this year.

And Knight said if the economy continues growing this year, the railroad could see a small increase in total volume in 2013.

For all of last year Union Pacific's net income surged 20 percent to $3.94 billion, or $8.27 per share, on revenue of $20.93 billion. That's up from 2011's $3.29 billion, or $6.72 per share, on revenue of $19.56 billion.