Microsoft's huge investment in OpenAI is paying off.
Alphabet is gaining market share in the cloud computing realm.
In a battle of artificial intelligence (AI) hyperscalers, Alphabet (NASDAQ: GOOG) (NASDAQ: GOOGL) and Microsoft (NASDAQ: MSFT) are often brought up as two of the best options. Each is taking a different approach to AI, and both approaches have their merits. Which one of these two is a better buy?
Each company looks attractive, but I think there is one that edges out the other.
Will AI create the world's first trillionaire? Our team just released a report on the one little-known company, called an "Indispensable Monopoly" providing the critical technology Nvidia and Intel both need. Continue »
Image source: Getty Images.
If you haven't noticed, Microsoft doesn't have its own generative AI model. Instead, it chose to heavily invest in OpenAI, the makers of ChatGPT. It holds a 27% ownership stake in that business, but that's not enough for Microsoft to be 100% devoted to it.
While Microsoft has integrated ChatGPT into its in-house AI products, it offers a wider variety of generative AI models in its Azure Foundry, which is its cloud computing platform to train and run AI applications. Users have access to Grok from xAI, Claude by Anthropic, and R1 from DeepSeek, among countless others. This makes Microsoft more of an AI facilitator rather than a developer, which could pay off because it isn't spending billions of dollars on training an AI model.
Alphabet is taking the opposite approach. It developed Gemini, which used to be the laughingstock of the generative AI world. Now, it has emerged as one of the top options and outpaces the industry standard, ChatGPT, in many applications. Because Alphabet has developed the model in-house, it has complete control over it, and can tweak it for various applications however it sees fit.
Furthermore, Alphabet already has a ton of information on its customer base thanks to offering products like email services and YouTube. This can make the AI far more tailored to each user, which could be a huge advantage in the future. The downside is that Alphabet had to spend a lot of resources to develop Gemini, but I think that it's worth it in the end.
Alphabet's more hands-on approach in the generative AI realm has helped propel it to a higher market cap than Microsoft, but does that make its stock the better buy?
During each company's last reported quarter, they both produced stellar results. Microsoft's revenue rose 17% year over year, while diluted earnings per share (EPS) rose 60%. A huge chunk of its EPS increase was due to a rise in the value of its OpenAI investment. When non-GAAP figures are used, that figure decreases to 24% growth, which is still very impressive.
The biggest factor investors look at with Microsoft is how quickly Azure is growing. This gives a window into AI spending, and is the best way to assess how it's faring in that space. Azure's revenue rose 39% year over year in Q2 FY 2026 (ending Dec. 31), marking a very strong quarter.
Not to be outdone, Alphabet also delivered an outstanding Q4. Its revenue rose at an 18% pace while diluted EPS increased by 31%. While Alphabet technically grew faster, I think we can call these two quarters fairly even. However, Google Cloud takes the cake. Its revenue rose 48% year over year during Q4, greatly outperforming Azure. That's enough for me to give the nod to Alphabet for the quarter, as its cloud computing platform is becoming more popular than Azure.
Lastly, let's look at valuation. Following Microsoft's sell-off after its Q2 earnings announcement, it's substantially cheaper than Alphabet.
GOOGL PE Ratio (Forward) data by YCharts
I think this is the deciding factor in the fight, as both companies are doing very well from a business standpoint, posting nearly identical results. However, you can buy Microsoft shares at a far cheaper price tag, making it the better buy right now.
I think each stock is an excellent investment in general, as both are slated to cash in on the massive amount of AI growth that's still coming down the pipeline.
Keithen Drury has positions in Alphabet and Microsoft. The Motley Fool has positions in and recommends Alphabet and Microsoft. The Motley Fool has a disclosure policy.