When you're investing, you should always do so with a long-term mindset. People don't always want to hear this, but it's about gradually building wealth over time, not searching for a get-rich-quick scheme. It's easier said than done, but one of the best ways to do it is to hold onto great companies for the long haul.
One of my longest holdings is Microsoft (MSFT +0.43%), which I bought just over 10 years ago. It's been a lucrative rollercoaster ride, and despite its underperformance this year, it's a stock I haven't even considered selling.
My reason? It's the tech sector's Swiss Army knife.

NASDAQ: MSFT
Key Data Points
Microsoft has its hands in many jars
Few companies are as diversified as Microsoft, especially in the tech world. It has a strong case for being the most diversified tech company in the world, with tons of software and hardware, the world's second-largest cloud platform (Azure), Xbox, LinkedIn, and more.
Over a billion people use various Microsoft products and services, making it one of the most relied-upon tech companies in the world. That doesn't guarantee success, but it's one of the surest ways to accomplish sustained success, which Microsoft has shown us.
The number of users Microsoft has matters, but I like looking closer at how many of those users are other businesses. Microsoft is extremely important to the global business world. And when companies hit rough times, you can bet they'll cut many expenses before cutting enterprise software like Microsoft 365 (Excel, Teams, Outlook, etc.), Azure, or Windows.
Microsoft is a certified cash machine
It's not all that matters in every situation, but I have always preferred cash machines. Microsoft easily checks that box.
In its fiscal year 2026 (ended June 30), it made $331.8 billion in revenue, $155.2 billion in operating income (profit from its core businesses), and $133.7 billion in net income. Year over year (YoY), those were up 18%, 21%, and 31%, respectively. Over the past decade, all three have grown impressively for a company of Microsoft's size.
MSFT Revenue (Annual) data by YCharts
The financial flexibility Microsoft has, given how much money it makes, allows it to pay dividends, buy back shares, and reinvest in the company to keep growing and keep up with the rapidly changing tech world. It has consistently done so, too.
Microsoft has increased its annual dividend for 21 straight years and spent $22.3 billion on share repurchases and $145 billion on capital expenditures in the past fiscal year.
AI spending is being put to good use
There were many concerns at the beginning of this year about Microsoft's AI spending plans, but my stance was that, with as much money as Microsoft has and makes, it's better to overspend to ensure you keep up with the AI arms race than underspend and risk falling behind in what many are considering one of the most important tech revolutions since the internet.
Microsoft has spent a lot, no doubt ($41 billion in the latest quarter, up 70% YoY), but its recent earnings show a much clearer return on investment than investors may have expected earlier in the year. It's why its stock is up over 23% since reporting its latest earnings (as of Aug. 20).
Image source: The Motley Fool.
One of the best ways to measure the return on investment from AI spending is to look at cloud and Azure performance, since that's where businesses invest in AI tools. This fiscal year, Azure reached $100 billion in revenue for the first time, total Microsoft Cloud revenue increased 27% YoY to $214 billion, and its backlog grew 84% YoY to $678 billion.
How the AI boom eventually pans out remains to be seen, but one thing is for sure: Microsoft's business is built to thrive with or without the AI windfall. That's why it's one of my largest holdings, and why I don't plan to sell a single Microsoft share for the foreseeable future.






