Microsoft (MSFT 2.08%) has rallied investors this year, with its stock up almost 30% since Jan. 1. The company has made Wall Street bullish with its developing venture into artificial intelligence (AI), a technology with the potential to enhance countless industries in the coming years.

Thanks to potent brands like Office, Windows, Azure, and Xbox, the company's stock is already a compelling investment. However, AI has further boosted its outlook, making now an excellent time to learn more about this tech giant. 

Here are three things about Microsoft that smart investors know. 

1. Vast potential in AI

Microsoft landed a massive win in 2019 by investing $1 billion in OpenAI, a company that stunned the tech world last November with its launch of ChatGPT. The success of the advanced chatbot has kicked off an AI race among the biggest names in tech and prompted Microsoft to invest a further $10 billion in OpenAI.

The lucrative partnership has given Microsoft a major advantage in the market, allowing it to integrate the start-up's technology across several of its homegrown services. Platforms such as its Office productivity suite, cloud service Azure, and search engine Bing have all had the AI treatment. In doing so, Microsoft has increased its chance of becoming the go-to for consumers and businesses looking for AI services. 

Moreover, the company's cloud platform Azure could climb to the top of the market thanks to AI. Investment manager Richard Bernstein said this month he expects Microsoft's cloud revenue to more than double as it expands its AI offerings. Azure held the second-largest cloud market share at 23% in the first quarter of 2023, just behind Amazon Web Services' 32%. However, Microsoft could surpass the competition in the coming years as it continues to lead in artificial intelligence. 

2. Growing dominance in gaming 

In addition to AI and cloud computing, Microsoft has made major headway in gaming. Its Xbox brand has made the tech giant the fourth-largest games company in the world, behind Tencent, Sony, and Apple. However, Microsoft is making moves to grow its position in the sector.

The company's game subscription service Xbox Game Pass launched in 2017 and has changed how millions of players consume games. Game Pass offers consumers access to an extensive library of games for a low monthly fee, eliminating the need to purchase games individually. One of the service's biggest selling points is that it adds Microsoft-developed games from launch day on the platform. As the company has acquired bigger and bigger studios, Game Pass has attracted more subscribers with hit titles and increased the value of the Xbox console compared to competitors like Sony's PlayStation 5. 

From 2020 to 2022, Xbox Game Pass members soared 150%. Recent macroeconomic headwinds have hurt Microsoft's games business over the last year. However, Game Pass continued to grow in the third quarter of 2023 (ending March 2023), with revenue from the service rising 3% year over year.

3. Analyst consensus says buy Microsoft stock 

Microsoft shares have climbed 216% in the last five years and 840% over the last decade. The company's past growth makes it one of the most reliable investments out there, with its growing positions in different aspects of tech likely to keep it expanding for decades. 

Analysts seem to agree about Microsoft's potential, as 44 out of 51 have given the company a buy/strong buy rating. Meanwhile, its average 12-month price target of $330 projects stock growth of about 7%. While not stellar, the forecast growth aligns with the company's position as an excellent long-term buy. It's a stock you can buy and hold indefinitely with the confidence that it will likely soar over the decade.

Microsoft is home to a number of potent brands, with its developing roles in AI, the cloud market, and gaming making its stock a no-brainer buy right now.