Investors have come to different judgments about the shares of Costco Wholesale (COST -0.14%) and BJ's Wholesale Club (BJ -1.81%) this year. Both retailers are seeing strong growth as shoppers focus more on prices, but BJ's shares are trouncing those of its larger rival. The stock is beating most of its retailing peers, in fact, with its gain of 11% so far in 2022.

Let's look at whether that outperformance is justified or if investors should be buying Costco stock instead right now.

The latest results

BJ's mid-November earnings report was packed with good news about the business. The company posted a 5% boost in comparable-store sales through late October, with that growth coming on top of a 13% spike last year. Costco's latest comps increase was a bit faster at 7%.

BJ's also got a boost from increased demand for its memberships, which drive most of its profits. Fee income was up a robust 9%. "We reported another quarter of strong results, demonstrating the power of our business model," CEO Bob Eddy said in a press release.

The warehouse retailer is feeling a pinch from rising costs. But profit margins are declining only slightly. Both Costco and BJ's are outperforming peers like Walmart and Target on this score, in part because their warehouse setup doesn't expose them to as much inventory risk.

Looking ahead

Thanks to that flexibility, BJ's is projecting a happy holiday season ahead. While Target lowered its 2022 outlook on sales and earnings, BJ's raised its core growth outlook to between 5% and 5.5%. That prediction stood at between 4% and 5% in mid-August. Eddy and his team also see earnings landing between $3.70 and $3.80 per share, up from the prior range of $3.50 to $3.60.

That expanding outlook reflects BJ's improving market share and its attractiveness as a shopping destination in inflationary times. Costco enjoys these same competitive assets, though, as reflected in its 10% comps increase in the year that ended in late August.

The better deal

BJ's stock still looks attractive even after the latest rally in 2022. Shares are valued at 0.6 times annual sales, making it cheaper on that basis than Costco, Target, and Walmart. The price-to-earnings ratio tells a similar story. You can buy BJ's for about 22 times earnings, compared to Costco's P/E of 40.

COST PE Ratio Chart

COST PE Ratio data by YCharts

Some of that discount makes sense given BJ's smaller sales footprint. It books less than $20 billion in annual sales compared to Costco's $227 billion. And Costco's industry-leading membership renewal rate likely means earnings will spike after the company raises its fees in the next year or so. Still, BJ's appears to be on a path of steady market share gains and rising profitability, with room to significantly expand its regional footprint over the next several years.

That scenario should translate into strong returns for shareholders even if both stocks seem relatively well-positioned to ride out any potential recession. For fans of growth stocks with solid balance sheets, BJ's looks especially attractive here in late 2022.