Marathon Petroleum (NYSE: MPC) reported earnings on July 31. Here are the numbers you need to know.

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

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

Gross margins increased, operating margins dropped, net margins shrank.

Revenue details
Marathon Petroleum reported revenue of $20.26 billion. The four analysts polled by S&P Capital IQ predicted revenue of $19.27 billion on the same basis. GAAP reported sales were 3.9% higher than the prior-year quarter's $19.50 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.53. The 14 earnings estimates compiled by S&P Capital IQ averaged $2.46 per share. GAAP EPS of $2.38 for Q2 were 6.2% higher than the prior-year quarter's $2.24 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 9.8%, 20 basis points better than the prior-year quarter. Operating margin was 6.5%, 20 basis points worse than the prior-year quarter. Net margin was 4.0%, 10 basis points worse than the prior-year quarter.

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

Next year's average estimate for revenue is $76.53 billion. The average EPS estimate is $7.10.

Investor sentiment
The stock has a five-star rating (out of five) at Motley Fool CAPS, with 106 members out of 109 rating the stock outperform, and three members rating it underperform. Among 20 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 19 give Marathon Petroleum a green thumbs-up, and one give it a red thumbs-down.

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