Undoubtedly, technology giant Apple (AAPL -1.67%) has created life-changing wealth for countless investors. All you had to do was be fortunate enough to hold the stock for a stretch of the stock's 143,000% lifetime total returns. But today, the company has a $2.3 trillion market capitalization, so it's far too large to see returns that high moving forward.

But don't make the mistake of doubting Apple's wealth-building prowess. The stock might be past its golden years, but there is plenty of juice to squeeze for long-term investors. Here is how Apple can still help you build a diversified million-dollar portfolio -- it just might take a bit longer. Let's dive in.

Apple found its golden goose

Steve Jobs co-founded Apple in 1976, but it wasn't until the company invented the iPhone some 31 years later that the company's trajectory shot into the stratosphere. Today, the iPhone is Apple's core product, surrounded by an ecosystem of apps and subscription services generating ancillary revenue.

You can see below that Apple keeps growing its revenue, and its margins are increasing too. That's a fantastic combination for investors, seeing Apple throw off $111 billion in cash profits over the past four quarters, more than most companies do in sales.

AAPL Free Cash Flow Chart.

AAPL Free Cash Flow data by YCharts.

Many of its customers are locked into the ecosystem, upgrading their phones every so often, and generating monthly sales through Apple Music and Apple News, among several other services you can choose. Smartphones have become a staple in society, and Apple's business will likely thrive until that changes. 

Putting all of that cash to use

Shareholders benefit when a business generates so much profit that it doesn't need it all; that typically means it finds its way into your pockets. Apple gives back to investors through a dividend and share repurchases. Apple has raised its dividend for 10 consecutive years. However, the company emphasizes buying back its stock, spending a staggering $89 billion over the past year alone on the cause:

AAPL Stock Buybacks (TTM) Chart.

AAPL Stock Buybacks (TTM) data by YCharts.

A company buying back stock helps grow earnings per share (EPS) because profits are spread across fewer shares. Higher EPS helps support the stock price, further benefiting shareholders. Apple has taken its share count from over 26 billion to less than 16 billion over the past decade, helping it grow EPS despite its massive size.

What does the math look like?

So how can Apple stock help you become a millionaire? Its dominant business and forward-looking growth make it an excellent pick for inclusion in a diversified portfolio. Apple's massive cash flows should continue fueling share repurchases moving forward. Ironically, investors should celebrate a bear market because a lower share price means that Apple is retiring more shares for its money.

As a result, analysts expect Apple's EPS to grow by an average of 12.5% annually over the next three to five years. If the stock's valuation remains constant, the share price will double after approximately six years if these growth estimates are accurate. It's possible that the share price can grow faster than the stock's market cap because Apple is constantly lowering the number of outstanding shares.

Apple may need to continue innovating to keep its pace over the longer term. Still, unless something dramatic happens, Apple's cash cow business seems remarkably intact for the foreseeable future. The company's rare combination of size and profitability means the stock can still help you generate wealth if you give it enough time.