Apple (AAPL -0.49%) and Microsoft (MSFT 0.65%) are two of the biggest rivals in tech. And today, they're both spending heavily on artificial intelligence (AI) as their rivalry evolves into yet another chapter.

They are among the most highly valued stocks in the world with market caps in excess of $3 trillion. Apple is ahead today, but which stock ends up more valuable in the next five or 10 years could ultimately depend on which business has the better AI strategy.

In 2024, Apple's stock rose by 30% as it outperformed Microsoft, which increased by just 12% in value. But which AI stock is likely to be the better buy in 2025 and beyond: Apple or Microsoft?

The case for Microsoft

There are 1.6 billion devices running Windows in the world. It's a staggering number of machines and it's the big reason why Microsoft can be a big winner in AI. It has many customers already using its software in the corporate world and if the company can develop Copilot into the next big subscription service, that has the potential to be a massive growth catalyst for the business in the long run.

Copilot is still in its early innings but it has an advantage over ChatGPT and other AI offerings because it is added within products like Word and Excel. Users can easily access the AI right within their daily workflows without going to a separate site or launching a new application. It can help with forecasting sales and profit numbers for accountants in Excel, or creating presentations and ads in PowerPoint. The potential for synergies and efficiencies due to Copilot is why investors shouldn't overlook the massive opportunity this is for Microsoft.

It may take some time for Microsoft to develop Copilot into what it needs to be for organizations to justify having all their users subscribed to it, but if it happens, it could add billions in revenue for Microsoft and unlock a big growth opportunity for years to come.

The case for Apple

There are 2.2 billion Apple devices in the world that the company could serve its AI offerings to. Apple has been slower in rolling out its AI strategy, which is why it may still have more of an untapped opportunity than Microsoft. Apple hasn't wowed users at this stage, nor has it really disappointed them. Many Apple Intelligence features are still set to come in 2025, including new Siri features that will help users find messages and send files and photos more easily.

As the company offers more AI-powered services on its devices, that could serve as a significant catalyst, propelling more users to upgrade their phones and tablets to ensure they're not missing out on the latest features and capabilities.

Plus, there's the opportunity for Apple to offer AI-related subscription services, which could unlock even more revenue-generating opportunities. Some analysts have estimated that the company could charge as much as $20 per month for advanced AI features. With Apple targeting a more affluent customer base, there may also be less resistance from its users in paying for greater functionality.

Which stock should AI users invest in?

Apple was the better stock to own in 2024 and I think the story will play out the same this year and over the long term. The company is taking a slower, more cautious approach with AI. That can be a better strategy as Apple can better evaluate which features its users want, and which ones it may not want to spend time and money developing.

And while Microsoft may have a lot of potential business customers to tap into thanks to the wide reach of Windows, that may involve a bigger hurdle. Companies would need to justify spending $30 a month per user  whereas Apple could get a boost from simply convincing users to upgrade their devices.

Both of these companies could benefit significantly from AI-related revenue, but Apple may have a clearer and easier path to that growth than Microsoft, which is why it looks to be the better AI stock to own today.