BATTLE CREEK, MICH. — Shares of Kellogg Co. surged as much as 10% in mid-morning trading on the New York Stock Exchange Aug. 1 after the company’s net sales and earnings per share beat analysts’ expectations behind stronger underlying sales.

Net income attributable to Kellogg Co. in the second quarter ended June 29 totaled $286 million, equal to 84c per share on the common stock, down sharply from $596 million, or $1.72 per share, in the year-ago period.

The decline in earnings was driven by higher input costs and effective tax rate.

Reported operating profit decreased by 16% versus the year-ago period due to restructuring and business and portfolio realignment charges related to the recently completed divestiture of the cookie, pie crust, ice cream cone and fruit snack businesses to the Ferrero Group in a transaction valued at $1.3 billion.

Kellogg’s net sales in the quarter increased 3% to $3,461 million from $3,360 million. On a currency-neutral basis, organic net sales growth was more than 2%.

Momentum in several revitalized snack brands, continued growth in emerging markets and improved price realization contributed to growth.

“It’s not just that this is our best organic growth since 2016 or even since 2012, if you exclude the inflationary benefits of Venezuela in the prior years,” Steven A. Cahillane, chairman, chief executive officer and president of Kellogg Co., said during an Aug. 1 earnings call. “It’s the fact that this growth was broad-based with all four regions in growth. It’s the fact that our enhanced capabilities and revenue growth management are yielding improved price realization in a year of notably high cost inflation. It’s the fact that our innovation launches are off to a great start, and it’s the fact that we are holding or gaining share in more categories than before.

“And what may be a surprise to many of you is the fact that we can post this kind of growth for the total portfolio even in the quarter when our closely watched U.S. Cereal business declined meaningfully amidst a pack-size harmonization.”

Kellogg North America’s operating profit in the second quarter declined by 17% due to business realignment charges, higher input costs and lower cereal sales volume. Segment net sales in the quarter increased 1% behind continued momentum in key brands, including Pringles, Cheez-It, Rice Krispies Treats, Pop-Tarts and RXBAR.

“We had another strong quarter of consumption growth in key U.S. Snacks categories,” Mr. Cahillane said.

New snack platforms such as Cheez-It Snap’d, Pringles Wavy and Pop-Tarts Bites, as well as expanded on-the-go offerings, helped drive double-digit consumption growth across Kellogg’s biggest snack brands. RXBAR returned to strong double-digit consumption growth behind restored distribution following a recall in December.

“Our improved innovation pipeline is bearing fruit,” Mr. Cahillane said. “Our net sales from newly launched products in 2019 will be the highest in at least four years.”

An increase in frozen foods net sales was fueled by innovation and effective marketing for MorningStar Farms and Eggo brands.

The decline in U.S. cereal sales was driven by reduced promotional activity during company efforts to harmonize pack sizes across the portfolio.

“The good news is that this is now behind us,” Mr. Cahillane said. “As we get into the second half, we have a return to more normal brand building and in-store promotional activity, and we like our plans. Frosted Flakes gets a new media campaign, as does Special K. Honey Smacks relaunches with new food, and new Pop-Tarts Cereal gets expanded distribution. And we are relaunching Kashi Go and continuing to support Raisin Bran. So we expect to see the declines in net sales moderate for North America cereal in the second half.”

Kellogg Europe operating profit decreased by 58% due to business realignment charges. On a currency-neutral basis, net sales increased 2%. In Kellogg Latin America, operating profit declined 13%, and currency-neutral net sales increased 2%. Kellogg Asia, Middle East and Africa operating profit increased 16%, and organic, currency-neutral sales increased 9%.

For the full year, Kellogg Co. continues to expect net sales growth in a range of 1% to 2% on a currency-neutral and organic basis. Currency-neutral adjusted operating profit is expected to decline by 4% to 5%, and currency-neutral adjusted earnings per share are expected to decline by 10% to 11%.

Year-to-date net income attributable to Kellogg Co. was $568 million, equal to $1.66 per share on the common stock, down from $1,040 million, or $3.00 per share, in the comparable period. Net sales increased to $6,983 million from $6,761 million.

Proceeds from the recently completed sale of the cookies, pie crusts, ice cream cones and fruit snacks businesses will be used to reduce debt, the company said.