Considering the two stocks' paths in 2023, investors have some differing expectations for wholesale retailers Costco Wholesale (COST 1.01%) and BJ's Wholesale Club (BJ 0.35%). Costco, the industry leader, has trounced the market so far in 2023, roughly doubling the 12% increase in the S&P 500. Its smaller peer is up just 7% through early October.

The warehouse retailing niche is an attractive one to consider during rocky economic times like these. Customer traffic tends to hold up well for these stores even as shoppers slow spending in more discretionary areas like home furnishings, consumer electronics, and jewelry. Warehouse clubs also enjoy steadier earnings than their traditional retailing peers, thanks to subscription fees.

But which of these two stocks is the better buy right now? Let's dive in.

Traffic levels

Costco is the market share leader, and that prime position is reflected in its stronger growth profile. Comparable-store sales rose 4% in the most recent quarter, outpacing BJ's 1% uptick.

Look closer and you'll see solid engagement trends for both businesses, even as customers have become more cautious in their spending. BJ's achieved higher customer traffic in the second quarter on top of big gains a year ago. Costco's traffic growth was even better, rising 4% year over year. Contrast those results with a company like Home Depot, which has been seeing declining traffic for several quarters.

Between the two wholesale retailers, growth investors will be more impressed with Costco's sales results. But BJ's is also winning market share in a crowded, competitive industry.

Fee outlook

Costco also gets the edge when it comes to profits. Thanks to the combination of a rising membership base and increasing demand for its premium subscription plans, the retailer achieved an 8% boost in fee income over the past year. BJ's comparable metric was up 5%. Both companies convert about 3% of sales to operating profit, making them roughly as profitable as Walmart.

Wall Street is more excited about Costco's ability to raise its fees at some point in the next year. It has been more than six years since its last hike in mid-2017, after all. And the chain is clearly delivering plenty of value for its subscribers, meaning it won't struggle with the next hike.

A record 93% of Costco members are renewing their annual subscriptions right now. BJ's is also setting records on this score, but its 90% renewal rate still trails the industry leader.

The right price

BJ's stock is available at a discount to the market leader. That's largely to be expected given Costco's bigger sales footprint and its stronger membership loyalty metrics. Yet the valuation gap might make BJ's the more attractive buy right now.

COST PE Ratio Chart

COST PE Ratio data by YCharts

Shares of BJ's are priced at less than 0.5 times annual revenue, about half of Costco's valuation. Walmart is valued at 0.8 times sales. Those gaps are about the same when it comes to earnings as well. BJ's is priced at a relative bargain compared to these peers, with Costco valued at 40 times earnings, Walmart valued at 31 times earnings, and BJ's priced at just 19 times earnings.

Investors with lower risk profiles might prefer Costco even at this premium valuation. Its massive membership base confers earnings stability that's hard to find in the industry. But BJ's Wholesale has a good shot at producing market-beating returns over the next few years if the company can maintain the positive operating momentum that investors have seen in the past several quarters.