About a decade ago, Amazon (AMZN -1.14%) was firing on all cylinders as it lured shoppers away from big-box retailers like Best Buy (BBY -0.30%). Amazon's shoppers would often use Best Buy's sprawling stores as showrooms to test out products before buying them online.

In 2012, Best Buy's CEO Brian Dunn resigned due to an inappropriate relationship with an employee, and the company's stock price eventually dropped to about $12 a share. At the time, many investors thought Best Buy was doomed.

But Dunn's successor, Hubert Joly, pulled Best Buy back from the brink by fixing its broken inventory systems, investing in better employee training, expanding its e-commerce services, and embracing its reputation as a showroom by renting out its floor space to top brands.

Boxes of home appliances.

Image source: Getty Images.

Best Buy also matched Amazon's prices, used its brick-and-mortar stores to fulfill online orders, and launched new delivery and in-store pickup options. Joly handed the reins over to Corie Barry in 2019, but the foundations he built saved the retailer. Today, Best Buy's stock trades in the $120s.

Best Buy's stock has rallied 60% over the past 12 months as Amazon's stock advanced about 35%. But can the big box retailer continue to outperform the e-commerce and cloud titan over the long term?

Best Buy continues to expand as other retailers retreat

Best Buy's business has fewer moving parts than Amazon's. Like other big-box retailers, its growth can be tracked by its comparable-store sales, digital growth, new store openings, and operating margins.

Best Buy's revenue rose 8% to $47.3 billion in fiscal 2021, which ended this February. Its total comps increased 9.7%, supported by its whopping 144.4% digital comps growth in the U.S. Its adjusted operating margin expanded from 4.9% to 5.8%, and its adjusted earnings jumped 30%.

Best Buy attributed some of that growth to the pandemic, which fueled stronger sales of PCs and other consumer electronics. It also confidently expanded its domestic store count from 977 to 991 locations, while increasing its international store count (in Canada and Mexico) from 166 to 168 stores.

Wall Street analysts expect Best Buy's revenue and earnings to decline 1% and 8%, respectively, this year against tougher post-pandemic comparisons. However, rising sales of TVs and home appliances, which are supported by higher new home sales, might just help it beat those conservative expectations.

Amazon's core businesses are still firing on all cylinders

Amazon generates most of its revenue from its online marketplaces and related brick-and-mortar retail businesses (such as Whole Foods and Amazon Go), but it generates most of its profits from Amazon Web Services (AWS), the world's largest cloud infrastructure platform.

An Amazon Go store.

Image source: Amazon.

AWS' higher-margin revenue enables Amazon to expand its Prime e-commerce ecosystem with low-margin and loss-leading strategies. Prime, which recently surpassed 200 million members worldwide, provides discounts, free shipping options, streaming media, and other perks within its ever-expanding walled garden. 

Amazon's total revenue increased 38% to $386.1 billion in fiscal 2020, which aligns with the calendar year. Its North American revenue rose 38%, its international revenue grew 40%, and its AWS revenue increased 30%. The robust top-line growth of its three core businesses offset its higher pandemic-related expenses and boosted its net income 84% to $21.3 billion.

Amazon's revenue grew another 44% in the first quarter as its net income more than tripled over its pandemic-stricken profits a year ago. Analysts expect its revenue and earnings to grow 27% and 33%, respectively, for the full year, as its growth decelerates slightly in a post-pandemic market.

The valuations and verdict

Best Buy trades at just 16 times forward earnings and pays a forward dividend yield of 2.2%. That low valuation and decent yield could make it an appealing stock as higher bond yields spark a rotation from growth to value plays.

Amazon trades at 44 times forward earnings and doesn't pay a dividend. But its forward P/E ratio remains reasonable relative to its growth rates, and the symbiotic relationship between AWS and its retail business arguably make it stronger than traditional retailers. That virtuous cycle should continue long after CEO Jeff Bezos steps down later this year.

Therefore, I believe Amazon deserves a higher multiple than Best Buy, which is a solid retail survivor but arguably not as attractive as stronger turnaround plays like Target. Meanwhile, Amazon remains in a class of its own, and should still outperform Best Buy and many other retailers over the long term.