Apple (AAPL 1.62%) and Microsoft (MSFT 2.07%) are the second-largest and third-largest stocks, respectively, as measured by market cap.

For years, both companies competed to claim the world's largest market cap. However, both companies have struggled in the realm of artificial intelligence (AI), allowing Nvidia to recently capture the No. 1 spot. Apple's iPhone has largely failed to spawn an AI-driven upgrade cycle, while Microsoft's most notable AI successes seem to have come from a strained partnership with OpenAI.

Despite their challenges, Apple and Microsoft remain influential in the AI industry. The question for investors is which one is in a stronger position to drive AI-driven returns moving forward.

An image depicting AI.

Image source: Getty Images.

The state of Apple

The most notable aspect of Apple's business is its maturation. Sales of its devices, including the iPhone, which generates more than 50% of its revenue, have plateaued. Additionally, while Apple Services is among its fastest-growing segments, it serves more as an extension of its current ecosystem rather than a source of game-changing new offerings.

The slowing occurred even as Apple has widely adopted AI across its ecosystem. This included enhanced Siri functionality, AI-powered photo and image search, and its tool for creating custom emojis, Genmoji.

Moreover, the iPhone 17 is about to come out. According to reports, it will feature improvements such as a slimmer design, more RAM, and a longer battery life. Still, neither these improvements nor its AI functionality have accelerated the upgrade cycle, leading to significantly slower growth.

In the trailing 12 months ended June 28, net sales of $409 billion rose 6% yearly. Since costs and expenses mostly kept pace with revenue, the $99 billion Apple earned over that period decreased from the $102 billion profit in the year-ago period.

With that, the stock has risen by around 9% over the last year. Also, its P/E ratio of 36 is well above the S&P 500 average of 30. That earnings multiple may also appear expensive considering the single-digit growth, likely cooling investors to its AI.

How Microsoft has fared in the current environment

Since Microsoft is more software-oriented than Apple, it may be more heavily dependent on AI for success. Moreover, its most prominent current offering, cloud provider Azure, is critical for running AI models.

The company has integrated AI more heavily into its legacy products, such as Windows OS and Microsoft Office. Additionally, a partnership with OpenAI enhanced its functionality.

Unfortunately, the limitations of that partnership may have also limited its AI leadership. With that, speculation that its Bing search engine would compete more effectively with Alphabet's Google Search did not pan out.

To this end, Microsoft has begun calling OpenAI a "competitor" and developing more AI internally. Microsoft has also started hiring AI talent away from companies such as Alphabet.

Unfortunately for investors, it is not yet clear if or how much this will boost Microsoft as an AI player. Still, investors can take comfort in the company's financial performance.

In fiscal 2025 (ended June 30), its $282 billion in revenue increased by 15% annually. While operating expenses rose faster than revenue, its other expenses and income taxes negated most of that gain. That meant its $102 billion in net income for the period climbed by 16%.

Microsoft's stock is up 22% over the last year. Nonetheless, its 36 P/E ratio closely approximates that of Apple, increasing the likelihood that choosing between these AI stocks may have little to do with AI.

Apple or Microsoft?

Under current conditions, Microsoft is likely the more suitable choice of the two stocks.

Admittedly, both of these companies have apparently failed to dazzle the market with their AI offerings, and both trade at around the same valuation.

However, for all of the disappointments in AI, Microsoft is growing revenue and profits at a much faster rate, leading to higher market returns. Such an improved performance likely serves as the tiebreaker needed to give Microsoft the edge.