Union Pacific (NYSE: UNP) reported earnings on July 18. 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 met expectations on earnings per share.

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

Margins grew across the board.

Revenue details
Union Pacific chalked up revenue of $5.47 billion. The 18 analysts polled by S&P Capital IQ wanted to see a top line of $5.50 billion on the same basis. GAAP reported sales were the same as the prior-year quarter's.

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.37. The 27 earnings estimates compiled by S&P Capital IQ predicted $2.35 per share. GAAP EPS of $2.37 for Q2 were 13% higher than the prior-year quarter's $2.10 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 68.0%, much better than the prior-year quarter. Operating margin was 34.3%, 130 basis points better than the prior-year quarter. Net margin was 20.2%, 100 basis points better than the prior-year quarter. (Margins calculated in GAAP terms.)

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

Next year's average estimate for revenue is $22.25 billion. The average EPS estimate is $9.52.

Investor sentiment
The stock has a four-star rating (out of five) at Motley Fool CAPS, with 1,332 members out of 1,386 rating the stock outperform, and 54 members rating it underperform. Among 368 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 359 give Union Pacific a green thumbs-up, and nine 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 $161.72.

If you're interested in transportation companies like Union Pacific, then you should check out our special report that features 3 companies who depend on, and invest in, that industry. Learn the basic financial habits of millionaires next door and get these 3 focused stock ideas in our free report, "3 Stocks That Will Help You Retire Rich." Click here for instant access to this free report.