Few companies have achieved a market cap of $1 trillion, which is not surprising: It is quite an accomplishment that requires a corporation to remain successful over long periods. But over the next two decades, there will undoubtedly be many more stocks that join this club, and solid returns await investors who can pick the right ones.

With that said, let's look at two excellent companies that have a chance to hit the $1 trillion market by 2043: Shopify (SHOP 1.11%) and PayPal (PYPL 2.90%).

1. Shopify 

When was the last time you bought something online? For many, the answer will be "not that long ago." It sometimes seems like online shopping has completely taken over, but that's not the case. In the U.S., e-commerce accounted for just 14.7% of retail sales in the fourth quarter.

There is plenty more room to grow in the next 20 years since e-commerce benefits consumers and businesses by increasing accessibility on both sides and lowering costs for the latter. And one corporation that is helping power the shift toward e-commerce is Shopify. The company provides merchants with all the tools they need to set up online storefronts, allows them to sell their products on various social media platforms, integrates brick-and-mortar operations, and much more.

Shopify's goal has been to become the one-stop shop for all that online businesses need to be successful, so owners can focus their attention on their day-to-day activities and grow their operations. Although the company has generally been successful, it has struggled over the past couple of years with slowing revenue growth and worsening net losses. 

These issues are largely the result of broader economic problems and the difficult comparisons with the pandemic years during which Shopify's business was abnormally in demand. The company's revenue and stock price have risen rapidly since its 2015 initial public offering.

SHOP Revenue (Quarterly) Chart

SHOP Revenue (Quarterly) data by YCharts

Can the company generate the returns it needs over the next two decades to become a trillion-dollar corporation?

Shopify's market cap is currently about $61 billion, so it needs a compound annual growth rate (CAGR) of roughly 15% to reach that goal within 20 years. In my view, Shopify can pull it off. Here's why. While economic conditions and perhaps other factors will always impact Shopify, the company continues investing in the future and building an increasingly attractive platform for merchants.

One of the company's most important goals is to ramp up its fulfillment network, an initiative that can help merchants attract more customers and increase conversion, which translates to higher gross merchandise volume and revenue for Shopify. Further, the tech giant benefits from a competitive advantage, namely high switching costs, since its merchants have spent a lot of time and money building their storefronts with the platform it offers.

Shopify accounted for 10% of the U.S. e-commerce market by gross merchandise volume last year. The company's leadership in this industry, excellent growth prospects, and competitive advantage all explain why it can become a trillion-dollar stock within 20 years. 

2. PayPal 

The rise of e-commerce will bring about a greater need for digital payment methods. That's where PayPal comes in. The fintech specialist is one of the most recognizable digital wallets out there. It closed 2022 with 435 million active accounts, an increase of 2% year over year. The fintech market experienced a similar pandemic-related rise and fall to the one the e-commerce market saw over the past three years. That explains PayPal's relatively meager 2% growth in accounts in 2022.

But the company increased this metric at a CAGR of 14% between 2017 and 2022. The company's revenue has also grown at a good clip over this period and even longer.

PYPL Revenue (Quarterly) Chart

PYPL Revenue (Quarterly) data by YCharts

PayPal is implementing various cost-cutting measures that will help boost the bottom line in the short run. These initiatives will help the company navigate the issues related to broader macroeconomic problems, such as inflation, it encountered last year. And regarding the company's long-term prospects, there is a lot to like about PayPal's business. 

For instance, its acceptance rate among the 1,500 largest retailers in the U.S. and Europe (as of the end of last year) is at 79%, up from 76% year over year. The next-best company has an acceptance rate of just 28%. Expect PayPal to enroll a growing number of merchants into its ecosystem. Retailers have to cater to customers' preferences to maximize their sales potential, and given PayPal's popularity as a digital wallet, more and more merchants will adopt the company. 

This also highlights PayPal's moat, the network effect, where the value of a service increases as more people use it. Some analysts estimate that the digital payments market will register a CAGR of 20.8% through 2030, and it should continue rising long after that, given the continued switch to e-commerce. That should provide plenty of fuel to ramp up PayPal's growth engine.

The fintech giant needs a CAGR of 13.1% to become a trillion-dollar stock by 2043, given its market cap of about $85 billion as of this writing. In my view, the company is more than capable of pulling that off.