Amazon (AMZN 3.43%) and Shopify (SHOP 1.11%) represent two ways to invest in the e-commerce sector. Amazon, the world's largest e-commerce company by annual revenue, sells its products through its first-party marketplace and a network of third-party sellers. Shopify doesn't operate its own marketplace. It provides self-service e-commerce tools that enable merchants to build websites, process payments, fulfill orders, and manage marketing campaigns.

Amazon's core e-commerce strategy is to lock merchants into its own ecosystem, while Shopify's approach encourages merchants to forge their own online identities without joining a massive marketplace. But their interests and strategies have also been overlapping in recent years.

Last year, Amazon launched its "Buy with Prime" buttons, which tether independent merchants to its payment processing and fulfillment services. Shopify's Shop app, which launched in 2020, serves as a centralized marketplace for finding local businesses, making online payments, and tracking orders.

An online shopper opens a package at home.

Image source: Getty Images.

Amazon and Shopify still operate very different business models, but both companies experienced accelerating growth throughout the pandemic as more people shopped online. They also subsequently faced tough year-over-year comparisons as the pandemic ended and inflation curbed consumer spending.

Nevertheless, Amazon's stock has still risen more than 50% over the past 12 months as Shopify's stock rallied about 70%. The bulls are embracing these e-commerce stocks again in anticipation of a cyclical recovery, but which is the more reliable long-term investment?

Which company is growing faster?

Amazon generates most of its revenue from its e-commerce marketplaces. But it also generated 16% of its sales from Amazon Web Services (AWS), the world's largest cloud infrastructure platform, in the first nine months of 2023. Shopify generates most of its revenue from its Merchant Solutions business, which hosts its core e-commerce services, while 27% of its revenue comes from its associated subscription-based services.

As the larger company, it isn't surprising that Amazon grew more slowly than Shopify over the past year. However, Amazon's revenue growth notably accelerated over the past two quarters as Shopify experienced a deceleration in its latest quarter.

Company

Q3 2022

Q4 2022

Q1 2023

Q2 2023

Q3 2023

Amazon Revenue Growth (YOY)

15%

9%

9%

11%

13%

Shopify Revenue Growth (YOY)

22%

26%

25%

31%

25%

Data source: Amazon. YOY = year over year.

Amazon's accelerating growth can be attributed to the robust recovery of its international business, which offset the slower expansion of its North American and AWS segments in the first three quarters of 2023. Analysts expect its revenue to rise 9% in 2023 and 12% in 2024 as the macro environment improves.

Shopify's e-commerce business continued to expand, but its growth was throttled by the sale of its lower-margin logistics business this June. Analysts expect its revenue to rise 20% in 2023 and 17% in 2024 as it laps that divestment.

Which company is more profitable?

Amazon's core profit engine is AWS, which usually operates at much higher margins than its e-commerce marketplaces. By subsidizing its lower-margin marketplaces with AWS' higher-margin revenue, Amazon can afford to expand its Prime ecosystem with exclusive discounts, loss-leading promotions, and other digital perks.

Shopify doesn't own a cloud platform or a comparable high-margin business. Instead, its margins were squeezed by high cloud hosting, marketing, and logistics costs over the past few years. The divestment of its logistics unit -- which it had significantly expanded through its acquisitions of 6 River Systems in 2019 and Deliverr in 2022 -- should reverse that decline. Still, it's generated lower operating margins than Amazon over the past year.

AMZN Operating Margin (Quarterly) Chart

Source: YCharts.

Amazon posted a net loss in 2022, mainly caused by its withering investment in the electric vehicle maker Rivian. Analysts expect it to return to profitability in 2023 and grow its earnings per share (EPS) by 63% in 2024.

Shopify also racked up a net loss in 2022 as its slowing sales growth coincided with its massive logistics investments. However, analysts expect the abrupt divestment of its logistics division and other cost-cutting measures to boost its adjusted EPS (which excludes its one-time expenses) nearly ninefold in 2023 and 66% in 2024.

Which stock is the better value?

Neither of these e-commerce stocks is a screaming bargain today. As of this writing, Amazon and Shopify trade at 54 and 127 times next year's earnings, respectively. However, both companies are poised to recover in a more favorable macro environment.

I still like both stocks as long-term plays in the e-commerce sector. But if I had to choose one over the other, I'd pick Amazon over Shopify for its superior scale, ownership of AWS, stable operating margins, and lower valuation.