One of the biggest barometers of the artificial intelligence (AI) revolution is Microsoft (MSFT 0.11%). The Windows developer kicked off AI mania following a sizable investment in OpenAI in January 2023.

OpenAI is the maker of ChatGPT, a popular large language model (LLM) capable of writing essays, producing software code, and even generating images based on text prompts.

Over the last year and a half, Microsoft has integrated ChatGPT's functionality across its ecosystem -- from workplace productivity tools, social media platforms, and cloud computing.

Microsoft recently reported earnings for its third quarter of fiscal 2024, ended March 31. There was a lot of optimism sprinkled throughout the earnings report, and advancements in AI were front and center.

Let's unpack Microsoft's results, and explore why this "Magnificent Seven" member is a great stock to own forever.

Microsoft's business is firing on all cylinders

Microsoft is an absolute behemoth. In addition to its main growth engine in Azure cloud computing services, the company also operates across gaming, social media, and personal computing.

For the three months ended March 31, Microsoft's revenue grew 17% year over year to $61.9 billion. As always, all eyes were on Azure -- and it didn't disappoint. Revenue from Microsoft Cloud clocked in at $35.1 billion, representing an increase of 23% year over year. Within the cloud segment, server products and cloud services were the main sources of growth.

MSFT Revenue (Quarterly) Chart

MSFT Revenue (Quarterly) data by YCharts

What makes Microsoft such a compelling business is that revenue and profits are both soaring. By expanding its margins, Microsoft has impressive financial flexibility. At the end of the quarter, the company held $80 billion of cash and equivalents on the balance sheet.

Microsoft is reinvesting its excess profits aggressively, and the company's newest generative AI application is already showing some encouraging signals.

An office worker using an AI chatbot.

Image source: Getty Images.

Copilot is a hidden gem

During the earnings call, Microsoft CEO Satya Nadella proudly told investors that "Microsoft Copilot and Copilot stack ... are orchestrating a new era of AI transformation."

Microsoft Copilot is a smart assistant that is becoming increasingly integrated throughout Microsoft's ecosystem. The underlying idea is that in just about every service Microsoft offers, more and more AI-powered features are becoming available. This is spurring a new wave of productivity across a number of use cases and market sectors for Microsoft users.

In fact, Microsoft has 30,000 Copilot users as of March 31 -- an increase of 175% quarter over quarter. Microsoft Copilot has penetrated approximately 60% of the Fortune 500 and boasts customers such as Nvidia, Novo Nordisk, and Amgen.

A premium valuation well worth the price

Microsoft currently trades at a forward price-to-earnings (P/E) of 35.6. This is above many of its megacap tech peers, and is much higher than the S&P 500's forward P/E of 20.7.

MSFT Total Return Price Chart

MSFT Total Return Price data by YCharts

The chart should shed some light as to why Microsoft stock trades at a premium. The analysis illustrates Microsoft's total return over a long-term horizon against a cohort of both megacap AI stocks and other large technology behemoths that were once considered some of the most innovative technology businesses.

Microsoft is the best-performing stock in this peer group. Moreover, considering the momentum the company is witnessing thanks to its AI ambitions, I think even further gains are on the horizon.

I think scooping up shares of Microsoft right now will be a good decision in the long run. The company has a proven history of generous shareholder returns, and has outperformed its competition by a hefty margin.

In a way, Microsoft echoes traits of a blue chip business, given its steady revenue growth and robust cash flow. And yet at the same time, the company is still very much in growth mode.

The combination of reliable top- and bottom-line growth, supplemented by a new wave of growth featuring AI, is an extremely rare combination. In my opinion, Microsoft has earned its premium valuation and is a stock that investors can hold forever.