E-commerce giant Shopify (SHOP -2.26%) has been a market darling, appreciating more than 3,000% since going public in 2015. Despite its history as a big winner, the market-wide chaos among growth and tech stocks has helped bring down shares.

Shares are off about 47% from 52-week highs set in November, and investors could be wondering whether it's safe to grab shares or if there's more pain in store. Here's what you need to know before making your move.

Someone making an online purchase on their phone.

Image source: Getty Images.

Why is Shopify's stock price falling?

I know you're hoping I have a specific answer, but the truth is that stocks go down for several reasons, and sometimes for no reason at all. There are a few potential things to point to in Shopify's case. You can start with a market-wide change in sentiment toward rapidly growing high-valuation stocks. Inflation is on the rise in the United States, and with it comes the threat of rising interest rates to quell inflation. Those looming interest rate hikes have been a primary influence on a lot of stock selling over the past few months.

Shopify also saw a boost in growth during the lockdowns in 2020, and its revenue growth temporarily spiked to triple-digit percentages. Shopify provides a software platform that gives any merchant simple tools to open an online store as well as manage a brick-and-mortar business. The pandemic has been a natural fit for Shopify's business; people shop online or start a side hustle because they're stuck inside.

SHOP PS Ratio Chart

SHOP PS Ratio data by YCharts

But it's hard to maintain that elevated level of growth, especially for a business as large as Shopify; analysts think Shopify will generate $5.7 billion in 2021 revenue. Its revenue growth was already slowing in 2019, and growth seems to be reverting to pre-pandemic levels, around 30% to 40% per year. Analysts are calling for 32% year-over-year revenue growth in 2022.

The stock's price-to-sales ratio got as high as 64 but is now under 27 and could keep falling. The P/S ratio averaged around 16 until the valuation started rising in 2019. You can't predict what the stock will do; only look at the facts to get some perspective.

Thinking about the long term

Try zooming out with this in mind, and you can find some hard evidence that Shopify is poised to continue excelling as a long-term investment. The company's become a household name for creators and small businesses; its 1.75 million merchants add up to roughly 8.6% market share of all U.S. e-commerce sales in 2020, second only to Amazon.

What's more, e-commerce represents just 13% of all retail sales in the United States, giving the company a tremendous long-term tailwind. If e-commerce continues to become a more significant part of the economy (and there's no one arguing it won't), Shopify will likely capture a chunk of that upside.

The company is also working to grow through other means, recently striking a partnership with JD.com, a large e-commerce company in China, that will allow merchants to set up stores on JD's platform using Shopify's software. Shopify can also grow by adding new merchant services or moving "upstream," bringing on more prominent merchants and brands to sell using its platform. In other words, there are many levers to pull for revenue growth because retail is such a big industry with so many ways to add value to merchants.

Shares are coming back down to earth, and that's a good thing

There's a lot to like about Shopify, but the stock could be factoring in a lot of success already when it trades at a P/S of 60. If you're a long-term investor, you should be thrilled that the stock's valuation is coming back down to earth.

Here's what I see in Shopify. The business has steadily grown larger over time, and the company is now starting to produce free cash flow. This means that Shopify can put cash on its balance sheet with its business operations, a sign that the business is becoming increasingly profitable. Analysts estimate Shopify will grow earnings per share at an average of 32% per year over the next three to five years.

SHOP Free Cash Flow Chart

SHOP Free Cash Flow data by YCharts

This revenue and earnings growth is more likely to correlate to solid investment returns because you're buying the stock at a reasonable valuation. Remember, it's fun when stocks "go to the moon" as they did in 2020 and 2021, but the recent selling is the other side of that coin. When you buy reasonably valued stocks, you benefit because the stock grows with the business. I think Shopify will continue being a long-term winner; it just takes some perspective.