Over the past year, the stock market has become increasingly difficult to navigate as even leading companies have watched their shares tumble amid macroeconomic headwinds. Consider Amazon (AMZN 3.43%) and Netflix (NFLX -0.63%), for example. Despite having considerable market share in their respective industries, both companies have both seen their stocks plunge over 45% year to date.

Thanks to the stock market sell-off, some of the world's most valuable companies are essentially now on sale. Yet, with so many options, it might be challenging to determine the best buys. As market leaders, Amazon and Netflix make great options, so let's take a look at which might be the better buy.

Amazon

Amazon has had a challenging year, to say the least, with its stock falling 48% since January. The COVID-19 pandemic and lockdowns prevalent throughout 2021 boosted earnings as droves of homebound consumers purchased necessities from its e-commerce service. However, revenue comparisons amid 2022's poor economic environment have wreaked havoc on the company's stock.

The good news is that despite a sell-off, temporary market downturns haven't dampened Amazon's long-term outlook. In the third quarter of 2022, revenue rose 14.7% year over year to $127.1 billion. Meanwhile, Amazon's North American segment increased by 20% to $78.8 billion, and its international business decreased by 5% to $27.7 billion. The company took a hit from a strong U.S. dollar; excluding changes in exchange rates, international revenue actually increased by 12%.

In a year plagued by rising inflation and economic declines, the company's continued growth in its e-commerce revenue is impressive. According to Grand View Research, the $9.09 trillion e-commerce industry will expand at a compound annual growth rate (CAGR) of 14.7% through 2027. With Amazon holding a nearly 38% market share, it's in an excellent position to see substantial growth once macroeconomic challenges subside.

The most promising part of Amazon's business is its cloud computing platform, Amazon Web Services. In Q3, sales in this segment increased 27% year over year to $20.5 billion and made up 100% of the company's operating income.

Amazon Web Services boasts a leading 34% market share in cloud computing, with the industry expected to grow at a CAGR of 15.7% until 2030. As a result, Amazon's dominance in the burgeoning industry gives it an excellent long-term outlook.

Netflix

The streaming industry has had a transformative year, with increased competition creating a battleground where the world's biggest entertainment companies are duking it out for subscribers. However, the result hasn't been pretty for Netflix. Its stock has tumbled 46% year to date after substantial subscriber losses in the first half of 2022 spooked investors.

Despite a troubling start to the year, the company's third quarter showed promise. Netflix's revenue increased by 6% to $7.9 billion, with streaming subscriptions rising by 2.4 million to a total of 227.59 million. The quarter signaled a return to subscriber growth and rallied investors as Netflix shares rose 13% from Oct. 18 to Oct. 19.

Moreover, Netflix's decline in memberships earlier in the year prompted it to restructure its business, with a priority on maximizing profits. Over the last year, the company has expanded its gaming efforts with Netflix Games by acquiring multiple studios and partnering with major developers to create mobile versions of popular franchises. And now, it's pondering entering the growing cloud gaming market.

Furthermore, in November, Netflix launched its ad-supported tier, expanding into digital advertising for the first time and providing consumers with a more cost-effective option. The company's recent moves are excellent steps toward diversifying its revenue and offerings, which could pay off big down the road.

Investing in a diverse business with multiple revenue streams from different industries can make for a more reliable investment. Netflix has suffered this year, with the majority of its revenue relying on streaming subscriptions. Meanwhile, Amazon's cloud computing segment has been able to make up for losses in its e-commerce business despite macroeconomic headwinds.

Netflix has made positive moves toward diversifying its business, which will likely pay off over the long term. However, Amazon already has strong positions in e-commerce, cloud computing, streaming, and advertising, to name a few. As a result, Amazon's stock is undeniably the better buy for the long haul.