Amazon (AMZN 3.37%) and Alibaba (BABA 0.61%) are two of the most powerful businesses on the planet. They dominate the multitrillion-dollar global e-commerce market and are rapidly expanding into many other lucrative industries. In the process, they've created tremendous wealth for their investors -- and they appear poised to continue to reward their shareholders in the years ahead.

But which of these stocks is the better buy today? Let's find out.

A shopping cart shape made of neon lights

Image source: Getty Images.

Competitive position

Alibaba dominates the massive e-commerce market in China with a 58% share, according to eMarketer. Its closest competitor, JD.com, has only a 16% share. 

Yet Alibaba's operations extend far beyond online commerce. It has fast-growing businesses in areas such as mobile payments, digital advertising, and cloud computing. Additionally, Alibaba has built a powerful presence in China's brick-and-mortar retail industry with its "New Retail" strategy. By providing traditional retailers with the ability to accept mobile payments and offer home delivery, Alibaba has positioned itself as a valuable partner. Doing so also helps to expand Alibaba's total addressable market to nearly all of China's $5 trillion retail market. 

Like Alibaba, Amazon dominates e-commerce in its core U.S. market, with a nearly 50% share.  Also like Alibaba, Amazon has powerful and rapidly growing cloud computing and digital advertising businesses.

Yet unlike Alibaba, Amazon's dominance spans far beyond its home market. Amazon is the leading online retailer throughout North America, Europe, and many other areas of the world. Alibaba, too, is attempting to expand into international markets, but Amazon is much further along in this regard.

As such, Alibaba is more exposed to the regulatory and political risks that are inherent to businesses operating in communist-controlled China. Thus, I'd argue that Amazon's broader international scope places it in a stronger overall competitive position, while also making it a relatively lower-risk investment.

Advantage: Amazon

Financial strength

Let's now take a look at how these two e-commerce titans compare on some key financial metrics.

Metric

Alibaba

Amazon

Revenue

$50.2 billion 

$232.9 billion 

Operating income

$8.9 billion 

$12.4 billion 

Net income

$10.1 billion 

$10.1 billion 

Operating cash flow

$21.3 billion 

$30.7 billion 

Free cash flow

$16.9 billion 

$17.3 billion 

Cash and investments

$62.3 billion 

$41.3 billion 

Debt

$19.8 billion 

$23.5 billion 

Data sources: S&P Global Market Intelligence, company filings.

Despite the fact that Amazon's revenue is more than four times that of Alibaba, these companies produced nearly identical net income and free cash flow over the past year. That's because Alibaba is a far more profitable business, with an operating margin of nearly 18%, compared to only 5% for Amazon. Alibaba also has a stronger balance sheet, with more than $42 billion in net cash and investments, versus less than $18 billion for Amazon. For these reasons, Alibaba has the edge here.

Advantage: Alibaba

Growth

Both Alibaba and Amazon are expected to grow their profits at impressive rates over the next half-decade. Wall Street estimates that Alibaba's earnings will rise by 28% annually, driven by the growth of its online retail, New Retail, and mobile-payments operations. Amazon's profits, meanwhile, are forecast to increase by 31% annually, fueled by its e-commerce, cloud, and digital advertising businesses.

These are incredible growth rates, particularly for megacap companies. Yet Amazon has a slight edge here.

Advantage: Amazon

Valuation

Finally, let's review some stock valuation ratios.

Metric

Alibaba

Amazon

Price-to-free-cash-flow

27.98 

50.56 

Trailing price-to-earnings

52.17 

88.42 

Forward price-to-earnings

27.03 

44.56 

Data sources: Yahoo! Finance, Nasdaq.

Alibaba's stock is substantially cheaper based on both free cash flow and earnings. Amazon's higher projected growth rate no doubt plays a part in this. But even if we adjust for this by calculating their price-to-earnings-to-growth ratios, we see that Alibaba's PEG of 0.96  is still lower than that of Amazon's 1.43.  As such, Alibaba's shares are currently priced at a bigger discount.

Advantage: Alibaba

So which stock should you buy?

With this better buy battle all tied up after four rounds, I'm going to call it a draw. Amazon and Alibaba are both elite businesses with outstanding growth prospects. Thus, investors may be best served by simply buying both of their stocks today.