The Pennsylvania-based company reported third quarter of $2.22 billion, a 4% year-over-year increase, with net income of $447.3 million, or $1.86 per share.
Analysts were expecting revenue of $2.18 billion with earnings of $1.74 per share.
Hershey shares rose 2.3% to $148.00 pre-market Friday.
"Our core U.S. business remains healthy as consumers reach for small treats during the pandemic, and our decision to lean into Halloween ahead of the season supported consumers' desire to find new and creative ways to celebrate safely," said CEO Michele Buck in a statement.
The company's operating profit of $611.4 million increased 32.7% year-over-year, resulting in a profit margin of 27.5%, an increase of 5.9 percentage points.
The company's North America segment saw business increase 6.3% year-over-year, while its international segment decreased 14.4% over the same period.
Hershey reinstated its full-year guidance after withdrawing it in April due to uncertainty surrounding the coronavirus pandemic. The company said it expects an annual revenue increase of 1% year-over-year, which includes a 2% decline in its international segment due to the pandemic.
Earnings for the year are expected to range between $6.18 and $6.24 per share. Analysts are expecting earnings of $6.03 per share for the year.
"We are continuing to focus on executing with excellence, investing in the business, and advancing our strategic priorities to deliver a strong fourth quarter and position us well for 2021," Buck said.
Separately, Hershey declared a quarterly dividend of 80 cents per share on common stock, and a quarterly dividend of 73 cents per share on Class B shares payable Dec. 15 to shareholders of record on Nov. 20.
This is the 145th consecutive regular dividend for the company's Class B stock.