Microsoft (MSFT 1.82%) is part of the "Magnificent Seven," a term first used by Bank of America analyst Michael Hartnett to describe seven massive tech-focused companies. Nvidia, Meta Platforms, and Amazon (which are also Magnificent Seven companies) have outperformed Microsoft so far this year. But Microsoft could be an even better buy going forward.

On March 14, Microsoft reached a new intraday all-time high of $427.82 and a new record closing high of $425.22 before pulling back the following day after Adobe's weak guidance sent ripple effects throughout the tech industry.

As the most valuable company in the world, Microsoft is the only company worth over $3 trillion, and its value alone now makes up a staggering 7.3% of the S&P 500 index, which is more than the entire materials, real estate, and utilities sectors combined!

Here's why the Magnificent Seven stock could have more room to run from here.

A person coding on a desktop computer.

Image source: Getty Images.

Hiding in plain sight

It's human nature to want a good deal, whether buying something on sale, taking advantage of a promotion, or scoring a low interest rate. Sell-offs in the stock market happen all the time, and investors who take advantage of those deals have historically done very well.

But so many investors miss out on gains during bull markets just because it is counterintuitive to buy a stock at a far higher price than it used to be. Often, the best stocks to buy are hiding in plain sight. Microsoft is perhaps the best example of this.

It became the largest U.S.-based company by market cap in the late 1990s, lost its position during the dot-com bust, regained it in the early 2000s, was surpassed by ExxonMobil, sold off heavily after the financial crisis of 2008, and didn't exceed its dot-com bubble high until 2017.

Microsoft was on the sidelines when acronyms like FANG for Facebook (now Meta Platforms), Amazon, Netflix, and Google (part of parent company Alphabet) emerged to highlight the market's hottest growth stocks. But it was growing the whole time, namely through cloud infrastructure. Microsoft was a lead investor in OpenAI. On top of that, its business was perfectly set up to monetize AI in the near term and the long term.

In 2017, investors were happy Microsoft had recovered its post-dot-com bust losses. But the stock is now up over five times from that peak and nearly 250% in the last five years alone. Microsoft had its periods of lackluster growth. But through it all, the company had the foundation to compound over time.

Even today, Microsoft's new all-time high stands out as one of the more deserving runs from a big growth stock.

Rapidly monetizing AI

On March 13, Microsoft announced Copilot for Security will be generally available worldwide on April 1, 2024. In its second-quarter fiscal 2024 earnings call, Microsoft said it had over 1 million Copilot for Security customers.

The cybersecurity solution uses AI to protect against unauthorized intrusions and could be particularly useful for protecting cloud infrastructure, enhancing Microsoft Azure, and fueling growth for Microsoft's Intelligent Cloud business segment. According to Microsoft, security professionals were 22% faster and 7% more accurate when using Copilot for Security.

Copilot for Security joins a growing list of Copilots -- including GitHub Copilot for developers, Copilot for Microsoft 365, DAX Copilot in healthcare, and other AI offerings like Azure AI and AI features for LinkedIn.

In a relatively short amount of time, Microsoft has successfully leveraged AI across its business-to-business and business-to-consumer sales channels -- accelerating growth in the process.

A rock-solid foundation

Microsoft's growth has been the main contributing factor to the stock's incredible run. But an often-overlooked part of the investment thesis is its capital return program and balance sheet.

Microsoft pays more dividends than any other U.S.-based company. Over the last three years, it has increased its dividend by over a third and reduced its overall share count despite its trailing-12-month stock-based compensation expense ballooning to over $10 billion.

MSFT Shares Outstanding Chart

MSFT Shares Outstanding data by YCharts

Microsoft uses stock-based compensation to attract top talent, but it's been a winning strategy. Microsoft is driving higher profits and can more than offset that expense with buybacks. This is a far different dynamic than companies that don't do buybacks and dilute their existing shareholders with stock-based compensation.

As for the balance sheet, the company finished Dec. 31, 2023 with $17.3 billion in cash and cash equivalents, $63.7 billion in short-term investments (namely government securities and bonds), $27 billion in short-term debt, and $44.9 billion in long-term debt.

Despite rapidly increasing its operating expenses and capital expenditures over the last few years (not to mention fueling buybacks and dividend growth), Microsoft still has less debt on its balance sheet than cash, equivalents, and short-term investments.

Separating a company from its stock price

If you were to glance at Microsoft, it's easy to say that the stock is overvalued and worth selling. An all-time high price paired with years of outsized gains makes it look ripe for a sell-off. The price-to-earnings (P/E) ratio is up to 37.7, which is well above its five-year median P/E of 32.1, and the 10-year median is less than 30. And the overall market has rallied nicely in 2024 after a massive run in 2023.

Despite all of this, Microsoft still isn't overvalued because of the quality and diversification of its business, market positioning, capital return program, balance sheet, and, most importantly, a clear and defined roadmap for monetizing AI for years to come.

Microsoft is a complicated business, but its strategy is fairly straightforward. It has many touchpoints with businesses and consumers, and it uses those touchpoints to see what is and isn't working with its products and services. Today, it is simply taking that strategy a step further with AI. It sounds fancy, but it's just about improving what Microsoft already does so well.

Microsoft isn't a cheap stock, but it has gone up for all the right reasons, giving investors confidence in its future performance and sustained strength in the broader market.