Berkshire Hathaway, the sprawling conglomerate that has its hands in various industries, also owns a massive equities portfolio. Given this business is led by the legendary Warren Buffett, it's no surprise that individual investors look at its numerous holdings for investing ideas.

The top positions might get a lot of attention, but it's best not to ignore a company like Mastercard (MA 0.07%), which currently makes up just 0.5% of the $367 billion stock portfolio. This tiny stake might make the financial stock go underappreciated among investors.

But can Mastercard shares double your money over the next five years? I think it's a possibility, but there's one key deciding factor.

Hard to find any faults

Mastercard had its initial public offering in 2006 at an opening price of $3.90 (adjusted for stock splits). Since then, shares have skyrocketed almost 12,000%, crushing the gains of both the S&P 500 and the Nasdaq Composite by insanely wide margins.

This has been a huge winner in the past thanks to its remarkable fundamental performance. Between 2013 and 2023, revenue and diluted earnings per share (EPS) increased at compound annual rates of 11.7% and 16.6%, respectively. And during this stretch, payment volume soared from $4.1 trillion to $9 trillion last year.

Because Mastercard provides the underlying technological infrastructure that allows for card transactions to be processed between consumers (and their banks) and merchants (and their banks), it has benefited from the ongoing secular trend away from cash and paper-based payments. Helping the company's growth is the globalization of commerce, as well as the rise of online shopping. Even though more developed economies, like the U.S. and countries in Western Europe, have deeper penetration of digital payments, there are still sizable opportunities to expand in emerging markets.

Having a wide economic moat has protected Mastercard's competitive position in the past, particularly from the threat of disruption. And it will continue doing so as we look out five years from now.

This is due to the company's powerful network effects. With billions of its cards accepted at tens of millions of merchant locations worldwide, Mastercard's scale gives it a huge advantage. And as the payments network gets larger, with more cards and places to spend, it continuously becomes more valuable to all stakeholders. This setup means it's virtually impossible to create a competing network from scratch.

Unlike its banking peers, Mastercard doesn't lend money to borrowers. This has made the business incredibly profitable. It reported an operating margin of 55.8% last year, generating $11 billion of free cash flow that is used to fund dividends and share buybacks.

Valuation plays a big role

From a quality perspective, it's difficult to find many companies that are superior to Mastercard. But in order to assess if the stock can double, it's important to consider the current valuation.

Shares trade at a price-to-earnings (P/E) ratio of 38.4, which is cheaper than their trailing-five-year average, but just slightly more expensive than the past 10-year average. Therefore, it might be reasonable to assume that the stock is fairly valued today.

Some bearish investors can argue that shares are overvalued right now. But given the positive attributes I outlined above, it's easy to believe that Mastercard will always carry what looks like a premium valuation.

Assuming diluted EPS can rise at an annualized pace of 15%, a slower rate than what it has produced in the last five years, then shares will likely double by 2029 if the current P/E multiple remains the same. While nothing is certain, I believe this outcome has a good shot at becoming a reality.