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

The 10-second takeaway
For the quarter ended June 30 (Q2), BP beat expectations on revenue and whiffed on earnings per share.

Compared to the prior-year quarter, revenue dropped and GAAP earnings per share contracted to a loss.

Margins shrank across the board.

Revenue details
BP reported revenue of $93.34 billion. The three analysts polled by S&P Capital IQ predicted net sales of $83.69 billion on the same basis. GAAP reported sales were 7.9% lower than the prior-year quarter's $101.36 billion.

My

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 $1.16. The 10 earnings estimates compiled by S&P Capital IQ averaged $1.51 per share. GAAP EPS were -$0.07 for Q2 versus $0.30 per share for the prior-year quarter.

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 8.7%, 560 basis points worse than the prior-year quarter. Operating margin was 1.8%, 600 basis points worse than the prior-year quarter. Net margin was -1.5%, 710 basis points worse than the prior-year quarter.

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

Next year's average estimate for revenue is $364.23 billion. The average EPS estimate is $5.59.

Investor sentiment
The stock has a four-star rating (out of five) at Motley Fool CAPS, with 4,933 members out of 5,260 rating the stock outperform, and 327 members rating it underperform. Among 1,049 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 996 give BP a green thumbs-up, and 53 give it a red thumbs-down.

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

Is BP the right energy stock for you? Read about a handful of timely, profit-producing plays on expensive crude in "3 Stocks for $100 Oil." Click here for instant access to this free report.