Apple (AAPL -0.35%) and Amazon (AMZN 3.43%) have been quite successful at incorporating their products and services into the daily lives of billions of people around the world. Over the past few decades, these two tech giants have created things that move the world forward. And their stocks have created plenty of wealth for those smart enough to buy in.

For those investors considering getting in on either of these two stocks going forward, the question naturally arises as to which of these two FAANG stocks is the better investment right now. Let's evaluate them based on three important factors and see what conclusions can be reached.

Factor 1: Economic moat

An economic moat is a term that represents a trait (or traits) that help a company outperform its competitors in a particular industry. The presence of a moat raises the chances that a business will still be around and thriving well into the future. The bigger the moat, the more successful a company is likely to be long-term.

Without a doubt, Apple's main moat stems from its incredible brand strength. Consumers all across the world have no problem spending premium prices to attain the company's various hardware products. This has resulted in one of the most financially successful enterprises on Earth. Its moat helped Apple produce $233 billion in operating cash flow in the last two years (combined).

Amazon's key moat source has to be its network effect. As a massive online marketplace that brings together merchants and consumers, the platform improves as it gets bigger. Add on a sprawling logistics network that allows for fast and free shipping on millions of products, and it's hard to see anyone competing effectively with Amazon.

Owning businesses that have an economic moat is a good strategy to create a winning portfolio. Both Apple and Amazon have powerful competitive advantages, placing them in a league of their own in this regard.

Factor 2: Growth prospects

When it comes to future growth potential, Apple gives investors reasons to be cautious. The business reported a 2.8% revenue decline in fiscal 2023, with sales rising by just 2.1% year over year in the latest fiscal quarter (Q1 2024 ended Dec. 30). Macroeconomic headwinds might be limiting the propensity of consumers to spend on new hardware devices.

Because the iPhone still accounts for more than half of the company's sales, and it is in a very mature stage of its product lifecycle, Apple might not have many growth levers to pull with its current product lineup.

As for Amazon, its growth opportunities abound. As the leading platform for online shopping in the U.S., it stands to capture a significant portion of consumer spending that transitions from brick-and-mortar stores to e-commerce. Related to that online shopping is Amazon's growth potential in digital advertising. It's a relatively new segment for Amazon, but it's generating some of the most significant growth in the company at the moment and has plenty of runway for additional expansion.

There's also Amazon Web Services (AWS), the company's cloud computing service provider that controls nearly one-third of the global industry's revenue. AWS' growth has slowed down somewhat in the past several quarters, but management is optimistic about the long-term opportunity. It makes sense why. According to Grand View Research, cloud computing is estimated to be a $1.6 trillion worldwide market by the end of this decade. Amazon is in the best position to benefit.

Factor 3: Current valuation

Both Apple and Amazon have wide moats, but the latter clearly has better growth potential in the years ahead. This means Amazon has the lead in this competition thus far.

The final factor to consider is the valuation. Here again, the nod goes to the e-commerce and cloud computing juggernaut.

Amazon trades at a price-to-sales (P/S) ratio of 3.2 today. That's less than half of Apple's P/S multiple of 6.9. The iPhone maker sells at a valuation that far exceeds its trailing-10-year average, while Amazon is roughly in line with its past 10-year P/S ratio. Apple stock is trading at a premium given the market's expectations for future growth.

Taking all the information together, Amazon looks like the best stock to buy of these two tech titans.