It's been a tough past couple of years for Shopify (SHOP -0.99%). While the e-commerce platform provider was all the rage in 2020 and 2021 when the pandemic sent the world online to do most of its shopping, that swell of growth was a tough act to follow. Despite being up from last October's lows, Shopify stock is also still trading down 70% from its late-2021 peak.

The stock's recent poor performance is not due to corporate failure. As the legendary investor Benjamin Graham said, "In the short run, the market is a voting machine, but in the long run, it's a weighing machine."

From early 2020 to now, the market has been voting on Shopify shares based on emotions and assumptions -- first bullishly, then bearishly. With the pandemic-prompted volatility finally starting to settle, now look for the market to begin accurately weighing this stock's true value.

And that should be firmly bullish for this stock over the next five years.

Shopify is the solution merchants increasingly want and need

Shopify helps companies of all sizes build and manage online stores. As a sales platform, it's an alternative to Amazon and eBay, which aren't ideal means for many companies to connect with their customers. Shopify offers merchants more control of the entire sales process and often does so at a lower net cost. Crate & Barrel, Kraft Heinz, and Molson Coors are some of its customers.

What's not fully reflected in Shopify's stock price is the number of would-be merchants that have yet to launch an online store, or are ready to try an e-commerce service other than Amazon or eBay.

Numbers from Digital.com and e-commerce consultancy Top Design Firms both indicate that roughly one-fourth of small businesses in the United States don't yet offer e-commerce options even though many of them could and should. Top Design Firms, a design, marketing, or development platform, asserts that 86% of these businesses intend to open online stores within the next few years.

Comparable numbers apply in most other parts of the world, where Shopify is growing just as well as it is within the United States.

Meanwhile, platforms like Amazon appear to be increasingly alienating sellers even if they supply customers en masse to those sellers. The Federal Trade Commission filed a lawsuit against Amazon last month, arguing that the company's pricing and promotion requirements unfairly harm its third-party merchants.

That's after several years of Amazon's efforts to shore up its perpetually strained relationships with these sellers. There might be no legal remedy that will ever solve the problem, though, since it is the nature of the business model itself. As long as Amazon is competing with the very same merchants that must also compete with one another on Amazon, a conflict of interest exists. That's why more and more sellers are avoiding or weaning themselves off of Amazon and similar platforms.

These are two core reasons Shopify's top line was up 31% year over year for the three-month stretch ending in June, extending a long-standing sales growth streak and providing positive cash flow for a third consecutive quarter.

SHOP Revenue (Quarterly) Chart

SHOP revenue (quarterly) data by YCharts.

These two factors are also likely to drive similar growth into the distant future.

Shopify, five years from now

But what does this tailwind specifically mean for the company's future?

Shopify is expected to produce revenue of $14.9 billion in 2027, more than twice this year's projected top line of just under $7 billion. Profits should continue growing as well. The same analyst community is modeling 2023 per-share profits of $0.49. In 2027, though, projections say they could reach $1.52 per share.

Chart showing expected revenue and earnings growth for Shopify through 2027.

Data source: StockAnalysis.com. Chart by author.

And, there's good reason for this optimism.

As much as Shopify has grown since its launch in 2006, its various platforms still collectively handle only 10% of e-commerce in the U.S. Meanwhile e-commerce as a whole accounts for only around 15% of the nation's total retail consumption, according to the U.S. Census Bureau. Not only is there still lots of room for added market share, but the organic growth of the nation's e-commerce market will drive top-line growth as well. To this end, Insider Intelligence expects annual online purchases of non-food goods and services in the United States will swell from $1.1 trillion this year to more than $1.7 trillion by 2027.

And the opportunity is just as exciting overseas (if not more so) where Shopify is now spreading its wings. An outlook from market research outfit Precedence Research suggests worldwide annual e-commerce spending is set to more than quadruple between 2022 and 2032.

That's a lot of potential. Even if Shopify wins only a fraction of this growth, its path to $15 billion in annual revenue is relatively straight and clear.

But where is its stock going to be five years from now?

Stock prices are trickier to predict than a company's future performance is. As we've seen with Shopify shares just since 2020, stock prices aren't so much an indication of a company's results as they are an indication of the market's opinion of those results. If the rhetoric regarding Shopify is pessimistic, then, the stock could remain a subpar performer.

This is one of those cases, however, where it pays to trust the wisdom Benjamin Graham is credited with: That in the long run, the market is a weighing machine that will fairly price Shopify stock based on the business' underlying results. That could plausibly put it back in the ballpark of $100 per share, still well below 2021's crazy high.

And analysts are getting the ball rolling. Despite the stock's recent weakness, these professionals still have a 12-month consensus price target of $67.87 -- almost 30% above the current price.