Stocks logged slight gains on Tuesday, with both the Dow Jones Industrial Average (^DJI 0.56%) and the S&P 500 (^GSPC -0.88%) indexes rising by less than half of a percentage point.

Today's stock market:

Index

Percentage Change

Point Change

Dow

0.10%

18

S&P 500

0.20%

4

Data source: Yahoo! Finance.

In economic news, home sales grew at a surprisingly strong pace last month, according to fresh government data. Sales of newly constructed residences jumped 12% to reach an eight-year high annual rate of 654,000, soundly passing consensus estimates.

Annual pace of new home sales. Image source: Federal Reserve Economic Data.

Meanwhile, earnings season sent several individual stocks on the move Tuesday, including Best Buy (BBY 0.20%) and J.M. Smucker (SJM 3.29%).

Best Buy sees growth ahead

Best Buy shares soared 18% after quarterly results blew past consensus estimates. Sales were flat at $8.5 billion, but still beat management's guidance that projected a drop to $8.4 billion. Earnings also trounced the forecast, weighing in at $0.57 per share compared to the $0.40 per share that CEO Hubert Joly and his executive team targeted back in May. "We are encouraged by the quality of our execution, the momentum in our business, and the strength of our first-half financial results," Joly said in a press release on Tuesday.

Image source: Best Buy.

The positive results were powered by an uptick in customer traffic as the retailer logged 1% growth in comparable-store sales, reversing a slight decline in the prior quarter. Best Buy said that gains in the wearable tech, home theater, and appliances divisions more than offset weakness in mobile phone and gaming device sales. The online business gained market share with its 24% sales spike.

The numbers make it clear that the retailer isn't quite on firm footing yet. Gross profit margin fell by a percentage point to 24% of sales, for example, and most of the consumer electronics industry shrunk by 3%. Gaming and mobile phones, meanwhile, had an even weaker performance.

Still, the company sees a return to overall sales growth beginning next quarter, when revenue should tick higher following nearly three years of declines. The positive turning point gave investors a good reason to send Best Buy shares higher.

J.M. Smucker's pet food struggles

J.M. Smucker's stock took a step back from the record highs it reached this week after fiscal Q1 results failed to impress Wall Street. Earnings spiked higher by 28% to $1.28 per share -- and, in fact, beat management's target -- but sales growth trends were just below expectations, thanks to underperformance from the recently acquired pet food division.

That segment shrunk by 6% on lower volume, especially in the Kibbles n' Bits and Meow Mix brands. Smucker's coffee business, meanwhile, slowed down from its epic growth pace as sales declined by 9%. Most of that drop can be tied to falling prices that track the drop in coffee bean costs, but Dunkin Donuts K-cup pods also endured weaker demand during the quarter.

Image source: Getty Images.

Management said it's confident Smucker will hit its full-year earnings target even though sales growth will be harder to find. To that end, executives now say they see revenue declining by 1%, compared to the flat result they projected three months ago. Smucker still targets producing as much as $7.75 per share in profit and $1 billion of free cash flow in fiscal 2017.