One of the best-performing stocks over the past decade has been Mastercard (MA -0.13%). You might not think a large-cap, infrastructure-like stock could generate those types of returns, but a quick look at Mastercard's history as a public company reveals just that.

Though Mastercard traces its roots back to 1966, when a bank consortium formed Mastercard predecessor Interbank Card Association, it's only been a public company since 2006. Yet despite that relatively short time frame, investors in Mastercard's IPO have seen that investment grow many, many times over. But just how many times are we talking about?

A young man raises up his glasses above his head to look closer at his laptop screen.

Image source: Getty Images.

Just a $10,000 investment...

Mastercard went public on May 25, 2006, issuing a little less than half of its 135 million shares to the public at a price of $39 per share. The company raised $2.4 billion that day, at a total market capitalization of $5.3 billion.

Fast-forward to today, Mastercard has grown into a market cap of $344 billion -- a 65-fold increase over its 2006 size. But shareholders have done even better than that: Mastercard has also bought back a fair amount of its own stock over the past decade, meaning that existing shareholders own an increasing percentage of the business, without even having to buy more shares. In addition, Mastercard has paid a rising dividend to shareholders ever since going public as well.

If you had the foresight to realize Mastercard's vast growth potential due to consumers increasingly transitioning to electronic payments from cash, as well as Mastercard's entrenched status as the No. 2 payments network in a global oligopoly, and bet just $10,000 on the stock at the IPO, here's how much you would have made.

Almost $1 million

For $10,000, investors could have bought 256 shares of Mastercard at its IPO, and these shares would have turned into 2,560 shares as of Jan. 21, 2014, when Mastercard split its stock 10-for-1 -- its only stock split to date. Today, each Mastercard share is worth $340.96 each as of this writing, meaning that initial $10,000 investment back in 2006 would be worth $872,832 today!

And that figure doesn't even include dividends. Since 2006, Mastercard has also paid out $16,532.48 on those initial 256 shares. Increasing the total gains to $889,364.48 -- nearly 89 times an investor's initial investment in just 14 years.

How did Mastercard do it?

What was the key to realizing these massive investment gains? One, Mastercard has a big competitive advantage, along with rival Visa (V -0.10%), as one of only a couple of large-scale payments networks throughout the world outside of China. These two companies have consolidated a lot of the infrastructure trusted by merchants and banks alike to conduct bedrock functions of the digital economy. Thus, it would be incredibly difficult for newcomers to build a similar network and then garner the trust of customers and merchants alike. Given the scale of these two payments rivals, merchants everywhere also need to accept Visa and Mastercard or risk losing a sizable chunk of business. So, Mastercard and Visa alike benefit from significant network effects, meaning they grow more valuable to stakeholders as they grow bigger.

At the same time, both Mastercard and Visa have benefited from the growth in electronic payments as more of the world transitions away from cash. Though this seems like an inevitable transition, a surprising majority of the world's transactions are still made in cash today. As recently as 2017, over 80% of the world's transactions were still conducted with physical currency, according to Mastercard. Therefore, its electronic payments platform still has a large growth opportunity ahead of it, despite its impressive growth to date.

Finally, Mastercard has used its growing profits to cultivate new businesses through research and development and a slate of acquisitions, broadening the company's offerings into security, loyalty program management, data analytics, and consulting. These other sources of revenue are the fastest-growing parts of Mastercard today, accelerating 23% in 2019 versus 13% net revenue growth for the whole company. Not only do these services increase Mastercard's revenue, but they also make its core transaction processing network more attractive to issuer and acquiring banks alike.

It all adds up

Summing up, Mastercard's success has stemmed from having a leading, competitively advantaged business in an industry with huge long-term growth prospects, along with top management that has successfully expanded into adjacent categories, driving additional growth.

Investments with this combination of characteristics don't come along very often, but if you happen to come across a stock you think meets all three, don't be afraid to pile in. Personally, I think this sector is on its way to similar future riches alongside the payments networks, and may be worth your strong consideration as well.