Hershey (NYSE: HSY) reported earnings on Jan. 31. Here are the numbers you need to know.

The 10-second takeaway
For the quarter ended Dec. 31 (Q4), Hershey beat expectations on revenues and missed estimates on earnings per share.

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

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

Revenue details
Hershey chalked up revenue of $1.75 billion. The 12 analysts polled by S&P Capital IQ looked for a top line of $1.71 billion on the same basis. GAAP reported sales were 12% higher than the prior-year quarter's $1.57 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 $0.74. The 17 earnings estimates compiled by S&P Capital IQ forecast $0.76 per share. GAAP EPS of $0.66 for Q4 were 6.5% higher than the prior-year quarter's $0.62 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 43.1%, 140 basis points better than the prior-year quarter. Operating margin was 15.4%, 100 basis points worse than the prior-year quarter. Net margin was 8.6%, 50 basis points worse than the prior-year quarter.

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

Next year's average estimate for revenue is $6.99 billion. The average EPS estimate is $3.60.

Investor sentiment
The stock has a three-star rating (out of five) at Motley Fool CAPS, with 527 members out of 634 rating the stock outperform, and 107 members rating it underperform. Among 197 CAPS All-Star picks (recommendations by the highest-ranked CAPS members), 174 give Hershey a green thumbs-up, and 23 give it a red thumbs-down.

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

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