Amazon (AMZN -1.64%) and Shopify (SHOP -2.37%) play different roles in e-commerce. Amazon has become the world's single largest e-tailer, while Shopify has built its business by enabling smaller players to sell their wares online -- more than 1.7 million of them at last count. And although both of these growth tech companies will probably produce sizeable stock gains for years to come, one offers greater potential for higher returns.

The businesses compared

Amazon is an e-commerce pioneer, and more than 25 years after its founding, it continues to produce double-digit percentage revenue growth annually. It's steadily expanding the scope of its offerings, too, with its move into the pharmacy segment serving as the latest example. Also, with its acquisition of Whole Foods and the more recent development of its Amazon-branded brick-and-mortar stores, it has a significant real-world retail presence.

A person attaches a large label to a box.

Image source: Getty Images.

Just as important, it spearheaded the creation of the cloud computing industry with Amazon Web Services (AWS). It has used the highly profitable AWS to balance out the razor-thin profit margins in retailing, as well as to subsidize competitive e-commerce initiatives such as its switch from two-day to one-day shipping for Prime purchases in 2019. With a market cap of over $1.8 trillion, Amazon is now one of the world's largest publicly traded companies.

By contrast, Shopify provides e-commerce platforms and infrastructure for other retailers. It started as a software company and outpaced most of its rivals by making it easy to set up online stores and offering reasonable pricing. However, this functionality did not make Shopify dominant -- it lags WordPress app WooCommerce in market share, according to Oberlo.

Nonetheless, it has widened its competitive moat by developing the Shopify Fulfillment Network (SFN). The SFN will pack and ship orders from clients to their customers, and the company is continuing to add fulfillment centers across the country. The SFN gives it a key competitive advantage, as most of its peers merely provide software. Currently, Shopify has a $180 billion market cap.

How each stacks up financially

In the first quarter of 2021 alone, Amazon logged $109 billion in net sales, a 44% increase from year-ago levels. Net income rose 220% to $8.1 billion as its operating expenses grew more slowly than revenue, Additionally, the company earned $1.7 billion in income from non-core sources, primarily from growth in its equity investments.

Those increases were not unusual for the company. In fiscal 2020, net sales surged by 38%, while net income rose 84%, including the gains from its equity investments.

Impressive as those growth statistics were, Shopify's were better. It reported first-quarter revenue of $989 million, a 144% increase from 2020's first quarter. However, nearly all its net income came from $1.25 billion in unrealized gains. Without these unrealized gains, it would have only earned about $8 million. Still, that was a substantial improvement over Q1 2020, when it lost $31 million by that metric.

Additionally, Shopify's Q1 revenue increase was an acceleration from its 2020 performance, when revenue surged by 86%. Lower growth in operating expenses helped it deliver a $320 million profit after 2019's $125 million loss.

Neither of these companies has offered guidance for the current year. And only Amazon was willing to provide an outlook for Q2, saying that it expected revenue to rise by between 24% and 30% year over year.

Since the beginning of 2020, Amazon's stock price has approximately doubled, while Shopify's faster growth off of a smaller base has helped send its shares upward by an even more impressive 265%.

SHOP Chart

SHOP data by YCharts

At this point, though, new investors will have to pay a real premium for that faster growth. Shopify now trades at 53 times sales, well over Amazon's price-to-sales (P/S) ratio of 4.

From a price-to-earnings perspective, the difference appears to narrow significantly -- Amazon is trading at a P/E of about 70 times earnings versus Shopify's P/E of around 114. Still, since almost all of Shopify's profit came from "other income," its P/E ratio measured solely against the earnings of the core business would exceed 10,000.

Amazon or Shopify?

Both companies should continue to prosper. Nonetheless, I would choose to invest in Amazon stock at this time. Yes, Shopify is delivering faster revenue growth. But its stock is around 13 times as expensive from a price-to-sales perspective, and its revenue only grew at about double Amazon's rate in 2020. While Shopify should keep growing faster than Amazon, its stock has become too expensive to justify its premium.