CSX (NYSE: CSX) reported earnings on July 16. Here are the numbers you need to know.

The 10-second takeaway
For the quarter ended June 28 (Q2), CSX beat slightly on revenues and beat expectations on earnings per share.

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

Margins grew across the board.

Revenue details
CSX logged revenue of $3.07 billion. The 17 analysts polled by S&P Capital IQ expected revenue of $3.02 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 $0.52. The 28 earnings estimates compiled by S&P Capital IQ predicted $0.47 per share. GAAP EPS of $0.52 for Q2 were 6.1% higher than the prior-year quarter's $0.49 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 40.4%, 40 basis points better than the prior-year quarter. Operating margin was 31.4%, 10 basis points better than the prior-year quarter. Net margin was 17.4%, 40 basis points better than the prior-year quarter. (Margins calculated in GAAP terms.)

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

Next year's average estimate for revenue is $11.89 billion. The average EPS estimate is $1.78.

Investor sentiment
The stock has a five-star rating (out of five) at Motley Fool CAPS, with 2,068 members out of 2,141 rating the stock outperform, and 73 members rating it underperform. Among 449 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 440 give CSX 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 CSX is outperform, with an average price target of $27.04.

If you're interested in transportation companies like CSX, 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.