Amazon (AMZN -0.36%) and Shopify (SHOP -0.62%) have so many differences, and yet the two have relatively similar stories of late. For instance, the two e-commerce-related businesses thrived at the pandemic's onset in 2020 when billions of folks looked to avoid shopping in person. Similarly, each has seen its stock price decline significantly amid the markets' sell-off in 2022. 

And while both are taking a hit from the slowdown in e-commerce sales growth as the pandemic's impact on the economy wanes, both also stand to benefit greatly from the ongoing evolution of consumer shopping over the next couple of decades as well as from the various other ventures they are developing. 

Let's compare these excellent businesses to determine a better buy for investors today. 

Amazon is more than just an e-commerce business

Amazon may have started as an online bookseller back in the late 1990s, but it has evolved to become so much more. Total revenue now tops $470 billion (as of 2021), an exponential jump over the past decade (2012 revenue was $61 billion). Beyond its main revenue source of e-commerce, Amazon has become the leading force in the estimated $495 billion cloud services segment. Furthermore, Amazon has grown its advertising business to a roughly $32 billion annualized rate.

Combining economies of scale and faster growth in its more profitable segments has boosted Amazon's operating profit margin from 1.1% to 5.3% in the last decade. That may seem a slight increase but has meant growth from $672 million to $25 billion in absolute terms.

Considering that Amazon is a powerful force in massive industries, including e-commerce, cloud services, and advertising, it could continue briskly expanding revenue and profits for years. 

Shopify is becoming a favorite for enterprises worldwide 

Shopify offers a suite of services for merchants to help them establish and grow online. In some ways and for some merchants, Shopify offers them an alternative to using Amazon to sell their products as well as a way for them to effectively compete with Amazon when it comes to doing commerce online.

The company's revenue exploded from $50 million in 2013 to $4.6 billion in 2021. Despite that fast growth, it is still a fraction of Amazon's overall sales, suggesting it has a long runway for expansion.

SHOP Revenue (Annual) Chart

SHOP Revenue (Annual) data by YCharts

Shopify is not as far along in its maturity as Amazon. Typically companies in earlier stages of evolution are not consistently profitable, and Shopify is no different. It has yet to deliver profits on the bottom line consistently. Indeed, management noted another year of investment in 2022, in which it expects to return all gross profits to the business.

Shopify is focused on providing services to entrepreneurs that empower them. To that aim, it is building out capabilities beyond hosting a website and taking payments. For instance, Shopify is developing a fulfillment network that will help small businesses with their product delivery needs and can serve to level the playing field against larger corporations (like Amazon) that can promise faster shipping. 

Investors in Shopify may have to wait several years before seeing profits on the bottom line. That said, if Amazon is any barometer of Shopify's potential, investors will likely have a reward worth waiting for. 

Shopify is the stock to buy 

AMZN PS Ratio Chart

AMZN PS Ratio data by YCharts

Shopify stock has long sold at a premium valuation when compared to Amazon. That premium is at the narrowest it's been in at least the last five years. Both stocks would do well for an investor's portfolio, but if investors have to choose between Amazon and Shopify, the relatively discounted price and its faster growth rates at the moment mean Shopify is the stock to buy.