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

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

Compared to the prior-year quarter, revenue expanded significantly. Non-GAAP earnings per share grew significantly. GAAP earnings per share dropped to zero.

Margins contracted across the board.

Revenue details
ONEOK reported revenue of $3.35 billion. The four analysts polled by S&P Capital IQ predicted sales of $3.27 billion on the same basis. GAAP reported sales were 32% higher than the prior-year quarter's $2.53 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.34. The 10 earnings estimates compiled by S&P Capital IQ predicted $0.29 per share. Non-GAAP EPS of $0.34 for Q2 were 17% higher than the prior-year quarter's $0.29 per share. GAAP EPS contracted to zero from the prior-year quarter's $0.29.

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 7.5%, 610 basis points worse than the prior-year quarter. Operating margin was 3.8%, 540 basis points worse than the prior-year quarter. Net margin was 0.0%, 240 basis points worse than the prior-year quarter. (Margins calculated in GAAP terms.)

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

Next year's average estimate for revenue is $15.92 billion. The average EPS estimate is $1.65.

Investor sentiment
The stock has a five-star rating (out of five) at Motley Fool CAPS, with 432 members out of 446 rating the stock outperform, and 14 members rating it underperform. Among 151 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 147 give ONEOK a green thumbs-up, and four give it a red thumbs-down.

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

Can your portfolio provide you with enough income to last through retirement? You'll need more than ONEOK. 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.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.