It wasn't all that long ago that no company on the planet claimed a market cap of $1 trillion. Thanks to the booming stock market over the last couple of years, though, there are now five companies with market caps of at least $1 trillion.

That number seems likely to increase over the next few years. And some of the stocks that could be on the way to break the 13-figure threshold look like smart investment picks right now. Here are three stocks to buy that could join the $1 trillion club. 

A person pointing at a chalkboard drawing of a light bulb surrounded by money.

Image source: Getty Images.

Berkshire Hathaway

Warren Buffett's Berkshire Hathaway (BRK.A -1.05%) (BRK.B -0.83%) stands out as one company that might not be too far away from joining the group of tech giants with massive market caps. Berkshire's market cap is currently close to $650 billion. If the stock delivers similar growth to what it's done over the last five years, Berkshire will be worth more than $1 trillion before the end of 2026.

Berkshire already has close ties to the $1 trillion club. It owns a huge stake in Apple, the biggest company in the world. Berkshire also holds a smaller position in the fourth-largest company, Amazon.com

Those investments, along with others, present one compelling reason why Berkshire should grow significantly itself. The big conglomerate owns shares of over 40 publicly traded companies. It also has a massive cash stockpile of more than $140 billion that it can use to scoop up more stocks when prices are attractive.

Berkshire's core businesses keep humming along as well. Its insurance unit generates a strong cash flow that Berkshire can invest. The company's Burlington Northern Santa Fe railroad should win as the economy continues to recover from the COVID-19 pandemic.

Johnson & Johnson

Johnson & Johnson (JNJ -2.13%) is another stock that Berkshire owns. It's also another company that could reach a $1 trillion market cap in the not-too-distant future. J&J's market cap currently tops $470 billion. 

To be sure, Johnson & Johnson isn't likely to deliver jaw-dropping growth. However, the company has several solid growth drivers, notably including blood cancer drug Darzalex and autoimmune disease drugs Stelara and Tremfya. 

J&J also continues to invest in research and strategic acquisitions that could position it for stronger growth in the future. One-fourth of the company's total revenue comes from products launched within the last five years.

Don't overlook the importance of J&J's dividend in its total return. The company ranks as a Dividend King with 59 consecutive years of dividend increases. Its dividend yield stands at nearly 2.4%. Over the last five years, J&J's reinvested dividends accounted for roughly 30% of its total return.

Nvidia 

Nvidia (NVDA 1.64%) just might be the first of these three stocks to join the $1 trillion club. Its market cap of almost $520 billion is lower than Berkshire's. However, Nvidia is growing at a much faster pace.

I expect that Nvidia's fantastic momentum will continue. The company's graphics processing units (GPUs) should enjoy sustained demand as gaming applications require more power. 

Artificial intelligence (AI) could become a much larger market for Nvidia as well. The company already generates significant revenue with data centers using its GPUs. Its AI-powered autonomous driving platform is being used in new robotaxis and self-driving trucks.

Perhaps the biggest long-term opportunity for Nvidia, though, is the metaverse. The company is building its part of the metaverse -- Omniverse. CEO Jensen Huang said in Nvidia's second-quarter conference call that he thinks the metaverse will "be a new economy that is larger than our current economy."  If he's right, Nvidia's market cap could eventually become a lot bigger than $1 trillion.