Whether you realize it or not, the stock market is a dynamic investment vehicle that's constantly evolving. Although the benchmark S&P 500 tends to head higher over long periods of time, the stocks primarily responsible for pushing the widely followed index to new heights change regularly.

As an example, nine of the 10 largest stocks by market cap in 2004 are no longer in the top 10 as of today. In fact, insurer AIG now sits around No. 250 in the market cap rankings.

While a number of today's largest publicly traded companies have a good shot at remaining near the top of the leaderboard in terms of market cap -- e.g., Apple, Amazon, Microsoft, and Alphabet -- many smaller companies could emerge as some of the market's biggest stocks within two decades.

The following five stocks all have the innovative capacity and addressable markets to become some of the biggest stocks by 2040.

An hourglass placed on a table next to messy piles of coins and cash bills.

Image source: Getty Images.

Square

Although it currently ranks just outside the top 100, in terms of market cap, fintech stock Square (SQ -1.97%) has an excellent chance to become one of the largest stocks by 2040. Square may also become one of the most instrumental payment companies in the world.

For more than a decade, Square has leaned on its seller ecosystem as its foundational puzzle piece. This segment provides point-of-sale devices, analytics, loans, and other tools to help merchants succeed. In 2012, Square recognized $6.5 billion in gross payment volume (GPV) on its network. This year, the seller ecosystem could top $150 billion in GPV.

Best of all, this merchant fee-driven segment is seeing a larger percentage of GPV originate from bigger businesses, as defined by annualized GPV. Larger merchants using its payment ecosystem should result in steadily growing gross profit.

But the bigger long-term growth driver is peer-to-peer digital payments platform Cash App, which has grown its monthly active user base from 7 million to 36 million in three years, ended Dec. 31, 2020. Cash App allows Square to generate revenue from more channels, including investments, and is bringing in $55 in gross profit per user (as of Q2 2021), compared to a $5 cost to attract each new user.  With the acquisition of buy now, pay later company Afterpay, Square will have its very own closed payment ecosystem, which could really ramp up its growth potential.

A person making notes on paper while looking at an open laptop.

Image source: Getty Images.

Shopify

Though it's already a top-60 company by market cap, cloud-based e-commerce platform Shopify (SHOP 0.14%) may well be a top-10 company in size by 2040.

The core trend backing Shopify's ascent is simple: more and more businesses are shifting their operating presence online. Whether it's stand-alone online retail sales or the ability to appear in third-party marketplaces, Shopify is ready to help businesses of all sizes grow their e-commerce business. For some context, FTI Consulting estimates that online retail market share as a percentage of total retail sales in the U.S. will grow from 18% in 2020 to 33% by 2030. 

Furthermore, the services Shopify provides are high-margin and generate predictable cash flow. While Shopify's addressable market for small businesses sits at $153 billion, according to the company, this figure doesn't account for continued innovation, the regular introduction of new products, or its ability to secure deals with larger businesses that purchase its $2,000 a month Shopify Plus subscription service. 

If Wall Street's consensus sales estimates prove accurate, sales for the company are on pace to more than quintuple by 2025, with no signs of slowing.

Two people carrying luggage and holding hands while checking into a bed and breakfast.

Image source: Getty Images.

Airbnb

Another big-time disruptor with aspirations of becoming one of the largest stocks by 2040 is the stay-and-hosting platform Airbnb (ABNB 1.09%). To do so, Airbnb would need to climb around 100 spots in the market cap rankings over the next 19 years.

First and foremost, it's completely disrupting the traditional hotel operating model. According to Airbnb, over 4 million households worldwide are being used for hosting, and are, in many cases, cheaper, more convenient, and more private than local hotels. Though the pandemic threw a monkey wrench into the works for a couple of quarters, it's worth pointing out that bookings more than quintupled in the three-year period between the end of 2016 and the end of 2019.

What's more, the fastest-growing segment for Airbnb is long-term stays (defined as 28 or more days). As the world becomes more remote in the wake of the pandemic, Airbnb has an opportunity to secure the lion's share of business from these work-from-anywhere individuals.

And don't overlook the Experiences segment, which hires local experts to lead travelers on adventures. Experiences will allow Airbnb to further infiltrate the $9.2 trillion travel and tourism industry. 

An employee wearing a headset who's speaking with a customer while at her desk.

Image source: Getty Images.

Salesforce

Whereas Airbnb has a big hill to climb to become one of the largest stocks by 2040, cloud-based customer relationship management (CRM) software provider Salesforce.com (CRM -1.59%) is closer to that mark than any other company on this list. With a market cap nearing $300 billion, it looks to be well on its way to becoming a foundational tech giant that other businesses envy.

For those unfamiliar with CRM software, it's used by consumer-facing businesses to improve customer relationships and grow sales. It can help oversee online marketing campaigns, handle product or service issues, and run predictive sales analyses on an existing client base.

What makes Salesforce special is its utter dominance of the CRM space. According to IDC, it was responsible for 19.5% of global CRM spending in 2020. That's more than the No.'s 2 through 5 in market share on a combined basis. CRM software spending is slated for double-digit annual growth through at least mid-decade, and Salesforce's share of this trend is virtually untouchable.

Salesforce CEO Marc Benioff has also overseen a number of earnings-accretive and ecosystem-expanding acquisitions, including MuleSoft, Tableau, and the latest, Slack Technologies. Inclusive of acquisitions, Salesforce can continue doubling its sales every four or five years.

A pyramid of miniature boxes and a mini orange basket set atop a tablet and open laptop.

Image source: Getty Images.

Sea Limited

A fifth and final company that could become one of the largest stocks by 2040 is Singapore-based Sea Limited (SE 1.20%). Sea sits just inside the top 50, at the moment, with a market cap of nearly $200 billion.

Sea's secret weapon is that it has not one or two, but three rapidly growing operating segments. For the time being, the company's gaming division is the only one generating positive earnings before interest, taxes, depreciation, and amortization (EBITDA). The company had approximately 725 million mobile game users in the second quarter, 12.7% of which were paying to play. This is a pay-to-play conversion rate that's well above the industry average of closer to 2%.

But the real lure here is the e-commerce platform Shopee, which is the most downloaded shopping app in Southeastern Asia and is also gaining steam in Brazil. Shopee is primarily targeting emerging market countries and has delivered jaw-dropping growth over the past couple of years. For instance, the $15 billion in gross merchandise value (GMV) purchased in the second quarter places Shopee's annual sales run rate 500% higher than the GMV produced in all of 2018.

Lastly, the company's digital financial services segment can be a hit in underbanked emerging markets. Despite being a relatively new division, it already has close to 33 million paying mobile wallet customers.  Together, these segments give Sea Limited a real shot to handily surpass a $1 trillion valuation.