Microsoft (MSFT 0.37%) and Apple (AAPL 1.27%) both became high-growth companies again under visionary CEOs. After taking the helm at Microsoft in 2014, CEO Satya Nadella set the tech giant on a fresh course by expanding its cloud-based services while reducing its dependence on desktop software. Microsoft developed more mobile apps for iOS and Android, launched new Surface devices, expanded its Xbox gaming business, and abandoned its struggling Windows Phone platform.

Apple stagnated for years before Steve Jobs returned as its CEO in 1997. Jobs' tenure -- which lasted until his death in 2011 -- disrupted the PC, digital media player, smartphone, and tablet markets with the iMac, iPod, iPhone, and iPad. Jobs' successor, Tim Cook, continued to expand Apple's hardware business with the Apple Watch, AirPods, and HomePod, all while expanding its sticky services ecosystem with Apple Pay, Apple Music, Apple TV+, Apple Arcade, and other new services.

A retired couple speaks to a financial advisor.

Image source: Getty Images.

Microsoft and Apple have generated massive gains for investors who believed in those transformations. Microsoft's stock has rallied about 570% since Nadella's first day. Meanwhile, Apple's stock has skyrocketed 78,770% since Jobs' return to the CEO post.

Both tech giants' market caps blew past the $1 trillion mark over the past few years. Microsoft's valuation eclipsed Apple's numerous times during that ascent, but Apple's current market capitalization of $2.5 trillion now puts it comfortably ahead of Microsoft's valuation of $1.8 trillion. Could Microsoft catch up to Apple again within the next three years?

The key differences between Microsoft and Apple

Microsoft generates most of its revenue from its software and cloud-based services, while Apple makes most of its money by selling hardware. At Microsoft, the main metric to watch is its cloud revenue, which grew 32% to $91 billion, or 46% of its top line, in fiscal 2022 (which ended in June). This segment houses Office 365, Dynamics, and Azure -- the world's second-largest cloud infrastructure platform after Amazon Web Services (AWS). Recently it has managed to offset the slower growth of its desktop-based software and Windows licenses.

As for Apple, most investors track its sales of iPhones, which generated 54% of its revenue in the first nine months of fiscal 2022 (which ended in June). They also closely follow its services revenue, which accounted for 19% of its top line during that period and reached over 860 million paid subscriptions at the end of the third quarter. The bulls believe the growth of that services ecosystem will lock users into Apple's walled garden and gradually reduce its dependence on the iPhone.

Which company has been growing faster?

Microsoft's business is more diversified than Apple's. Its Surface and Xbox businesses are cyclical, but those two hardware divisions are much smaller than its core software and cloud-based service segments. Meanwhile, Apple's growth still relies heavily on rigid hardware upgrade cycles, which have gradually lengthened with each generation of faster devices. It's also more heavily exposed to chip shortages, supply chain disruptions, tariffs, and rising labor costs than Microsoft.

That's why analysts expect Microsoft's revenue to grow at a compound annual growth rate (CAGR) of 13% from fiscal 2022 to 2025, while they only expect Apple's revenue to increase at a CAGR of 5% from fiscal 2021 to 2024. They also expect Microsoft's earnings per share (EPS) to grow at a CAGR of 13% during that period. On the other hand, they expect Apple's EPS to rise at a CAGR of 7%.

We should take those estimates with a grain of salt, since they probably don't factor in Microsoft's plans to aggressively expand its gaming business with more acquisitions or Apple's long-rumored AR and VR devices. However, they clearly suggest that Microsoft's cloud business will continue to flourish as Apple's hardware sales cool off again.

Microsoft could easily catch up to Apple again

Based on those expectations, Microsoft's stock should trade at a premium to Apple's stock. However, Microsoft trades at 25 times forward earnings, while Apple has a slightly pricier forward price-to-earnings ratio of 26x.

We could argue that both stocks' valuations have been inflated by the flight toward safer blue-chip tech stocks during the ongoing bear market, but investors also seem to be pricing a lot of Apple's rumored products -- including AR gadgets and driverless cars -- into its stock price. Therefore, Apple's stock arguably deserves to trade at a lower multiple than Microsoft. If those valuations reset over the next few years, Microsoft could easily become more valuable than Apple by 2025.