Union Pacific (NYSE: UNP) reported earnings on July 19. Here are the numbers you need to know.

The 10-second takeaway
For the quarter ended June 30 (Q2), Union Pacific met expectations on revenues and beat expectations on earnings per share.

Compared to the prior-year quarter, revenue grew and GAAP earnings per share increased significantly.

Margins improved across the board.

Revenue details
Union Pacific recorded revenue of $5.22 billion. The 19 analysts polled by S&P Capital IQ predicted a top line of $5.23 billion on the same basis. GAAP reported sales were 7.5% higher than the prior-year quarter's $4.86 billion.

Source: S&P Capital IQ. Quarterly periods. Dollar amounts in millions. Non-GAAP figures may vary to maintain comparability with estimates.

EPS details
EPS came in at $2.10. The 26 earnings estimates compiled by S&P Capital IQ averaged $1.96 per share. GAAP EPS of $2.10 for Q2 were 32% higher than the prior-year quarter's $1.59 per share.

Source: S&P Capital IQ. Quarterly periods. Non-GAAP figures may vary to maintain comparability with estimates.

Margin details
For the quarter, gross margin was 45.0%, 410 basis points better than the prior-year quarter. Operating margin was 33.0%, 430 basis points better than the prior-year quarter. Net margin was 19.2%, 300 basis points better than the prior-year quarter.

Looking ahead
Next quarter's average estimate for revenue is $5.44 billion. On the bottom line, the average EPS estimate is $2.20.

Next year's average estimate for revenue is $21.25 billion. The average EPS estimate is $8.21.

Investor sentiment
The stock has a four-star rating (out of five) at Motley Fool CAPS, with 1,277 members out of 1,324 rating the stock outperform, and 47 members rating it underperform. Among 331 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 323 give Union Pacific a green thumbs-up, and eight give it a red thumbs-down.

Of Wall Street recommendations tracked by S&P Capital IQ, the average opinion on Union Pacific is outperform, with an average price target of $128.96.

Seth Jayson had no position in any company mentioned here at the time of publication. You can view his stock holdings here. He is co-advisor of Motley Fool Hidden Gems, which provides new small-cap ideas every month, backed by a real-money portfolio. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.