E-commerce and cloud leader Amazon (AMZN 0.75%) is a bona fide stock winner that keeps compounding in value. Shares trade near their all-time highs, and a mere $1,000 investment made at its initial public offering in May 1997 has turned into over $1.9 million.

Naturally, new investors will ask whether they have missed the train on this stock. Does Amazon still have share appreciation juice to squeeze as it approaches a $2 trillion valuation? The answer to that question involves asking two other distinct questions:

  1. Can Amazon still grow?
  2. Does the stock's valuation leave room for more?

After doing some homework, I was surprised at the answers I found. Here is what you need to know.

Can Amazon still grow?

Naturally, growth becomes more challenging when you're a massive corporation generating, in Amazon's case, $574 billion in annual revenue. But borrowing a phrase from my kids, Amazon is built differently.

That's because Amazon plays in three humungous markets with more room for growth and opportunities than most: e-commerce, cloud computing, and digital advertising. It is America's leading e-commerce company, with a 38% market share. In cloud computing, Amazon Web Services (AWS) leads the market with a 31% share. Amazon is expected to account for 15.2% of all digital advertising spending in the U.S. in 2025.

That leadership helps Amazon compete because it has the size and scale most competitors can't match. It can provide a better product for less money.

The best part is that these big-picture trends favor Amazon. Today, e-commerce still only accounts for just over 15% of total retail in the United States. That's trillions of dollars of consumer spending yet to move online.

Cloud computing has become the foundation of the internet, and now artificial intelligence (AI) has added several new rooms to build up and stack on top. Just recently, Amazon announced $50 billion in new data center investments for Virginia and Japan, underlining how much computing power AI and an increasingly digital world will command. Some believe in a bullish scenario in which public clouds like AWS could become a $10 trillion market over the coming years.

Third, Amazon has amassed a massive presence in the media landscape by leveraging its Prime subscription program, which has somewhere around 200 million paying accounts. Prime members get access to streaming content and Amazon's rights to Thursday Night Football via the National Football League. Additionally, Amazon generates billions in advertising revenue through Prime and through its affiliate sales program. The ad business grew 27% year over year in Q4, faster than any other part of Amazon. Annualizing its Q4 ad revenue puts the segment at nearly $60 billion. Amazon's strong growth rate seems to imply plenty of room for the ad business to expand moving forward.

Overall, Amazon seems to have plenty of opportunities to continue growing.

Does the valuation make sense?

Amazon founder Jeff Bezos once said that the company was "famously unprofitable." He meant that you had to look at the business's cash flow because it reinvested all its profits back into the company. In other words, valuing the stock on bottom-line earnings doesn't tell the whole story.

So I looked at Amazon's ratio of price to cash from operations (CFO) to see if it's still attractive today. After all, shares are trading at all-time highs and have increased 88% over the past year.

AMZN Price to CFO Per Share (TTM) Chart

AMZN price to CFO per share (TTM) data by YCharts; TTM = trailing 12 months.

What jumps out is how low a valuation the stock came from by nearly doubling in share price in just a year. At less than 20 times operating cash flow, that bargain doesn't come around often. The good news is that shares are still notably below their average valuation over the past decade.

So yes, shares still offer some value today.

Is it too late to buy Amazon?

Whether to buy any stock depends on what the company could do in the future and the price you pay for that potential growth. You'll likely make money over time if you get those two things right.

Amazon has room to continue growing its core e-commerce and cloud businesses. And it has gotten further into media and advertising, which gives the company a third potential growth avenue to explore.

As you saw above, Amazon is still (at worst) reasonably priced today.

So to answer the question, long-term investors can still buy the stock today. It's not too late, despite the strong run over the past year.

With that said, shares could always dip, as any stock might, so consider a dollar-cost averaging strategy to slowly build a position to avoid being caught in a market correction with no money left to invest.