Over the last two decades, these companies have come to gradually dominate their respective markets. Amazon.com, Inc. (NASDAQ:AMZN) is the worldwide leader in e-commerce, while Netflix, Inc. (NASDAQ:NFLX) has become the global leader in online streaming video, an area where Amazon also competes.

The result has been an absolute windfall for shareholders of the respective companies, with Netflix stock returning over 15,000%, while Amazon has seen 50,000% gains!

While those astonishing returns are laudable, investors today are less interested in past performance and much more concerned with future potential. With that in mind, let's look at finances, growth prospects, and valuation to determine which is a better opportunity for investors now.

Businessman using finger to trace gains on transparent chart.

Both stocks have soared, but which has a greater runway? Image source: Getty Images.

Financial fortitude

Amazon has been foregoing profitability for much of its history, choosing instead to sacrifice earnings for market share. Netflix has followed a similar path since deciding to own much of its streaming content and embark on a sweeping international expansion.

Netflix has not only been forfeiting profitability to subsidize its ambitions, but also borrowing heavily to finance them. The company plans to continue taking on debt and has stated on numerous occasions that its cash flow will be negative for many years to come.

Company

Cash

Debt

Net Income (TTM)

Free Cash Flow (TTM)

Amazon

$13.2 billion

$7.7 billion

$1.92 billion

$8.8 billion

Netflix

$1.9 billion

$3.4 billion

$0.4 billion

($2.1 billion)

Data from YCharts. Chart by author. TTM = Trailing twelve months.

With its stronger cash flow and balance sheet, Amazon stands on a much more solid foundation.

Winner = Amazon

Recent results and growth prospects

It would be impossible to understand the growth prospects of these companies without a look at the markets in which they operate.

Amazon

The e-commerce market is experiencing explosive growth but has barely scratched the surface of the potential opportunity. In the U.S., online sales account for 8.2% of total retail sales, up from just 3.5% a decade ago. As more shoppers move online, that number will continue to grow, and Amazon has positioned itself to be the primary beneficiary of the trend, capturing an estimated 53% of all online sales growth in the U.S. in 2016.

Chart showing e-commerce growth from 3.5% in Q1 2008 to 8.2% in Q2 2017

E-commerce continues to grow at a torrid pace. Image source: U.S. Department of Commerce.

E-commerce isn't the only market the company dominates. Amazon Web Services (AWS), its cloud computing operation, controls 34% of the cloud infrastructure services market, with its closest competitor a distant 11%. While AWS was only 8% of Amazon's revenue last year, it contributed 73% of its operating profits. The company has also made a significant investment in artificial intelligence, which benefits AWS, and produced its Echo line of smart speakers, powered by its virtual assistant Alexa. Amazon also competes with Netflix in the streaming video market, though exact subscriber numbers have not been disclosed.

Over the trailing 12 months, Amazon grew its revenue by 17%, though its earnings declined 8.65% due to strategic investments in fulfillment capacity and logistics to keep up with increasing demand.

Netflix

Netflix pioneered online video streaming and recently took its show on the road, expanding to a total of 190 countries worldwide. With more than 600 million potential customers and growing, the company has barely scratched the surface with its recent count of 104 million subscribers.

Netflix has plans that 50% of its library will be from self-produced content, resulting in decreasing incremental costs. As the company adds future subscribers, it will be able to spread the cost of its content over a wider user base. This will result in increasing profitability, once its content library is filled out.

As the worldwide leader in streaming, Netflix wants to maintain its position as the king of the hill, but that isn't guaranteed. Its prolific use of debt and negative free cash flow has raised concerns that it may not be able to grow subscribers quickly enough to offset these financial obstacles. Over the trailing 12 months, Netflix has increased revenue by 25%, while its net income skyrocketed 122%.

I believe that the growing dominance of e-commerce and multiple successful business lines give Amazon the greater opportunity going forward.

Winner = Amazon

Stock performance and valuation

Over the last year, both companies have beat the market by a wide margin. Amazon stock is up over 30% to the broader market's 17% return, but Netflix stock has overwhelmed both, growing an impressive 90%!

Given that performance, you'd expect Netflix to sport a much higher valuation, especially since the company has been plowing all its profits and more into building out its library of content. You might be surprised to find that while both companies have nosebleed valuations, Amazon is actually more expensive across a variety of metrics.

Company

Trailing P/E

Forward P/E

P/FCF

PEG Ratio

Amazon

252

274

55

1.5

Netflix

222

159

N/A

1.4

Data from YCharts. P/E = Price to earnings. P/FCF = Price to free cash flow. PEG = Price to earnings growth.

It is also important to note that Amazon's free cash flow is distorted by its significant use of capital leases, meaning the true measure is much higher. Still, Netflix represents a better value using these measures. 

Winner = Netflix

Final tally

In the final analysis, Amazon presents investors with a better opportunity. That said, both companies represent a significant portion of my personal investments, and I believe there is a place for both in a well-diversified portfolio.

Danny Vena owns shares of Amazon and Netflix. The Motley Fool owns shares of and recommends Amazon and Netflix. The Motley Fool has a disclosure policy.