Source: Apple.

Apple (NASDAQ:AAPL) is going through a challenging phase. Shares of the iPhone maker are down by more than 20% from their highs of the last year due to fears about slowing growth in the middle term. The smartphone industry is maturing, and it makes sense to expect a deceleration in iPhone sales during the coming quarters.

On the other hand, slowing growth is already incorporated into Apple's current valuation, and the business is still generating massive amounts of cash. This means that Apple stock offers huge upside potential for investors in the long term. 

Apple's massive iCash flows
Apple owns tremendous brand power: the Forbes brand ranking considers Apple the most valuable brand in the word, with an estimated value of $145.3 billion. Brand differentiation, and a reputation for quality, allow the company to charge higher prices than the competition, and this is reflected in sky-high profit margins and huge cash flows for investors.

The business brought in $81.3 billion in operating cash flow during the fiscal year ended in September of 2015. This represents nearly 35% of revenue during the period. Importantly, operating cash flow jumped 36% versus the same period in the previous year.

Capital expenditures absorbed only $11.5 billion during the year, leaving Apple with $69.8 billion in free cash flow to reward investors with dividends and buybacks, among other possibilities. Management decided to allocate $11.6 billion to dividends and $35.3 billion to share buybacks last year, so capital distributions accounted for 67% of free cash flow. 

Share buybacks are creating considerable value for investors. A stock is simply a share in the ownership of a business, and it represents a claim on the company's assets and earnings. All else being the same, fewer shares outstanding means that each share is more valuable, because it represents a larger percentage of the company. 

Apple has reduced the number of shares outstanding by 15% in the last two years, so the company is aggressively putting its capital to work for the benefit of its shareholders. 

AAPL Shares Outstanding Chart

AAPL Shares Outstanding data by YCharts.

What this means for investors
Short-term uncertainty often can create buying opportunities for long-term investors, and this seems to be the case when it comes to Apple stock right now. Even if there is some kind of slowdown in growth in the middle term, the market seems to be overreacting to this possibility.

Apple is trading at a price-to-cash-flow ratio around 7.5. This is a significant discount versus the average company in the S&P 500 index, which trades at a price-to-cash-flow ratio in the neighborhood of 11.5, according to data from Morningstar. Because Apple is one of the most powerful and profitable corporations in the world, this valuation looks excessively low.

Apple is distributing tons of cash to investors, and this has big implications going forward. When considering both dividends and buybacks, Apple returned $46.9 billion in cash to investors during the last year. This represents a big payout yield -- dividends and buybacks over market capitalization value -- of nearly 8% for investors in Apple stock at current prices.

Multiple statistical studies have confirmed that companies paying big shareholder yields tend to significantly outperform the market in the long term. Among them, What Works on Wall Street is a great book by James O'Shaughnessy, and it takes a look at how different investment strategies have performed over the years from a quantitative point of view. 

According to O'Shaughnessy's calculations, companies with high shareholder yield returned 13.2% from 1926 to 2009, while a broader basket of average stocks returned 10.5% during the same period. A difference of 3% annually can sound like small potatoes; however, make no mistake -- it can make all the difference in the world over the long term. To put the numbers in perspective, this means that $10,000 invested in a broad basket of stocks would have turned into $38,542,780 over the period under analysis, while the same amount of money invested in high shareholder yield stocks would have turned into a materially bigger $298,363,138 by the end of the period.

In a nutshell, Apple could be facing slowing growth due to maturation in the smartphone industry. Nevertheless, the company produces tons of cash, and the stock is priced at aggressively low levels in comparison to Apple's cash flows and distributions. For investors who can withstand the short-term uncertainty, Apple looks like a buying opportunity over the long term.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.