There's no comeback story in retail quite like Best Buy's (NYSE:BBY). The stock has surged by more than a factor of five since bottoming out at the beginning of 2013. The consumer-electronics giant has slashed costs, made major investments in the online business that have paid off, and shown improvement in comparable sales growth. As a result, profits have soared, and the stock price has followed suit.

With shares of Best Buy now sitting right around their all-time high, the stock isn't nearly as cheap as it was a few years ago. But that doesn't mean it's still not worthy of your investment dollars. Here are two reasons why investors should consider putting Best Buy in their portfolios.

The front of a Best Buy store, with shoppers lined up near the entrance.

Image source: Best Buy.

Solid comparable sales growth

In the most recent quarter, Best Buy managed comparable sales growth of 4.4% -- despite a difficult retail environment and intense competition from Amazon and discounters like Wal-Mart. Remarkably, Best Buy achieved this feat without sacrificing profitability. In fact, adjusted operating margin jumped 20 basis points year over year, and adjusted earnings per share soared 30%.

It hasn't been completely smooth sailing for Best Buy over the past few years. Comparable sales dipped a few times here and there, most notably during the holiday quarter last year. But overall, the trend is in the right direction.

A chart showing Best Buy's comparable sales growth by quarter.

Data source: Best Buy. Chart by author.

Best Buy laid out its long-term financial targets in September, and while the company left out expectations for comparable sales growth, it did discuss revenue. Best Buy sees total revenue growing to $43 billion by fiscal 2021, up from $39.4 billion in fiscal 2017.

That growth will be driven by an expansion in the company's product offerings. Best Buy is betting on the smart-home market, pushing not only products but also solutions and services. It's enhancing the smart-home areas in all its stores, and it plans to add 1,500 dedicated smart-home employees. While Best Buy has cut costs throughout its turnaround, it hasn't skimped on customer-facing labor. Face-to-face customer service is a key competitive advantage over its online competition.

Comparable sales growth is unlikely to remain in the mid-single digits over the next few years: By expanding its offerings and selling more services, Best Buy should be able to keep the numbers moving higher.

Soaring earnings

Producing mostly consistent comparable sales growth is a feat unto itself, but combining that with earnings growth by resisting the temptation to drive sales via promotional activity and discounting is even more impressive. Best Buy has removed $1.4 billion of costs over the past five years, and it expects to remove another $600 million of costs by fiscal 2021. These cost cuts have allowed Best Buy to compete on price while maintaining acceptable margins.

Here's how Best Buy's adjusted earnings per share have grown over the past five years:

A chart showing Best Buy's non-GAAP earnings per share by year.

*Value for fiscal 2018 is average analyst estimate. Data source: Best Buy. Chart by author. 

Best Buy doesn't expect this earnings growth to stop. The company sees adjusted EPS growing at a compound annual rate of 8% to 9% through fiscal 2021, reaching a range of $4.75 to $5 in that year. Best Buy's current stock price is about 13 times the high end of that range.

That earnings target may not include the effect of a corporate tax cut, which looks increasingly likely as Congress hustles to get a tax bill passed this year. Best Buy's effective tax rate in fiscal 2017 was 33.5%. Of course, until a tax overhaul passes, it's not clear exactly how Best Buy will be affected. But the company's long-term targets may need to be adjusted upward.

Not a bargain, but not a bad idea

Based on the average analyst estimate for earnings this year, Best Buy stock trades for about 16 times earnings. That's not particularly cheap, especially for a retailer. But given Best Buy's performance over the past five years, returning to robust comparable sales growth and consistently growing earnings, it's not an unreasonable price to pay.

There are plenty of retailer stocks trading at far lower valuations. But those seemingly cheap prices come with deep problems that Best Buy doesn't share. I called Best Buy one of the top retail stocks to buy in 2017 back in March, and it hasn't disappointed: The stock has soared 43% since. I doubt we'll see a repeat in 2018, but if you want to own a solid retailer adapting successfully to the age of e-commerce, Best Buy is a good option.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.