Occidental Petroleum (NYSE: OXY) reported earnings on July 30. Here are the numbers you need to know.

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

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

Gross margins dropped, operating margins grew, net margins contracted.

Revenue details
Occidental Petroleum logged revenue of $5.96 billion. The five analysts polled by S&P Capital IQ expected a top line of $5.88 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 $1.58. The 20 earnings estimates compiled by S&P Capital IQ averaged $1.61 per share. Non-GAAP EPS of $1.58 for Q2 were 3.7% lower than the prior-year quarter's $1.64 per share. GAAP EPS of $1.63 for Q2 were 0.6% lower than the prior-year quarter's $1.64 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.6%, 630 basis points worse than the prior-year quarter. Operating margin was 40.6%, 400 basis points better than the prior-year quarter. Net margin was 22.2%, 80 basis points worse than the prior-year quarter. (Margins calculated in GAAP terms.)

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

Next year's average estimate for revenue is $24.75 billion. The average EPS estimate is $7.13.

Investor sentiment
The stock has a four-star rating (out of five) at Motley Fool CAPS, with 1,364 members out of 1,409 rating the stock outperform, and 45 members rating it underperform. Among 267 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 257 give Occidental Petroleum a green thumbs-up, and 10 give it a red thumbs-down.

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

Is Occidental Petroleum 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.