Warren Buffett steered the Berkshire Hathaway investment company to market-beating returns since 1965. In fact, $1,000 invested in Berkshire stock when Buffett took over would be worth $37.8 million today. The same investment in the S&P 500 index would be worth just $247,080.

Buffett has a very public friendship with Bill Gates, the billionaire co-founder of Microsoft (MSFT 1.28%), which is now the world's second-largest company. Microsoft operates several businesses in software, hardware, gaming, cloud computing, and now, artificial intelligence (AI).

Since Microsoft came public in 1986, its stock gained a whopping 494,454%, and it continues to outperform the broader market even in 2023, despite the company's enormous size. This year, Wall Street has lumped the stock into a group called the "Magnificent Seven," which features some of the market's best-performing tech giants. It includes:

  1. Apple
  2. Microsoft
  3. Amazon
  4. Alphabet (Google)
  5. Meta Platforms (Facebook)
  6. Tesla
  7. Nvidia

All of those companies are heavily focused on growth, but Apple, Microsoft, and Nvidia also pay a dividend, with Microsoft offering the largest dividend yield.

Warren Buffett smiling, surrounded by cameras.

Image source: The Motley Fool.

Buffett has never owned Microsoft stock, and for a very good reason

Buffett is one of the world's best investors, and he loves to own stakes in companies with steady growth, strong profitability, great management, and a plan to return money to shareholders. Microsoft ticks all four boxes, so why hasn't he bought its stock?

Believe it or not, Buffett blames his own stupidity for not buying Microsoft stock years ago. However, the reason he hasn't jumped into the stock more recently is because of his friendship with Bill Gates. He is concerned about appearances; if Berkshire bought Microsoft stock and the company released good news shortly after, people might think Buffett was privy to inside information.

The Buffett-Gates friendship dates back to 1991, and the two billionaires are incredibly close. In fact, in 2006, Buffett pledged a whopping $30 billion of his fortune to the Bill and Melinda Gates Foundation.

But most investors don't have that (absolutely awesome) problem. Here's why Buffett's loss could be your gain going forward.

Microsoft is building a dominant presence in artificial intelligence

Amassing a $2.6 trillion valuation can only be achieved with a dedication to innovation. Microsoft doesn't stand still, and while it still develops its flagship Windows computer operating system (launched in 1985), it has expanded its horizons significantly.

Microsoft recently jumped into the emerging artificial intelligence industry with both feet. It made a $10 billion investment in ChatGPT developer OpenAI in January bringing its total investment since 2019 to $13 billion. The start-up's technology now powers Microsoft's AI ambitions across its entire product portfolio.

Microsoft has since released a ChatGPT-enabled version of its Bing internet search engine, and it also embedded the chatbot into Windows, the Edge internet browser, the 365 document suite, and the Azure cloud platform.

In the recent fiscal 2024 first quarter (ended September 30), the company said it had 18,000 business customers in its new Azure OpenAI Service segment, which allows cloud customers to leverage OpenAI's latest GPT-4 model to develop AI for their own purposes. By way of comparison, Microsoft had just 200 customers in the segment at the beginning of calendar 2023.

AI will have the potential to significantly increase the productivity of almost every business over the long term, and Microsoft positioned itself as a key distributor of the technology. It could create a major financial opportunity for the company and its investors.

Microsoft is the best dividend stock in the Magnificent Seven

Microsoft is a highly profitable company. It generated an impressive $77.1 billion in net income over the last four quarters, which is equivalent to $10.33 in earnings per share. Microsoft is raking in more cash than it can possibly reinvest back into the business, so it's returning a portion of the money to shareholders instead.

Over the last four quarters, the company paid $20.7 billion in dividends to its investors, which is equivalent to $2.79 per share. While that only translates to an annual yield of 0.8%, it's much higher than other Magnificent Seven dividend payers Apple (0.5%) and Nvidia (0.04%). Plus, don't forget, Microsoft delivered tremendous capital growth since coming public 37 years ago.

The company is also returning money to shareholders through a share buyback program. It has repurchased $17.3 billion worth of its own stock over the last four quarters, shrinking the number of Microsoft shares in circulation to organically lift their price.

Why Microsoft stock is a buy now

Based on Microsoft's $10.33 in trailing 12-month earnings, and its current stock price, it trades at a price-to-earnings (P/E) ratio of 35. That's actually more expensive than the 29.6 P/E ratio of the Nasdaq-100 index, which is a good barometer for the average valuation of big tech companies.

It's likely another reason Buffett won't buy Microsoft stock today (he likes a bargain). After all, Gates is no longer its CEO, nor is he on its board of directors.

But for the average long-term investor, having Microsoft in your portfolio makes a lot of sense. Artificial intelligence will likely be a trillion-dollar opportunity for the company eventually. In fact, depending on which Wall Street forecast you rely upon, it could add somewhere between $7 trillion and $200 trillion to the global economy over the next decade.

Given Microsoft is a leader in the industry, and is one of just a few companies already monetizing the technology, it stands to capture a substantial amount of market share as AI adoption grows. In other words, investors have priced its stock at a premium to the broader market for a reason.

So, this might be the one and only time investors shouldn't follow Buffett's lead.