The stock market's biggest companies looked very different 30 years ago. On Dec. 29, 1995, the top three names were ExxonMobil with a market cap of $101 billion, Coca-Cola at $93 billion, and General Electric at $74 billion.

While all three of these companies are still large-cap stocks in their existing forms, the S&P 500 index has outperformed them by a wide margin over the past 30 years, and they're nowhere near the current market leaders. Here are the companies that took their place.

A laptop with a game on the screen.

Image source: Nvidia.

The top 3 companies by market cap today

The most valuable companies in the world as of this writing are Nvidia (NVDA 0.43%), worth $4.4 trillion; Microsoft (MSFT 0.37%), worth $3.7 trillion; and Apple (AAPL 0.36%), worth $3.4 trillion. While each one existed in 1995, none were in the top 20 at that time, and Nvidia hadn't even gone public yet.

There's a clear theme here with the market leaders now all coming from the tech sector. Nvidia's position is the most surprising. Microsoft and Apple have both been near or at the top of the market for much of the 21st century. Nvidia, on the other hand, has added about $3.9 trillion in value over the last three years because of the role its graphics processing units (GPUs) play in artificial intelligence.

Will these companies continue to lead the way over the next 30 years? It's certainly possible, although it does get more difficult for businesses of their size to outperform the market. Apple's recent results demonstrate that. The former largest company in the world has lagged the S&P 500 over the last three years.

It can feel like the biggest companies are firmly entrenched at the top, but there's a good chance the top three will again be completely different by 2055, so trying to find those future market giants is well worth your time.