Neither Apple (AAPL -0.82%) nor Amazon (AMZN -0.09%) need an introduction. These massive businesses dominate their respective industries, have long been integral parts of culture and society, offer superior products and services customers absolutely love, and have made for great investments over the past decade.

With both businesses experiencing sizable slowdowns in recent quarters and shares off their all-time highs, it could be an opportune time to consider adding one to your portfolio. So which of these FAANG stocks is the better buy right now? Let's take a closer look at the facts to find the answer.

The case for Apple: Warren Buffett's top holding

Over the past five years, Apple's stock has risen roughly 300%, handily outpacing the Nasdaq Composite Index by a wide margin. This has greatly benefited one of the company's largest shareholders. As of Dec. 31, Berkshire Hathaway, the conglomerate headed by Warren Buffett, owned 5.8% of the iPhone maker's outstanding shares, a gargantuan sum. After first buying shares about seven years ago, this has likely become Buffett's best investment in terms of dollars gained.

Despite Apple's endorsement by the Oracle of Omaha -- something individual investors appreciate, I'm sure -- this business isn't without its issues. In the most recent fiscal quarter (Q1 2023 ended Dec. 31), Apple's revenue of $117.2 billion was down 5.5% year over year, the first year-over-year drop since the second quarter of fiscal 2019. CEO Tim Cook pointed to the unfavorable economic backdrop, pandemic restrictions in China hurting new iPhone production, and the strength of the U.S. dollar.

Macro headwinds and the dollar's strength are completely outside the company's control. And when it comes to the challenges with the China supply chain, Apple is navigating this situation by moving greater manufacturing capabilities to India.

Additionally, it's hard not to like Apple's fanatical and loyal customer base, exemplified by the more than two billion active devices worldwide. The company's popular hardware products have pricing power and, in total, carried an outstanding gross margin of 37% last fiscal quarter. The high-margin services segment continues its growth. And shareholders are rewarded with generous capital returns, like $14.8 billion in dividends and $89.4 billion of share repurchases in fiscal 2022.

Compared to its big-tech peers, Apple has been applauded for not undergoing sizable corporate layoffs. And while most businesses deal with inflationary pressures, Apple's margins have held up quite nicely over the past several quarters. So it's probably not surprising that the stock is only down 9% from its Jan. 2022 all-time high (as of April 14). Shares are now trading at a historically expensive price-to-earnings ratio of 28.

The case for Amazon: Benefiting from major secular trends

Amazon is also going through a bit of a rough patch. Overall sales were up just 8.6% on a year-over-year basis in the last three months of 2022, a far cry from the monster growth throughout the worst of the pandemic. Macro pressures have forced CEO Andy Jassy and his team to lay off a sizable chunk of its staff, bringing the total this year to 27,000 employees.

The business is also finding other ways to cut costs to streamline operations. Being fully exposed to the strength of the consumer, as well as corporate IT spending and trends in the digital ad market, can make Amazon's revenue more cyclical in nature.

But it's hard to ignore the bigger picture with this massive enterprise. If we zoom out, it's clear that Amazon benefits from powerful secular trends happening across the economy. Online shopping still only accounts for 15% of total retail sales in the U.S., something Amazon will help propel in the decade ahead. What's more, there are estimates that both the cloud computing and digital advertising markets will each be worth roughly $1.5 trillion by 2030, leaving a huge growth runway for Amazon.

While Apple's valuation is on the pricier side of the equation, this isn't the case with Amazon. As of this writing, Amazon's stock is down 45% from its peak set in July 2021, and it now trades at a price-to-sales (P/S) multiple of just over 2. This is about as cheap as shares have been in the past five years. The below-average P/S ratio leaves sizable upside for Amazon's stock from a purely valuation perspective.

Apple might be widely considered the best business of all time, with the most successful single product ever. But I view its shares as a bit overvalued. And the company simply doesn't have as much growth potential as Amazon. That's why the e-commerce giant is the better stock to buy right now.