Microsoft (MSFT -0.11%) has been on an epic run so far in 2023, fueled by a continuing resurgence in technology stocks. Shares of the software giant are up nearly 40% so far this year, more than three times the 11% gain of the S&P 500. This marks a reversal of fortunes from its performance in 2022, when the stock dropped nearly 29%. 

There's little question that the company's pivot to artificial intelligence (AI) and consistently sturdy financial results have helped drive the rising stock price. Furthermore, Microsoft has been remarkably resilient during the downturn, continuing to spend heavily on future opportunities, helping fuel investor confidence that the company is positioning itself for a bright future.

What does this mean for those who missed out on Microsoft's current run? Should they buy the stock now with the expectation of further gains or delay buying because of its frothy valuation and continuing sluggish sales in the personal computer (PC) market? Let's see what the evidence reveals.

A smiling person on a laptop at a kitchen table while another person brews tea in the background.

Image source: Getty Images.

What has been weighing on Microsoft stock?

Part of Microsoft's resilience is the result of the diversity of the markets it serves, but a large portion of the company's business is still dependent on the PC market -- which continues to struggle as the result of macroeconomic conditions. In the fiscal 2023 third quarter, which ended March 31, Microsoft's personal-computing segment, which normally represents about one-third of the company's sales, declined 9% year over year to $13.3 billion, the third successive quarter of year-over-year declines. 

However, there are signs that the worst may be behind us. Global technology researcher Canalys believes the PC market bottomed out "at the start of 2023" and sees a "market recovery on the horizon," with the rebound beginning as soon as this quarter or next. 

Taking a step back, however, we can see that Microsoft's results illustrate the continuing strength of its offerings. Overall, revenue grew 7% year over year, and 10% when adjusting for changes in foreign currency translation. The bottom line did even better, increasing 10%, or 14% in constant currency.

What could drive Microsoft stock higher?

An expected recovery in the PC market aside, there are other catalysts that could help drive Microsoft stock even higher.

One of the company's biggest opportunities by far is cloud computing, led by Microsoft Azure. While it varies from quarter to quarter, Microsoft has consistently gained share of the worldwide cloud infrastructure market. To close out 2022, Azure controlled 23% of the market, up from 21% in the prior-year quarter, according to data from Synergy Research Group. Taking a step back reveals that its longer-term progress is even more impressive, increasing its share by nearly 11 percentage points over the past five years. Microsoft continues to enhance its cloud offerings, which suggests its market share gains could continue.

Microsoft has invested a whopping $13 billion in OpenAI and recently announced that ChatGPT is now available to preview through the Azure OpenAI service. This allows customers to use some of the most advanced AI models available, including "Dall-E 2, GPT-3.5, Codex, and other large language models." This move could help make Azure's cloud offerings even more attractive, accelerating its market share gains.

Furthermore, Microsoft has integrated ChatGPT into its search engine, Bing. The company has long struggled to make headway against Alphabet's Google, which consistently controls more than 90% of the market. The jury is still out on whether the inclusion of AI-fueled functionality will attract search users over the long term, but the incentive is clear. Management estimates that Microsoft could gain a $2 billion revenue opportunity for every 1% of market share it steals in search -- so even small market share gains could move the needle. 

How to approach Microsoft stock now

To be clear, Microsoft stock isn't going to appeal to every investing style. The stock is currently selling for 36 times trailing earnings and 12 times trailing sales. Given its lofty valuation, value investors are likely to take a pass. However, I offer that given the company's track record of consistent growth, that's a reasonable price. Not only that, but Microsoft is also expected to increase its revenue and earnings per share by double digits before the year is out and continuing into 2024. 

Given the company's clear catalysts and consistent track record of growth, Microsoft's rebound will probably accelerate as the economy recovers, which could be sooner than you might think.