The Omaha, Nebraska-based company said Thursday that profit increased to $1.29 billion, or $1.43 per share, in the second quarter. That’s up from $1.11 billion, or $1.18 per share, a year ago. The analysts surveyed by Zacks Investment Research expected profit of $1.42 per share on average.

Union Pacific’s earnings per share were helped by the railroad’s purchase of 8.3 million shares of its own stock for $806 million during the quarter.

The railroad said revenue rose 10 percent to $6.02 billion from $5.47 billion in the same quarter a year earlier, and beat Wall Street forecasts. Analysts expected $5.98 billion, according to Zacks.

Union Pacific shares gained $19.31, or 23 percent, to $102.51 since the beginning of the year, while the Standard & Poor’s 500 index has climbed 7.5 percent.

Union Pacific operates 32,400 miles of track in 23 states from the Midwest to the West and Gulf coasts.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.