Amazon and Microsoft have both staked their artificial intelligence strategies on a similar playbook: integrate AI across their own product suites while leaning on external model providers, and let their cloud computing divisions capture the surge in AI-driven workloads. The question for investors is which of these two technology giants, ranked fourth and fifth globally by market value, offers the more compelling opportunity today.

A closer look at growth trajectories, profitability, and valuation suggests Amazon may have the edge in the near term, though both companies retain formidable competitive moats.

The two companies are locked in a dead heat when it comes to the resilience of their core businesses. Microsoft’s grip on enterprise productivity software is so strong that clients cannot realistically cut it even in a downturn. Amazon’s e-commerce operation has become the default online shopping destination for hundreds of millions of consumers. Both cloud divisions are thriving amid the AI build-out, with each company committing hundreds of billions of dollars to expand capacity.

Where the comparison starts to diverge is growth. Microsoft has historically posted faster revenue expansion than Amazon, but that dynamic flipped in the most recent quarter. The catalyst is Amazon Web Services, which accelerated to a 37 percent growth pace after years of hovering around the 20 percent range. With AI spending and the cloud infrastructure build-out still in their early stages, Amazon appears positioned to maintain that momentum.

Operating profit growth tells a similar story. Both companies hold significant stakes in private AI startups, Microsoft in OpenAI and Amazon in Anthropic, which distorts reported earnings through investment gains and losses. Stripping out those effects, Amazon’s operating income growth has opened up a clear lead, driven by the higher-margin profile of cloud computing relative to its retail operations.

Valuation, however, is where the picture gets more nuanced. On a trailing operating profit basis, Microsoft trades at a meaningfully lower multiple than Amazon. But that discount is justified by Amazon’s superior growth rate. When the lens shifts to forward earnings projections, which filter out past investment gains, Amazon actually looks cheaper on a forward price-to-earnings basis.

The conclusion: Amazon’s accelerating profit growth, fueled by AWS, makes it the stronger pick for investors seeking near-term upside. Microsoft remains an excellent long-term holding with plenty of room to run, but the momentum currently favors Amazon.

That momentum comes with broader market context worth considering. The Shiller price-to-earnings ratio has climbed to 42, its highest level since the dot-com era, stoking fears of an AI bubble. Investors worried about a potential bust have been rotating toward tech stocks with balance sheets strong enough to absorb a downturn.

Amazon fits that profile. The company holds roughly $123 billion in liquidity and generated $161 billion in net cash from operating activities over the trailing 12 months. It has pledged $220 billion in capital expenditures for 2025, up from $132 billion the prior year, which has pushed free cash flow into negative territory and lifted long-term debt to nearly $129 billion. Still, the operating cash flow cushion gives Amazon room to pull back on spending if AI investments fail to deliver.

Microsoft’s financial position is similarly robust, with its diversified revenue base providing stability across economic cycles. The company’s enterprise software franchise generates recurring revenue that would likely hold up even if AI enthusiasm cools.

For investors weighing the two cloud computing behemoths, the decision comes down to a trade-off between Microsoft’s stability and Amazon’s growth acceleration. With AWS finally breaking out of its multi-year growth plateau, Amazon offers a more dynamic near-term story, while Microsoft remains the steadier long-term compounder.

The AI investment landscape is evolving rapidly, and both companies have positioned themselves to benefit regardless of which model provider ultimately dominates. Their cloud platforms serve as the infrastructure layer for the entire AI ecosystem, a position that should continue to generate value for shareholders through the current build-out and beyond.