Shopify (SHOP 1.11%) stock has had an unusually good year, more than doubling since the start of 2023. That rally trounced the 55% spike in the tech-heavy Nasdaq Composite index and even beat e-commerce giants Amazon and eBay .

There are good reasons for Shopify's outperformance, even though its sales footprint is tiny compared with many of its peers. The digital selling infrastructure specialist has room to boost its market share over the next decade, for example. And it can easily improve its earnings power at the same time. Let's look at why Shopify might just be among the best e-commerce stocks that an investor can buy right now.

Magnificent growth

Shopify enables merchants to run their businesses, mainly through its comprehensive e-commerce platform but also with its point-of-sale system. That approach differentiates it from less comprehensive platforms that leave more of the selling process up to the merchants.

The Shopify method is providing tons of value to those sellers, whether they're small merchants or huge enterprises. You can see evidence of that value in the fact sales were up 26% in 2023, easily beating last year's results from marketplace specialists Etsy and eBay.

Even Amazon trailed Shopify's surging transaction volumes in the holiday season, while the latter's high-margin subscription solutions revenue climbed 23% for the year. Shopify certainly belongs near the top of the list when it comes to e-commerce growth.

Missing pieces

The platform's bottom line isn't nearly as magnificent though -- Shopify booked a $1.4 billion operating loss for 2023. But after after excluding one-time costs associated with its exit from the logistics business, its 11% adjusted operating margin shows promise. Among its industry peers who could also qualify as one of e-commerce's "Magnificent Seven," Shopify trails eBay (27%), PDD Holdings (23%), and MercadoLibre (15%) in this area while outperforming Etsy (10%), Amazon (6%), and Walmart (4%).

So Shopify's profitability is improving and might no longer be an issue by this time next year. Free cash flow returned to positive territory for the past five quarters and is likely to remain at a double-digit margin for the bulk of 2024.

And don't forget its logistics-related impairment charges won't repeat this year, which helps explain why most Wall Street analysts are expecting Shopify to expand its non-GAAP earnings at a healthy clip in 2024.

The price you pay

As you might expect, investors are being asked to pay a significant premium for a piece of this high-growth business. Shares are priced at 14 times sales, a multiple far higher than most other leading e-commerce companies.

Shopify can earn its place as a "magnificent" stock partly by maintaining its growth momentum, which seems likely for 2024. Management is projecting sales gains of nearly 30% this year after accounting for the sale of its logistics segment.

The stock's rally will require significant moves toward the higher profitability that some of its established rivals routinely generate. Look for the company to take steps in that direction this year and reassert itself as a top e-commerce platform in the meantime.