Oracle’s cloud infrastructure revenue is surging, but its expansion is consuming more cash than the whole company generates.
Microsoft's cloud business is growing more slowly on a percentage basis, but the company remains free-cash-flow positive and carries much less debt.
Oracle could offer greater upside if its plans succeed, but Microsoft has a greater capacity to absorb setbacks.
The artificial intelligence (AI) infrastructure build-out is expensive.
OK, that's underselling it. In fact, the current spending spree is one of the largest capital outlays in modern history. Adjusted for inflation, this year alone will see more spent on AI-related infrastructure projects than was spent during the entire decade-long Apollo program.
Missed AI’s "Act 1"? Act 2 Could Be 15x Bigger. Most investors think they missed the AI boat because they didn't buy Nvidia in 2005. But according to our analysts, we’re only at the end of "Act 1"—the R&D phase. "Act 2" is the global rollout. Continue »
Over the next few years, global AI capital expenditures will be measured not in the hundreds of billions of dollars but in the trillions -- and two of the biggest spenders will undoubtedly be Oracle (NYSE: ORCL) and Microsoft (NASDAQ: MSFT).
But which of these AI compute giants stands to benefit most from all that spending, and which is the better buy?
On the top line, Oracle has been doing quite well. Sales grew from $57.4 billion in its fiscal 2025 to $67.4 billion in its fiscal 2026 -- mostly on the back of its AI efforts.
Sales from its Oracle Cloud Infrastructure (OCI) unit -- which leases massive data centers and rents out AI compute -- jumped 121% year over year to $7.4 billion as of its most recent quarter, fiscal 2027 Q1.
Image source: Getty Images.
And there's plenty more business waiting, too. Companywide remaining performance obligations (RPO) -- contracted sales for services it hasn't delivered yet and, therefore, can't count as revenue yet -- reached an incredible $664 billion last quarter.
Of course, nothing is free, and Oracle's cash picture looks strained, to say the least. Its capex reached $55.7 billion last year, exceeding its operating income. As a result, its free cash flow (FCF) -- the money left over after running the business and paying for capital projects -- turned negative to the tune of a $5.4 billion loss in the latest quarter.
And mind you, Oracle has increasingly worked out deals where customers pay up front. Its FCF could get much worse before it gets better.
To help cover the gap, Oracle has turned to debt. As of the end of August, the company had $125 billion in long-term debt on the books, and that figure excludes another $288 billion in data center lease commitments it hasn't begun paying.
Investors are becoming more concerned about that borrowing, too. Last week, the cost of insuring Oracle's debt against default reached record levels, exceeding levels seen during the financial crisis.
Microsoft sales grew from $281.7 billion in its fiscal 2025 to $331.8 billion in fiscal 2026, with Azure and other cloud services revenue jumping 43% year over year in its most recently reported quarter -- not quite as fast-growing as Oracle Cloud Infrastructure.
Of course, Azure is already much larger. Microsoft's intelligent cloud segment revenues (which include Azure) hit $39.3 billion last quarter. It's easier for OCI to grow more rapidly on a percentage basis, given that it's less than one-fifth the size of Microsoft's intelligent cloud.
On the cost side, Microsoft spent $35.8 billion on capex last quarter, which is considerably less than it brings in from operations, so the company was still FCF positive -- it booked just shy of a $20 billion surplus.
Microsoft's debt picture is much less strained, too. At the end of June, Microsoft had about $40.3 billion in debt, down from $43.2 billion a year earlier, though it also had $329.1 billion in leases that have yet to begin.
If everything goes perfectly, Oracle would likely have more upside. Its cloud business is growing faster, and that unit makes up a larger part of its financial mix than the corresponding business does for Microsoft. Both companies have backlogs of a similar scale, but Oracle's cloud sales are less than a fifth of Microsoft's. It just has a relatively bigger opportunity.
But I don't think things will go perfectly. Five years is a long time, especially considering we are already seeing signs of delays in key data center projects across the country, notably a significant potential delay in Oracle's Project Jupiter data center in New Mexico. I think this is only likely to get worse, and Oracle doesn't have a lot of breathing room.
Microsoft is exposed to those sorts of risks, too, but it has far more financial flexibility to deal with them. For my money, that makes it the better bet, and I expect Microsoft stock to outperform Oracle's over the next five years.
Johnny Rice has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Microsoft and Oracle. The Motley Fool has a disclosure policy.