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

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

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

Margins grew across the board.

Revenue details
CSX recorded revenue of $3.01 billion. The 20 analysts polled by S&P Capital IQ predicted a top line of $3.05 billion on the same basis. GAAP reported sales were 0.2% lower than the prior-year quarter's $3.02 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 $0.49. The 26 earnings estimates compiled by S&P Capital IQ predicted $0.47 per share. GAAP EPS of $0.49 for Q2 were 6.5% higher than the prior-year quarter's $0.46 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.0%, 120 basis points better than the prior-year quarter. Operating margin was 31.3%, 60 basis points better than the prior-year quarter. Net margin was 17.0%, 20 basis points better than the prior-year quarter.

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

Next year's average estimate for revenue is $12.12 billion. The average EPS estimate is $1.83.

Investor sentiment
The stock has a five-star rating (out of five) at Motley Fool CAPS, with 1,965 members out of 2,036 rating the stock outperform, and 71 members rating it underperform. Among 432 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 424 give CSX 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 CSX is outperform, with an average price target of $26.68.

Can your portfolio provide you with enough income to last through retirement? You'll need more than CSX. Learn how to maximize your investment income and "Secure Your Future With 9 Rock-Solid Dividend Stocks." Click here for instant access to this free report.