Amazon (AMZN 1.30%) and Shopify (SHOP 4.90%) together account for a huge percentage of all U.S. e-commerce, although they operate different models, with Amazon targeting consumers and Shopify targeting business clients. They both struggled in 2022, and their stocks ended the year with losses far below that of the broader market.

AMZN Chart.

AMZN data by YCharts.

As we begin this new year, which one of these stocks is the better buy?

How are they doing right now?

Amazon and Shopify posted double-digit sales growth in the 2022 third quarter. But Amazon returned to profitability while Shopify continued to post losses.

Company Q3 Revenue YOY growth Q3 Net Income Net Income Last Year
Amazon $127 billion 15% $2.9 billion $3.2 billion
Shopify $1.4 billion 22% ($158 million) $1.1 billion

Data source: Amazon and Shopify quarterly reports. YOY=year over year.

In general, net income is an important metric and should be viewed as the bottom line, not online, because that's where it shows up on an income statement. It lets us know if the company is actually making money; no matter how high sales are, if there's aren't profits, there's no viability. However, Amazon stresses its operating income since its net income can often be impacted by one-time benefits or charges, and operating income provides a clearer picture of how well the business is running.

AMZN Operating Income (Quarterly) Chart.

AMZN Operating Income (Quarterly) data by YCharts.

Amazon has not come near any kind of operating loss, while Shopify has posted one for the past year.

What should we expect this year?

Amazon and Shopify both experienced surging demand at the beginning of the pandemic, leading to increased investments in their respective infrastructure to support higher sales. They are both cutting down now that demand is subsiding.

Amazon recently announced that it's cutting 18,000 jobs, or about 1.2% of its workforce. That's in line with what many other tech companies, such as Meta and Salesforce, are doing. 

Although it hasn't released an outlook for 2023 yet, fourth-quarter guidance was disappointing at about a mid-single digit. 

Still, Amazon is the top e-commerce company by far, and may soon become the top company in the U.S. by sales. It's also developing many other businesses, such as Amazon Web Services.

However, given the lower rates of increase in 2022, 2023 might be a chance to post higher year-on-year comparisons. Wall Street is expecting positive earnings for both the first quarter and the whole year, which would be a strong rebound from losses in parts of 2022.

Shopify is already cutting down expenses and will continue in that plan over the next several quarters. Revenue is still fairly strong, higher than Amazon's for the past few quarters. It has been launching new solutions that should drive higher revenue in 2023 as well, in addition to sales from new customers.

Earnings, however, don't look like they're going to be positive anytime soon. Investors should expect losses to persist in the near term.

Which one is the better buy?

When considering which stock is a better buy than another, it's important to take a look at how they're both valued.

Since both Amazon and Shopify have posted some losses lately, let's use the price-to-sales ratio.

AMZN PS Ratio Chart.

AMZN PS Ratio data by YCharts.

According to this valuation metric, Shopify is much more expensive than Amazon, despite losing much more of its value in 2022. Admittedly, some of this is because Amazon sells some of its own goods on its platform, while Shopify relies on third-party merchandise sales for its revenue.

Nevertheless, Amazon's lower price-to-sales ratio comes in addition to its having demonstrated consistent profitability for years. Shopify still has a while to go to prove its track record on profits.

Given its massive potential, prior demonstrated performance, and lower valuation, I would recommend Amazon over Shopify today.