Amazon (AMZN -0.68%) and Alibaba (BABA -3.34%) are giants in the global tech landscape, both with prospects of continuing to extend their dominance into the future.

Both companies share similarities, yet they are very different in many ways. But which of the two is a better stock to own in the next few years? Let's explore this further.

Confused-looking person shrugging.

Image source: Getty Images.

The tech giants have plenty in common

At first glance, Amazon and Alibaba seem like companies separated by more than just geography. One dominates the U.S. and many parts of the Western world, while the other commands China's domestic market. But look a little closer, and you'll find that the two tech titans have more in common than not.

Both companies built their vast empires on e-commerce, but have expanded into new sectors over time. Amazon began by selling books online, but has expanded into other categories and profitable businesses, including cloud computing, advertising, logistics, and media.

Alibaba, on the other hand, began its business as a cross-border e-commerce platform, enabling overseas merchants to tap into China's vast supply chain. It was only in the later stage that it launched its flagship Taobao marketplace, followed by Tmall. Its success in e-commerce propelled the giant into new businesses, including fintech, cloud computing, logistics, entertainment, and more.

As both companies expanded into new sectors, they have gradually diversified their revenue base, making it more resilient to the changes in the external environment. Moreover, this diversified business model opens new opportunities to allocate capital to high-growth areas. For instance, both companies have been investing heavily in artificial intelligence (AI) and cloud computing to capitalize on the once-in-a-lifetime shift trend.

While these companies have very different cultural roots, they do share similarities in values such as customer delight, innovation, and investing in emerging technologies and businesses, as well as long-term thinking. This DNA stems from the significant effect of their founders, Jeff Bezos and Jack Ma. Both left a strong legacy, even though they have stepped down from active management of their businesses.

In short, both giants are well-positioned to sustain and grow their businesses, using their solid business models and long-term cultures.

Yet, they differ in other aspects

While Amazon and Alibaba are leaders in their respective e-commerce markets, their business models diverge significantly. Amazon operates a first-party retail business -- buying and selling inventory -- alongside its third-party marketplace. Alibaba, in contrast, is a pure platform. It connects buyers and sellers without holding inventory.

Amazon also owns and operates a massive logistics network, employing hundreds of thousands of people to ensure fast and reliable delivery. Alibaba's logistics arm, Cainiao, uses an asset-light model that coordinates third-party delivery services.

This divergence explains the gap in profit margins. Alibaba's marketplace model is capital-light and highly profitable. Amazon's retail operation, although strategically important, compresses margins -- although this is offset by its high-margin segments, such as Amazon Web Services and advertising.

Geographically, Amazon has a broad international footprint, with operations across North America, Europe, India, and Latin America. Alibaba is more concentrated in China, though it's expanding abroad through AliExpress, Lazada, and Trendyol.

In cloud computing, Amazon Web Services (AWS) is the global leader, holding over 30% of the market. Alibaba Cloud is dominant in China but has only a 4% global share, constrained by limited access to cutting-edge chips and geopolitical challenges.

Indeed, this is one of the most significant strategic differences between the companies. Amazon, as a U.S. company, benefits from access to the latest AI chips and global markets. Alibaba faces regulatory overhang and U.S. sanctions that limit its ability to compete globally in emerging technologies, such as generative AI.

Which company has a better value proposition today?

Now that we've explored both the similarities and differences, it's time to ask: Which stock offers better value?

As of this writing, Amazon trades at a price-to-earnings (P/E) ratio of 35, while Alibaba trades at just 14. This valuation gap suggests that Alibaba is significantly cheaper.

But valuation alone doesn't tell the whole story. Investors must also weigh growth potential, competitive strength, and risk exposure.

Amazon's premium valuation reflects its strong global positioning, leadership in AI and cloud, and a track record of consistent execution. Alibaba, on the other hand, trades at a steep discount -- not because it lacks growth potential, but because of its exposure to China's unpredictable regulatory environment.

What it means for investors

If you're looking for stability, global reach, and long-term sustainable growth, Amazon looks like a good candidate.

But if you're comfortable with additional geopolitical and regulatory risks, Alibaba might be one of the most undervalued tech giants in the market today. Its core commerce business remains highly profitable, and its stock is priced as though growth has stalled -- even though it hasn't.

The right stock depends on whether you prefer reliability or asymmetrical upside.