Microsoft (MSFT 1.82%) stock has been on a tear, gaining 50% over the past year as it comes within striking distance of a new all-time high. The company is reaping the rewards of its early pivot to embrace artificial intelligence (AI), a move that's expected to pay dividends for years to come.

Wedbush analyst Dan Ives recently maintained a buy rating on the stock and boosted his price target to $500 -- up from $475. The latest price target is 19% higher than Tuesday's closing price. There's one key reason analysts and investors alike should be bullish on Microsoft stock.

Why buy Microsoft stock?

While many businesses are talking about AI, Microsoft is actually doing something about it. The company has integrated AI tools across a great many of its products and services. In Microsoft's fiscal 2024 second quarter (ended Dec. 31), the company grew revenue 18% year over year to $62 billion.

A major driver of that growth, according to Ives, is the rapid adoption of Copilot, the company's AI-powered suite of digital assistants. "We strongly view this as Microsoft's 'iPhone Moment'," the analyst wrote. He went on to say that "AI [is] set to change [Microsoft's] cloud growth trajectory" for years to come.

There's evidence to suggest this is already happening. Azure has been the fastest-growing of the "Big Three" cloud providers for two consecutive quarters, outpacing Alphabet's Google Cloud and Amazon Web Services (AWS), suggesting Microsoft is taking market share from the competition.

Beyond the AI opportunity, Microsoft has demonstrated a consistent ability to invest in future growth and increase sales while keeping a watchful eye on the bottom line. Second-quarter gross margin expanded 151 basis points from the year-ago period, and net income surged 33% year over year.

That's why Wall Street is firmly behind Microsoft. Of the 55 analysts that rated the stock in February, 93% rated it a buy or strong buy, while none recommended selling.

Microsoft's ability to lean into AI while maintaining its focus on profitability is why the stock could continue to reach new heights.