It seems like everyone's favorite stock during the pandemic was Shopify (SHOP 1.11%). The e-commerce and digital-payments platform was growing year-over-year revenue at close to 100% as online shopping boomed, with shares zooming up over 300% from the stock-market bottom in March 2020. But with the pandemic catalyst fading, investors lost their enthusiasm for Shopify, sending shares down over 80% from all-time highs in 2022.  

This year -- along with the resurgent bull market in large-cap technology stocks -- shares of Shopify soared yet again, up over 80% as of this writing. Its market cap is now up to $80 billion. With the stock still off 63% from recent highs, some investors might think there is still room for Shopify to run higher in the next few years. But if you look at its valuation and growth potential, the numbers just don't add up. In fact, I think there is a good chance Shopify shares will be lower five years from now, not higher. Here's why. 

SHOP Chart

SHOP data by YCharts.

Reaccelerating growth but no profits

Investors applauded Shopify in the second quarter when revenue growth accelerated to 31% year over year. It hit $1.7 billion in sales during the period, driven by 35% growth in its Merchant Solutions segment to $1.3 billion. Gross profit grew at a slightly slower pace to $835 million, giving the company a gross margin of 49.3%. Merchant Solutions has a slightly lower gross margin than Shopify's subscription segment, meaning if it is growing quicker than overall revenue, gross margins will continue to slide lower.

The top line looked great, but bottom-line profits have been elusive. Even if you exclude the $1.34 billion write-off of its logistics business -- which management recently shuttered -- Shopify posted an operating loss of $300 million just in Q2. The culprit is a boatload of spending on research and development. Shopify spent $648 million on R&D last quarter, or 78% of its total gross profit. This heavy spending could result in sustained revenue growth for the business as it comes out with new products for sellers, but it is severely hurting the business's ability to generate any sort of profit for shareholders today.

Competition from Amazon could be an issue

The elephant in the room with Shopify is Amazon (NASDAQ: AMZN). The two companies power a ton of e-commerce spending worldwide, especially in the United States. In 2021, Amazon had an estimated 41% market share versus Shopify's 10%, but Shopify has been growing extremely quickly over the last decade.

Shopify tried to counter-position itself versus Amazon by powering the software and payments for first-party websites. For example, the upstart healthcare apparel brand Figs is entirely powered by Shopify, doing hundreds of millions in revenue a year that Shopify gets a cut of. But increasingly, Amazon worked to fight back, using its vertically integrated logistics network as an advantage to attract spending. As mentioned above, Shopify completely exited the supply chain business, meaning it cannot offer shipping, delivery, or storage services to its customers like Amazon.

The most important development that could hurt Shopify financially is the launch of Buy with Prime. This is a checkout solution built by Amazon that lets online retailers utilize Amazon Prime delivery benefits on their own websites, not just on Amazon. According to early studies, retailers who use the product can see a 25% uplift in spending, likely because of the next-day delivery that Prime members can get for free.

How does this hurt Shopify? The company makes the majority of its revenue from its Shopify Payments solution, which is a part of its Merchants Solutions revenue. It isn't the end of the world if more and more customers start using Buy with Prime instead of the Shopify payments processor, but it would present a headwind to revenue growth.

The numbers don't add up 

Future revenue growth will be vital for Shopify because of its steep valuation. Today, the company has a market cap of $81 billion. Over the last 12 months, it has generated $3 billion in gross profit. We have no idea how much bottom-line profit the company will generate at maturity, but to be optimistic, let's say it can convert half of its gross profit to earnings once it stops reinvesting so much to grow.

Let's also assume -- perhaps optimistically -- that Shopify can grow its gross profit at a 30% rate for the next five years. In year five, the company would hit $11.1 billion in gross profit, which would equate to around $6.5 billion in earnings if it can convert half of its gross profit to the bottom line. That would give the stock a price-to-earnings (P/E) ratio of 12.5. The stock would likely trade at a slightly higher valuation than this in five years, meaning the stock would generate solid returns for shareholders. 

SHOP Gross Profit (TTM) Chart

SHOP Gross Profit (TTM) data by YCharts.

A lot of math and assumptions, but what this should illustrate is that in order for Shopify to generate positive returns from here it needs to grow revenue well above the market average and see a huge profit inflection over the next five years. Not impossible, but well outside what base rates would assume. I don't think it is likely. Investors should take a while to consider the expectations embedded in the stock before buying Shopify at current prices.