Tech rules. There are currently only five companies that list their shares on U.S. stock exchanges with market caps of at least $1 trillion. Four of the five are squarely in the technology sector. Some lump Amazon into the consumer cyclical sector. But at its core, Amazon is all about technology.

Two other stocks with technology credentials are knocking at the door along with the big five. Meta Platforms' (META 0.43%) market cap stands close to $810 billion, while Tesla (TSLA -1.11%) is even closer with a market cap of $915 billion.

But there's a decidedly non-tech contender that's practically nipping at their heels. Could Warren Buffett's Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) beat Meta and Tesla in joining the $1 trillion club?

A tall task

There are admittedly some factors that could stack the odds against Berkshire. The obvious one is that the stock has a lot more growth required to reach $1 trillion than Meta or Tesla.

That's especially the case for Tesla. The electric vehicle (EV) stock only needs to rise another 9% or so to hit the threshold market cap. Meta would need a gain of more than 23%. Berkshire requires a much steeper climb of nearly 32%. 

The current momentum of all of these stocks also doesn't bode well for Berkshire. So far in 2023, Berkshire's shares have risen a little over 10%. That pales in comparison to Meta's jaw-dropping gain of more than 160% and Tesla's jump of close to 140%.

AI stocks are sizzling hot. Meta and Tesla, like all of the other companies already in the $1 trillion club, have solid AI credentials. Berkshire doesn't.

How Berkshire could leap ahead

Don't think it's a foregone conclusion that Meta and/or Tesla will reach $1 trillion before Berkshire does, though. There's at least one scenario where Buffett's company could leap ahead.

Meta and Tesla stocks perform best in a "risk-on" environment. However, investors are more comfortable owning Berkshire Hathaway than growth stocks during market downturns. Should the stock market tank, it's likely that Meta and Tesla will be hit much harder than Berkshire will.

That's exactly what happened during the big sell-off last year. If we start the clock at the beginning of 2022, Berkshire is handily outperforming both Meta and Tesla.

BRK.B Chart

BRK.B data by YCharts.

So what's the most likely scenario in which Berkshire joins the $1 trillion club before Meta and Tesla do? One where the stock market crashes and then slowly recovers.

The necessary ingredients

If we were to create a recipe for this scenario, the ingredients would likely include an overvalued stock market and a sudden, sharp economic downturn. The first ingredient is already on the kitchen counter.

The S&P 500 is more expensive than it was prior to the dot-com bubble bursting based on Buffett's favorite market-valuation metric. Meta's shares trade at a forward price-to-earnings (P/E) ratio of nearly 26 times -- not exactly cheap. Tesla's forward-earnings multiple is a whopping 85.5 times.

However, fears of a recession appear to be waning. Inflation seems to be moderating somewhat. The jobs picture continues to look strong despite slower employment growth in June. 

Goldman Sachs recently cut its recession risk over the next 12 months to 20% from its previous forecast of 25%. U.S. Treasury Secretary Janet Yellen also now sees a lower risk of recession. 

It's fair to say that the prospects are greater that Tesla reaches a market cap of $1 trillion well before Berkshire does. Meta probably will, too. But there's still a realistic chance that Buffett rules instead of tech.