Microsoft (MSFT 1.44%) is a big-time winner so far in 2023. Share prices are up 35% since January, largely on investor excitement over artificial intelligence and OpenAI's ChatGPT, which Microsoft is partnered with.

After the stock's price pullback over the past month, investors might wonder whether it's a buying opportunity before heading higher or if the tide is turning and the stock could soon head lower. Unfortunately, nobody knows. The market can be irrational in the short term.

However, investors can look at Microsoft's fundamentals and the stock's valuation to gauge whether shares are attractive for long-term investors. That's the more exciting story anyway, so let's jump in.

AI is a legitimate growth catalyst for Azure

Artificial intelligence became a Wall Street sensation earlier this year when the popularity of conversational AI app ChatGPT exploded. Until Meta Platforms launched Threads a few months later, ChatGPT was the fastest-growing app in history. Microsoft is a direct beneficiary of ChatGPT's success and that of its parent company OpenAI because the two companies have partnered since 2019.

Microsoft's Azure cloud platform is the exclusive vendor for all OpenAI workloads across research, products, and APIs. In other words, if an app or site uses ChatGPT or any other OpenAI technology, Azure is the cloud platform underneath it. That's huge, considering ChatGPT alone has roughly 100 million users today.

The long-term looks bright too. According to estimates by research firm Grand View Research, AI-related cloud spending, which was approximately $45 billion globally in 2022, could grow by an average of 39% annually through the rest of the decade. Microsoft's existing presence as the second-leading cloud platform and ties to OpenAI should translate to growth for Azure moving forward.

Can Activision Blizzard provide a spark?

Microsoft has been in the gaming industry for many years, mainly through its PC gaming and Xbox console businesses. Grand View Research believes the gaming industry could potentially grow to more than $500 billion by 2030, a 10% growth rate over the remainder of this decade. But Microsoft is lagging the market; gaming revenue was up just 1% year over year in the company's quarter ending June 30.

To help spark its gaming business, Microsoft struck a deal to acquire the game studio conglomerate Activision Blizzard for $69 billion. The acquisition has been working through regulatory approval since early last year. Only a couple of countries are left to approve the deal before the company can work toward closing.

Absorbing Activision Blizzard will give Microsoft ownership of some of the largest and most established gaming franchises, including Call of Duty and World of Warcraft. Microsoft and investors alike hope this massive boost in intellectual property will lift other aspects of Microsoft's gaming division, like Xbox and PC sales and its game streaming service Xbox Game Pass.

What might growth look like in the numbers, and is Microsoft stock a buy?

Investors must wait to see how these potential catalysts play out, but analysts are generally optimistic about Microsoft's future. The company is expected to grow earnings per share (EPS) by more than 12% annually for the next three to five years.

The stock trades at a forward P/E of 29, a premium to the market, but that could be deserved. Microsoft's growth outlook is greater than the market's historical average. Additionally, Microsoft is one of two public companies with a AAA credit rating from Standard & Poor's. In other words, you get above-market growth from a company you can invest in, and you can sleep well at night.

But quality often doesn't come cheap, and Microsoft's valuation could stunt short-term investment returns if the broader market becomes more volatile. Investors should approach cautiously; consider buying a small position now and add slowly over time, looking for better opportunities to buy more. You have more leeway if you're a long-term investor with plans to hold your shares for at least five years.