Growth-stock investors received some good news from both Shopify (SHOP -0.45%) and Airbnb (ABNB -6.87%) recently. The platforms each announced surprisingly strong sales trends through late 2022 that implied no sharp demand slowdown in discretionary consumer spending. On the contrary, people were enthusiastically booking rooms and buying items online through late December.

But which stock is the better buy right now? Let's dive right in.

Sales trends

Both companies notched excellent sales results in the fourth quarter. Airbnb's revenue landed at $1.9 billion, a 31% increase after adjusting for currency swings, to edge past the forecast that management had issued back in November. Shopify also beat expectations as its revenue growth accelerated to a 26% rate from 22% in the previous quarter.

Airbnb has a slight edge in the outlook department, though. The home and room rental giant said it is seeing sustained elevated demand across most of its geographies into early 2023. Sales in Q1 should rise by between 18% and 23%, executives estimate. Shopify, in contrast, is projecting a growth slowdown for the year as sales gains decelerate to the high-teen percentage range from last year's 26% spike.

Profits and cash

Airbnb has also made much better progress in building profitability into its business. Free cash flow hit a blazing $455 million, or 24% of sales last quarter, and net income was 17% of sales. These wins were supported by strong demand from guests but also by improvements to its host services. Airbnb just concluded its first profitable fiscal year as a public company .

Shopify, meanwhile, posted a painful $822 million operating loss for 2022 compared to a profit of $269 million a year earlier. These weak results were driven by elevated spending on the platform, which occurred just as demand growth started slowing. It might take at least a few more quarters before Shopify can better align spending with demand so that earnings are consistently positive again. Management is taking steps in that direction, though, including by hiking its fee structure.

The better deal

Both stocks are down significantly since early 2022 thanks to general fears on Wall Street about a recession on the way. Due to their focus in the consumer discretionary space, Shopify and Airbnb would both be impacted by an economic slump.

Yet Airbnb seems like the more attractive option today. Shares are valued at roughly 11 times sales compared to Shopify's price-to-sales (P/S) ratio of 13. That discount is available even though Airbnb has a brighter short-term growth forecast and is consistently profitable.

Both companies are targeting large, growing markets. Shopify's platform will likely be far larger in five years while the company's range of services expands. Airbnb, meanwhile, is aiming to make apartments more accessible for short-term stays even as it boosts host services over time. "We have some big ideas for where to take Airbnb next," executives said in a recent letter to shareholders. 

Investors will likely enjoy being along for that ride, even if the next few quarters might involve a volatile stock price. Airbnb's financial flexibility and growth options should support market-beating returns over the long term.