E-commerce stocks were all the rage during the early stages of the pandemic. Now that the pandemic has eased and the rapid growth of online shopping has subsided, some investors are ditching these stocks. What those hesitant investors haven't accounted for is that the shopping habits people acquired over the past few years have become just that -- habits. Smart investors should expect that the gains made by e-commerce businesses over the past few years will mostly persist. 

That's good news for e-commerce giants Amazon (AMZN 0.75%) and Shopify (SHOP 1.61%). Amazon needs no introduction as it's the world's largest e-commerce retailer. Fewer people may know Shopify, but its software platform powers more than 1 million e-commerce stores around the world. Both stocks have taken a hit this past year based on this investor hesitancy: Amazon is down about 44.5% from its all-time high, while Shopify is down about 82%. If you go back to before the pandemic was declared, the news is just as bad. Amazon stock is up a mere 10% since March 1, 2020, and Shopify stock is down 32%. The market now values these companies at levels comparable to or lower than it did before a colossal growth catalyst massively grew their customer bases.

Is this logical? Or is the market giving investors a couple of fantastic buying opportunities?

Person unboxing a cup from a package on the couch.

Image source: Getty Images.

Pandemic business gains

To see how much business each gained during the pandemic, let's compare first-quarter numbers from 2020 and 2022. Both companies grew impressively over those two years, with the younger Shopify generating the most growth.

Company Q1 2020 Sales or GMV Q1 2022 Sales or GMV  Growth
Amazon $258.7 billion $410.6 billion 59%
Shopify $17.4 billion $43.2 billion 148%

Source: Amazon and Shopify. Amazon's key statistic is sales, as it recognizes revenue when it sells a product. Shopify's key statistic is gross merchandise volume (GMV), as it only processes sales.

With Amazon, many customers who had used the service for years began using it to purchase items they hadn't necessarily bought online before the pandemic. Some consumers returned to their old shopping patterns now that social distancing efforts have waned, but Amazon's massive sales growth suggests many are sticking with their new habits.

Shopify provides its business clients with the websites, services, and infrastructure necessary to run e-commerce stores. It generates revenue by processing the business's transactions and charging monthly fees for its various services. Shopify has grown its business by continuing to service all of the new businesses that opened online stores through Shopify during the pandemic.

I would give Shopify the edge in its recent business gains, as Amazon's North American sales only rose 8% year over year in Q1 2022, while its international sales fell 6%. While Shopify's gross merchandise volume rose 16% and its overall revenue grew 22%. Shopify is still seeing decent growth, while Amazon's has slowed (partly as a reflection of tough year-over-year comparisons).

Winner: Shopify

Ancillary businesses

Both companies' operations are broader than just e-commerce. Amazon Web Services (AWS) is the market leader in its cloud computing niche, is growing rapidly, and is highly profitable. In Q1, its sales were up 37% year over year, and it ran at a 35% operating margin. If AWS was a stand-alone business, it might be one of the best stocks in the entire market to own.

Shopify is expanding its operations to meet more needs that customers appear to want, like its growing fulfillment network which will help its (often small-scale) clients offer the same services that big retailers do, like two-day shipping and easy returns. This segment is vital for Shopify as it expands its e-commerce offerings. Still, because its focus is nearly all retail, its dependence on retail could become an issue if the U.S. enters a recession. 

Winner: Amazon

Head-to-head competition

Before 2015, the Amazon Webstore unit provided services to small businesses in a similar fashion to Shopify. However, Amazon shut down the division because it could not successfully compete with Shopify.

Amazon seems to be headed back into direct competition with Shopify with its new Buy with Prime feature. This add-on allows third-party sellers to add a "Buy with Prime" button to their e-commerce sites. Customers who select it can checkout with their Prime accounts, and Amazon will fulfill their orders with the promise of two-day delivery.

Amazon's fulfillment network is more built out than Shopify's, so this should be a considerable concern for Shopify, as some of its customers may choose to launch new websites using Amazon's new feature. However, Shopify CEO and co-founder Tobi Lütke said during the Q1 conference call that he was thrilled with the introduction of Buy with Prime and would work to integrate it into Shopify's platform.

While I don't know how this will shake out, it seems strange to me that a product that could take business away from Shopify is something its CEO would be excited about. However, Lütke has a long and successful track record, so while I'm skeptical, I'm willing to give him the benefit of the doubt.

Winner: Tie

Which stock is the better buy?

In terms of the three categories above, the competition between these two companies ends in a tie. But if I were to choose just one of their stocks to buy now, I'd pick Shopify.

Amazon has likely saturated the e-commerce market and will have difficulty growing faster than the pace of e-commerce as a whole. Shopify still has a long way to go to fulfill its mission of equipping small- and medium-sized businesses with the tools they need to sell directly to consumers.

Additionally, because Shopify receives a monthly fee from each client, it makes no sense that its stock trades below its pre-pandemic price. Both stocks represent great values at their current prices, but Shopify gets the nod from me.