The stock market is a wealth-building machine for patient investors. However, it's also dynamic.

Back in 1999, the 10 largest publicly traded companies by market cap included the likes of Lucent Technologies, Nokia, ExxonMobil, General Electric, and Intel. Only Microsoft, which was the largest publicly traded company in 1999, remains in the top 10 today. It's currently second, with a $1.9 trillion market cap. 

Innovation, earnings, acquisitions, and a host of other decisions are what lead to this constant flux among the world's biggest businesses.

A magnifying glass held above volume data printed in a financial newspaper.

Image source: Getty Images.

History suggests Apple could be replaced as the world's biggest company by market cap

Today, Apple (AAPL -0.57%) sits at the head of the table with a market cap north of $2.2 trillion. This hearty valuation comes after Apple introduced 5G-capable iPhones late last year. The tech kingpin has sold an astounding $113.5 billion of the devices in just the first six months of its current fiscal year. That's up from $84.9 billion over the same time frame one year ago. 

Aside from some of the strongest brand loyalty you'll ever see -- seriously, just look at the lines wrapping around Apple stores when new devices are debuted -- Apple is also benefiting from its ongoing transition to a services company. CEO Tim Cook is overseeing Apple's push toward high-margin subscription-type services. This should be a faster-growing segment for the company over the long run, and it'll help smooth out some of the revenue lumpiness associated with device sales like iPhone, Mac, and iPad.

In short, Apple is a moneymaker, as evidenced by its $99.6 billion in trailing 12-month operating cash flow.

These could be the largest stocks in the world by 2035

But by the time 2035 rolls around, history suggests Apple may not be the kingpin any longer. The big question is: What company could possibly be worth more?

Though no one knows that answer with any certainty, I see three stocks that could eventually dethrone Apple.

An Amazon delivery driver speaking with a fellow employee.

Image source: Amazon.

The most logical choice: Amazon

The most logical choice would be those companies within reasonable striking distance of Apple's market cap: Microsoft, Alphabet, Amazon (AMZN -1.14%), and Facebook. In my opinion, Alphabet's and Facebook's reliance on ads makes it less likely they'll surpass the kingpin of innovation. As for Microsoft, its reliance on acquisitions and the hit-or-miss nature of these deals puts it out of the running. That's why, of the companies closest in valuation, I believe Amazon is the likeliest to surpass Apple.

Amazon is the undisputed leader when it comes to online sales in the United States. A report from eMarketer issued in March 2020 forecast that Amazon's share of U.S. e-commerce would grow 100 basis points in 2021 to 39.7%. This essentially means $0.40 of every $1 being spent online is routing through Amazon.

But as you may know, retail margins aren't the best. Amazon overcomes this two ways. First, it's signed up more than 200 million people worldwide to a Prime membership. The fees it collects from Prime pad its pocketbook and allow it to undercut the competition on price. What's more, Prime members have added incentive to stay loyal to Amazon's ecosystem of products and services.

Second, Amazon has ancillary operations beyond retail. In particular, its cloud infrastructure segment Amazon Web Services (AWS) has become an industry leader. Annual run-rate revenue for AWS is already $54 billion, and this segment is significantly more profitable than retail. At the rate Amazon's operating cash flow is growing because of AWS, I wouldn't be surprised if Amazon surpassed Apple well before 2035 rolled around. 

A Tesla Model S plugged in and charging.

A Tesla Model S plugged in for charging. Image source: Tesla.

If the cards fell just right: Tesla Motors

A lot would have to go right, but it's possible that electric-vehicle (EV) manufacturer Tesla Motors (TSLA -3.55%) could surpass Apple and become the largest publicly traded company over the next 14 years.

To be up front, I'm not a fan at all of Tesla's current market cap of $647 billion. But 14 years is a lot of time for a company to mature and potentially build on its first-mover advantages in the EV space.

Tesla is the first auto company in more than five decades to successfully build itself from the ground up to mass production. After delivering just shy of 500,000 vehicles in 2020, Tesla has reiterated its outlook for average annual delivery growth of 50%. This puts the company on track to hit more than 1 million EV deliveries in 2022, and perhaps north of 2 million by 2024. The company has two gigafactories already in operation (Fremont, California, and Shanghai, China), and expects to bring two additional gigafactories online in the not-so-distant future in Berlin, Germany, and Texas. 

Tesla also has clear-cut battery advantages. During the company's Battery Day event in 2020, it noted that its batteries possess better range, more capacity, and superior power to its competition.

As one additional reminder, don't overlook Tesla's role as an energy company, either. Energy storage may be playing a distant second fiddle to EV production, but it has a chance to be for Tesla what AWS has become for Amazon.

However, the cards would need to fall just right for Tesla to surpass Apple. The biggest challenge will be maintaining its competitive edge and market share in the U.S. and China, especially with most major auto stocks spending tens of billions on EV and autonomous vehicle research and production. For Tesla to be No. 1, it's going to have to mature as a company very rapidly.

A small trailer with a canopy and deck used for hosting.

Image source: Airbnb.

The true longshot: Airbnb

There's a very good chance that at least a handful of the top 10 biggest companies by market cap in 2035 are way down the market cap list in 2021. If I had to choose a true longshot candidate to surpass Apple by 2035, it'd be stay-and-hosting platform Airbnb (ABNB 1.09%). Its current market cap is "only" $93 billion, meaning it has more than $2 trillion in ground to make up on Apple over the next 14 years.

The answer to "why Airbnb?" is simple: It's revolutionizing the hotel and travel industry. It's taking a traditionally stodgy industry and allowing transparency and personalization to do the talking.

What's absolutely crazy to think about is Airbnb has achieved a $93 billion valuation with only 4 million hosts worldwide. In the U.S. alone, there are north of 130 million households, and probably well over 1 billion globally. Airbnb has managed to penetrate just 4 million households as hosts so far. The company is just scratching the surface on the hosting side of the equation.

Furthermore, Airbnb isn't happy just being a hosting platform. The introduction of Experiences -- i.e., activities hosted by local experts -- years ago signaled its intent to be the world's go-to travel source. During the pandemic, Airbnb brought virtual experiences to its customers, demonstrating the lengths to which it can adapt to any economic environment.

But maybe the most impressive thing of all is how Airbnb is attracting users to its platform. My colleague Jon Quast noted that a mere 9% of users booked a stay during the first nine months of 2020 because of an ad. This means 91% of users booked with Airbnb because they were familiar with the brand/services, or they were suggested by someone the user knew. Airbnb has brand staying power that could eventually rival Apple.

It's a longshot to become the world's largest public company by 2035, but it has an entire world of potential customers with which to build its foundation.