Union Pacific Corp reported a bigger quarterly profit on Thursday as the railroad raised prices and saw demand grow in overall shipments, sending shares up almost 4 percent.

Union Pacific, which describes itself as North America’s premier railroad franchise, earned $1.2 billion, or $2.55 a share, in the fourth quarter of 2013, compared with $1 billion, or $2.19 a share, a year earlier.

Analyst Justin Yagerman of Deutsche Bank said most of the railroad’s strong numbers were driven by pricing. Core pricing at the company rose 3.5 percent over last year.

Railroads are key indicators of the health of an economy because of the variety of goods they transport. Union Pacific Railroad connects 23 states in the western two-thirds of the country by rail.

Chief Executive John Koraleski said in an interview that the economy was growing at a strong, steady rate, and the momentum was continuing into 2014.

“Thing I’m most excited about is the industrial sector,” he said.

Koraleski said that in the fourth quarter besides automobiles, shipments of frack sand, metals and lumber had risen.

“When you put that into perspective: automobiles, lumber, metals, you are talking about some of the fundamental building blocks of the U.S economy,” the CEO said.

Like others in the industry, Union Pacific has been hit by a weakening demand for coal, but it took advantage of a rise in demand for agricultural goods, autos and other industrial shipments.

The company’s revenue from transporting agricultural goods surged 19 percent in the quarter, followed by automotives with growth of 17 percent. Only coal revenue fell, by one percent. Coal is the company’s biggest cargo.

Overall revenue was $5.6 billion, compared with $5.25 billion in the fourth quarter of 2012.

Rival Norfolk Southern Corp reported a 24 percent increase in fourth-quarter earnings on Wednesday, beating analysts’ expectations, as strong chemicals, construction materials and auto shipments offset a dip in coal volumes.

Shares of the Omaha, Nebraska-based company were up 3.5 percent at $174.32 Thursday on the New York Stock Exchange. They had earlier touched a high of $174.80, their best level in a decade.