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

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

Compared to the prior-year quarter, revenue dropped. Non-GAAP earnings per share contracted. GAAP earnings per share didn't move.

Margins grew across the board.

Revenue details
Williams Companies booked revenue of $1.77 billion. The five analysts polled by S&P Capital IQ hoped for a top line of $2.14 billion on the same basis. GAAP reported sales were 4.3% lower than the prior-year quarter's $1.85 billion.

Source: S&P Capital IQ. Quarterly periods. Dollar amounts in millions. Non-GAAP figures are normalized by S&P Capital IQ and may vary to maintain comparability with normalized estimates.

EPS details
EPS came in at $0.19. The 14 earnings estimates compiled by S&P Capital IQ forecast $0.15 per share. Non-GAAP EPS of $0.19 for Q2 were 14% lower than the prior-year quarter's $0.22 per share. GAAP EPS of $0.21 were the same as the prior-year quarter.

Source: S&P Capital IQ. Quarterly periods. Non-GAAP figures are normalized by S&P Capital IQ and may vary to maintain comparability with normalized estimates.

Margin details
For the quarter, gross margin was 38.2%, much better than the prior-year quarter. Operating margin was 20.0%, 110 basis points better than the prior-year quarter. Net margin was 8.0%, 80 basis points better than the prior-year quarter. (Margins calculated in GAAP terms.)

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

Next year's average estimate for revenue is $8.31 billion. The average EPS estimate is $0.69.

Investor sentiment
The stock has a three-star rating (out of five) at Motley Fool CAPS, with 522 members out of 545 rating the stock outperform, and 23 members rating it underperform. Among 116 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 109 give Williams Companies a green thumbs-up, and seven give it a red thumbs-down.

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

Is Williams Companies 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.