Stocks can help you retire rich. Not as in "get rich quick," but steady compounders that slowly and surely make you money for decades. Those companies are challenging to find. To help in your search, know that technology giant Microsoft (MSFT 0.22%) is one of them.

How do I know? Well, past performance does provide some indication (although it's no guarantee of future performance). A $10,000 investment made in Microsoft in 1986 would be worth over $70 million today.

Naturally, such strong past results beg the question: Is there juice left to squeeze from this stock?

Here is why Microsoft can still, despite its massive size and success, help you retire a millionaire.

Microsoft is well positioned for the AI frontier

Microsoft sustained success over decades by squarely inserting itself into every significant technology breakthrough, ranging from enterprise software with Windows and Microsoft Office to cloud computing and now artificial intelligence (AI). Research by PricewaterhouseCoopers estimates that AI will create over $15 trillion in economic value by the decade's end. Microsoft has clear early competitive advantages in capturing its share of that added value.

For starters, Microsoft has a financial relationship with OpenAI, the AI developer that created ChatGPT. Among the terms of their partnership is the requirement that OpenAI's computing needs run through Azure, Microsoft's cloud platform. This could funnel a lot of cloud activity to Microsoft as AI grows.

Additionally, Microsoft is already a data center powerhouse thanks to its Azure business. The company has an estimated 160 data centers across 60 regions worldwide, a global network of computing power that can take on the demanding workload that AI has and will create in the future.

Durable financial growth

Plus, it's not like Microsoft is a one-trick AI pony. The potential upside of AI is the icing on the cake. Azure is already the world's second-largest cloud platform behind Amazon's AWS. The Windows and Office software ecosystem that built the modern Microsoft is still arguably as dominant today as it was two decades ago.

Do you want a years-long growth track record? Just feast your eyes below:

MSFT Revenue (TTM) Chart

MSFT Revenue (TTM) data by YCharts

Now approaching a quarter-trillion in annual revenue, Microsoft may eventually struggle to continue increasing in size. However, the business is so profitable that it could easily drive per-share metrics higher for the foreseeable future (more on that below). Analysts still peg Microsoft to grow earnings by an average of 16% annually over the next three to five years.

Billions in cash flow should flow to shareholders

Microsoft could flex its muscles to shareholders in the per-share financials. The company is raking over $70 billion in annual free cash flow. Free cash flow accounts for capital spending, so that's all discretionary cash that can go to shareholders or the balance sheet.

MSFT Free Cash Flow Chart

MSFT Free Cash Flow data by YCharts

You can see that Microsoft has augmented per-share earnings by aggressively retiring stock for years. Additionally, Microsoft has paid a dividend and increased it for 22 consecutive years. Despite the increases, the payout is only 30% of Microsoft's cash flow, which gives management plenty of financial flexibility.

Here's the bottom line

Microsoft's anticipated mid-teens-percentage earnings growth outlook strongly indicates solid investment returns ahead. At that rate, Microsoft's earnings would double every four to five years, pushing the share price higher, even if some air comes from the stock's valuation.

Unless Microsoft's business dries up, it's hard to see this recipe of share repurchases and dividend growth failing for the foreseeable future. The stock's market cap may not grow as fast, but per-share financials look poised to carry the onus of generating investment results.

Microsoft's massive size and trajectory are what you get when a stellar company finds its way into several massive markets and remains on top for prolonged periods. AI looks like the next chapter in Microsoft's great story, which bodes well for aspiring millionaire investors. It may not get investors there all on its own, but it will help.