Best Buy's (NYSE: BBY) second-quarter earnings left many investors in the mood to buy its shares today.

The electronics giant reported that net income increased 60.8%, to $254 million, or $0.60 per share. Gross margin increased to 25.7% of sales from 24.4% this time last year, demonstrating the company's pricing power. Investors should also note that a less onerous tax rate helped boost Best Buy's earnings. Revenue increased 3%, to $11.3 billion.

Best Buy's silver linings do come with a few clouds, though. Take Best Buy's same-store sales. Overall comps slipped 0.1%, which was attributed to a decline in customer traffic here in the U.S., although an increase in average ticket partially offset that weakness. On a more cheerful note, Best Buy's international comps continue to rock, with a 4% increase in that segment's comps, including a 20% surge in China.

While Best Buy has been able to boost domestic market-share gains lately, this quarter it reported a 50-basis-point drop in that metric. "Constrained inventory" during the initial launch of Apple's (Nasdaq: AAPL) hot iPad product was one of the reasons the retailer lost traffic. Best Buy said it still expects to increase market share for the year, though.

Back to the good news: Best Buy increased its annual earnings guidance by $0.10 per share, to $3.55-$3.70 per share, and anticipates a 5% increase in revenue and 1% to 2% increase in same-store sales.

The outlook for consumer spending remains sketchy, but Best Buy competes admirably with gigantic rivals like Wal-Mart (NYSE: WMT) and Target (NYSE: TGT), as well as smaller ones like Conns (Nasdaq: CONN) and hhgregg (NYSE: HGG). (I recently took a close look at Conn's, and discovered that Best Buy's a better stock deal.) Consumers may be skittish, but that doesn't mean they won't still covet hot products like the iPad and's (Nasdaq: AMZN) Kindle, which is slated for distribution through Best Buy stores. That gadget mania is a positive force for Best Buy.

Best Buy's quarterly results drove investor euphoria today, which is quite a reversal from the reaction to its results last quarter. Long-term investors should feel gratified to have this stock in their portfolios, regardless of quarter-by-quarter fluctuations in sentiment. Given its leadership in its retail niche, and the fact that it's trading at just 10 times this year's earnings (even cheaper than stocks like Wal-Mart and Target), Best Buy's still a good long-term buy for investors.