Investors love Shopify (SHOP 1.11%) stock. The e-commerce platform's stock has more than doubled over the past year, and as inflation may be easing and e-commerce is growing, there's high investor confidence in the company's long-term prospects.

However, at the current price, Shopify stock trades at a rich valuation. Should that stop you from buying it right now?

Why Shopify is so popular with investors

Shopify operates an e-commerce platform for retailers. It's not a third-party platform like Amazon (AMZN 3.43%), but it provides white-label e-commerce solutions for business clients. Although its core products are turnkey retail websites, it has expanded to offering a range of products and solutions to businesses of all sizes. It has forged lucrative partnerships with enterprise customers who use some of its services, like payment gateways or point-of-sale devices.

Sales skyrocketed early in the pandemic when retailers needed to offer e-commerce to survive, but although it has slowed, sales growth is still in the double-digits. Shopify also became briefly profitable for a short while, and it's now winding down some infrastructure it built out to meet rocketing demand that's been weighing in its bottom line. It recently sold off a company it had acquired to develop its own logistics, and it's doubling down on its core activities instead.

E-commerce is growing as a percentage of overall retail, and Shopify will play a big role in its future.

E-commerce as a percentage of retail sales.

Image source: Statista.

More retailers are expanding their digital or omnichannel presence, and Shopify offers packages to meet a range of needs. The growth runway looks very long.

Profitability is on the mend

Another reason Shopify looks compelling right now is that it's done the hard work of cutting costs, and scaling is leading to profitability. It's been cash-flow positive for some time, and it posted both an operating profit and a net profit in the 2023 third quarter.

SHOP Free Cash Flow Chart

SHOP Free Cash Flow data by YCharts

Management is guiding for Shopify's gross margin to expand in the 2023 fourth quarter and expenses to decline, while expecting free cash flow to increase as a percentage of revenue. It's forecasting revenue to grow in the mid-twenties for the full year, and it should be an excellent finish to 2023. While it hasn't given any guidance yet for 2024, if inflation eases and retail spending jumps, Shopify is in a prime spot to benefit.

How much should valuation matter?

At the current price, Shopify stock trades at a price-to-sales ratio of 15. Although that's well below its average, it's still objectively high.

Some stocks always sport a premium valuation. Take Amazon for example. Amazon stock trades at a price-to-earnings ratio of 79, which is typical for Amazon, but objectively very high. But even value investing guru Warren Buffett, who frequently cautions investors to look for undervalued stocks, and that prices will rise or fall to meet the real underlying value of a stock, bought Amazon a few years ago. Sometimes the high valuation does reflect the underlying value.

The question is whether or not that holds true for Shopify. Many investors are excited about what it can do in the future, but even if it continues to report strong growth, it may not be able to support such a high valuation. Out of 48 analysts on Wall Street covering Shopify, more than half rate the stock a hold, and the average consensus target price amounts to a 7% decline.

However, Wall Street isn't always correct. Investors love Shopify stock, and if you're risk tolerant and have a long time horizon, you could go along with enthusiastic investors and take a position.