One of the most significant tailwinds in the last two decades is e-commerce, which led to the creation of many successful e-commerce companies. Amazon (AMZN 3.43%) and Shopify are arguably the two best-performing companies in this industry.

But if investors have to choose only one of them today, which company is a better buy? Let's explore that further in this article.

Customer buying products online.

Image source: Getty Images.

Amazon, the diversified technology conglomerate

Amazon is one of the greatest success stories of our generation. Started as an online bookstore, the e-commerce company diversified into related and non-related industries over the years to become one of the world's biggest companies.

In the e-commerce industry, Amazon is the clear leader, with around 38% of the e-commerce market share in the U.S. Amazon's success comes from its relentless focus on customer delight -- offering a wide selection of low-priced products and delivering them quickly to its customers. Happy customers, understandably, keep coming back for more products and services over time, helping Amazon build the largest e-commerce platform in the U.S.

Besides its consumer-facing business, Amazon owns some interesting enterprise-related businesses. For instance, Amazon Web Services (AWS) is the world's largest cloud-computing business, with around one-third of global market share. On top of that, it also has a small, but rapidly growing advertising business.

Amazon's diversified business model gives it the necessary ingredients to keep growing despite its size. For perspective, revenue grew from $386 billion  in 2020 to $514 billion in 2022, a compound annual growth rate (CAGR) of 15%. In the latest quarter, revenue and operating profit increased by 11% and 133%, respectively.

And despite its size, Amazon is well positioned to keep growing in its consumer and enterprise businesses for a while. For example, the e-commerce penetration in the U.S. is around 15%, giving Amazon plenty of room to grow its retail business. On the other hand, AWS will continue to grow as it surfs mega trends like the migration to the cloud and the increased usage of artificial intelligence (AI).

Shopify, the leading e-commerce software solution provider

Shopify operates in the e-commerce industry, much like Amazon. However, there is a crucial distinction: While Amazon primarily serves consumers, Shopify is dedicated to serving merchants.

Shopify offers software and solutions designed to assist merchants in selling their products anywhere and everywhere. Its comprehensive services include online storefronts, payment processing, financing, and point-of-sale (POS) systems. With Shopify, merchants of all sizes can expand their reach, selling online and offline, catering to customers worldwide.

Shopify's remarkable growth in recent years has been a result of its unwavering commitment to customer success. For instance, its revenue nearly doubled, surging from $2.9 billion  in 2020 to $5.6 billion in 2022. In the most recent quarter, revenue continued to climb by 31% to $1.7 billion, sustaining its impressive growth trajectory. The only downside is that, as Shopify invests in further expansion, it reported a net loss in 2022 and the latest quarter.

Like Amazon, Shopify has substantial growth potential, possibly even more significant, given its smaller size. Shopify can drive growth in its Gross Merchandise Volume (GMV) through online and offline sales, thanks to its integrated software and solutions, such as POS and payment processing. Besides, Shopify is experiencing rapid growth in international markets, another growth opportunity for the company.

Moreover, as Shopify continues to innovate and introduce new tools over time, it can increase customer fees. For instance, Shopify's take rate (revenue divided by GMV) has risen from 2.68% in 2018 to 3.08% in 2023. The take rate can grow further as Shopify continues to delight its customers.

A quick word on valuation

When comparing these two companies, investors need to consider their valuation.

As of writing, Amazon  and Shopify have a price-to-sales (P/S) ratio of 2.7 and 13.5, respectively. The average P/S ratios for both companies are 3.5 and 28.6. While Shopify trades at a larger discount compared to its historical average in contrast to Amazon, it still trades at five times the valuation of Amazon.

Shopify is positioned for substantial growth in the coming years, given its smaller size. Therefore, it shouldn't be surprising if the stock trades at a higher valuation from this perspective. However, this premium should remain reasonable, particularly considering that Amazon is highly diversified and profitable.

Shopify's valuation gap is rather high at 5 times Amazon's valuation.

And the winner is...

Amazon is a well-established tech giant with good sustainable growth prospects in the next few years. On the other hand, Shopify is a high-growth but loss-making software and solution provider for merchants.

In short, these companies have different business models even though both operate in e-commerce. Thus, investors must choose the company that they are more comfortable with.

For me, the final vote goes to Amazon, as Shopify's valuation is too high. Owning a well-established and profitable tech company with a reasonable growth rate at an attractive price is safer than a loss-making and expensive high-growth company.