Microsoft (MSFT 1.44%) should be a sure-fire Warren Buffett stock. It has a wide moat, excellent fundamentals, and investors have come to expect a great deal of consistency from the business over the years. It's the type of investment you would expect to see in the billionaire investor's portfolio.

But despite all these reasons, it's still not a Berkshire Hathaway holding. Here's a closer look at why that is.

Buffett admits to making multiple mistakes on tech

Buffett likes to invest in companies that he knows well. But unlike insurance and banking, technology is not something that he's all that comfortable investing in, simply due to the unpredictability of it. He says the reason he didn't invest in Microsoft years ago was simply due to "stupidity." 

He gave a similar reason for why he didn't buy Amazon stock earlier, either, saying that he was "too dumb to realize" the opportunity and underestimated Jeff Bezos. And while he was a customer of Google's, not investing in Alphabet is another mistake he admits making. 

The problem with tech is that along with some big winners, there are also many losers, with the dot-com bubble being proof of that. But while Amazon is now in Berkshire's portfolio (accounting for a very modest 0.4%), Microsoft still isn't -- and might not be, at least as long as Buffett is running things.

Why Microsoft isn't in Berkshire's portfolio

Microsoft is a robust business that continues to have many growth opportunities and remains a great long-term buy. It's up 38% this year, and if its pending acquisition of video game maker Activision Blizzard goes through, it could soon have another promising growth avenue to pursue. 

The problem for Buffett isn't related to tech or to valuation, but instead, to his friendship with Microsoft co-founder Bill Gates. The two worked together on multiple projects, and Buffett previously said he would be concerned how it might look if the company had a good earnings report after investing in the business.

"It just would be a mistake for Berkshire to buy Microsoft," he says, because it all comes down to appearances, and not putting the potential investment in a bad light. "There'd be a lot of people who wouldn't believe us if something good immediately happened after we bought it."

Even though Gates is no longer the CEO of Microsoft or even on its board of directors as of 2020, Berkshire hasn't added the tech stock to its portfolio.

With Gates no longer involved at Microsoft, the friendship shouldn't pose an issue anymore. But it's worth noting that there are many other quality, Buffett-type stocks that might be suitable for Berkshire's portfolio that aren't in there, either. And it could simply come down to valuation at this point, with these top tech stocks commanding incredibly high prices. Amazon, for example, is in Berkshire's portfolio today, but it's a relatively minor holding.

Is it too late to invest in Microsoft?

Other investors might also be hesitant to buy Microsoft's stock these days. At around $2.5 trillion, it is trading at 34 times its earnings -- that might be a bit rich for a company that generated 8% revenue growth in its most recent earnings report (for the period ending June 30).

And although there are growth opportunities still out there for the business in both artificial intelligence and gaming, there could be better, more attractive options for growth investors to pursue right now.

Microsoft's stock might look overpriced today, but given the company's wide moat and continued growth opportunities, it can still be an excellent investment if you're planning to hold for not just years but potentially decades. It's an ideal stock to buy and forget about because the business remains rock solid, and it's likely to stay that way for the foreseeable future.

And whether it's in Berkshire's portfolio or not, this is definitely a Buffett-type stock.