If you had invested $100,000 in Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) 20 years ago, you'd have over $715,000 today. That's a great return. And it's one that has made Warren Buffett much wealthier than he already was.

But what if your goal is to become a millionaire within the next two decades? Berkshire Hathaway might not be your best vehicle to achieve that goal. Here's the one Buffett stock most likely to turn $100,000 into $1 million over the next 20 years, in my view.

Strong contenders

Probably the most important question we should ask is: What's it going to take? The short answer to that question is a compound annual growth rate of roughly 12.2%.

Quite frankly, many of the stocks in Buffett's Berkshire Hathaway portfolio are unlikely to deliver that kind of growth. However, there are a few strong contenders that I could envision pulling it off.

For example, BYD should have a massive growth opportunity selling electric vehicles in China. It's a similar story with Nu Holdings in providing digital banking services to customers in Latin America.

Floor & Decor is another possibility here in the U.S. The specialty retailer of flooring and related products could benefit from the housing boom. There's also data cloud company Snowflake. It certainly seems to be on track to deliver explosive growth.

There's one major wrinkle, though, in my opinion. Twenty years is a long time. A lot could happen to derail these rising stars. In particular, all of the companies face stiff competition.

The standouts

I'd feel more comfortable investing such a large amount of money in a company with a clear and compelling competitive advantage. I'd also really prefer that the company has a rock-solid track record of success over the last 20 years.

Several stocks in Berkshire's portfolio check off both boxes. There are two Buffett stocks, though, that especially stand out: Mastercard (MA 0.07%) and Visa (V -0.23%).

Few companies enjoy the business moat that Mastercard and Visa have. Some quibble with saying that the financial services giants have a duopoly in processing credit card payments. However, it's indisputable that Mastercard and Visa command a huge share of a growing market. 

If I had to choose between these two Buffett stocks, I'd go with Mastercard. Why? Wall Street projects that Mastercard will grow faster than Visa over the next five years. I suspect this trend will continue beyond that period.

How Mastercard could 10x in 20 years

It's not all that hard to envision how Mastercard could deliver a 10x gain in 20 years. For one thing, the company stands to benefit from major tailwinds including the increasing popularity of digital payments and the growth of e-commerce. 

I also expect emerging markets in Africa and Asia will expand tremendously over the next two decades. Growing middle classes in these regions should fuel a huge increase in electronic payments.

Mastercard is also a leading technology innovator. For example, it recently launched a new solution to help businesses process virtual card payments. Virtual cards have picked up significant traction in business-to-business payments. 

We can't forget how artificial intelligence (AI) could benefit Mastercard, either. The company already uses AI to prevent fraud. In 2017, it acquired Brighterion, a technology company that won Business Intelligence Group's Artificial Intelligence Excellence Award in both 2022 and 2023. I look for Mastercard's operational efficiency (and therefore, its profitability) to increase dramatically thanks to AI.

Finally, Mastercard has already proven that it can turn $100,000 into $1 million over a 20-year period. Actually, over the last two decades, the stock would have increased an initial $100,000 investment into more than $9 million. I don't expect that kind of return over the next 20 years. But Mastercard doesn't have to reach that level to achieve our stated goal.