Take out the impact from rising gasoline prices, and BJ's Wholesale Club's (BJ 0.84%) recent growth doesn't look nearly as strong. More than half of the warehouse giant's 22% sales spike through late July came from the boost in prices at the pump -- a trend that is currently reversing itself.

That slump will hurt sales growth in the second half of the year. But that's no reason to ignore the stock. BJ's business is firing on all cylinders right now, and that success is bound to generate solid returns for shareholders.

Let's take a closer look.

Positioned for growth

BJ's 20% spike in comparable-store sales falls to just 8% after you exclude gasoline sales, which were heavily impacted by rising prices through late July. Yet that adjusted growth rate still amounts to market-thumping gains.

The company is attracting more shoppers who are spending more on each visit. These gains are coming on top of soaring results a year ago, and they put the company ahead of many other retailers. Walmart, for example, just reported a 7% increase in its core U.S. business. "Our strong results," BJ's CEO Bob Eddy said in a press release, "were led by gains in traffic and market share."

The wholesale retailing model is positioned well for today's selling environment, where consumer spending is strong, but shoppers are looking for value. BJ's spacious warehouse setup leaves it less exposed to the type of inventory markdowns that hurt Walmart and Target, who have had to cut prices to make room for new arrivals.

Highly efficient

Like Costco (COST -0.60%), BJ's targets long-term earnings growth over quick profit spikes. But investors can still see evidence of its strengthening financial position today.

Operating income has risen by 22% in the past six months and sits at roughly 4% of sales. That's just above Costco's rate, and BJ's could soon surpass Walmart on this key metric.

WMT Operating Margin (TTM) Chart

WMT Operating Margin (TTM) data by YCharts

Look deeper into the company's membership trends, and you'll see more reasons to be bullish about its earnings prospects. The retailer is attracting more subscribers, who are paying at a higher average rate thanks to demand for its higher tier service. BJ's will raise those prices over time, too, just like Costco does every few years.

An attractive stock

In the meantime, BJ's investors can celebrate the fact that the company is laying the groundwork for expanding annual sales and earnings. It is pushing out to new regions as it opens 11 new warehouses this year. And the accelerating growth at existing locations is a sure sign of customer loyalty. Management just raised its 2022 outlook, after all, and now see comps rising by between 4% and 5% after adjusting for shifting gasoline prices.

Costco has a wider sales base and benefits from other competitive advantages like its global scale. But investors interested in the warehouse retailing niche should consider BJ's, whose stock is valued at about half Costco's valuation of 1.1 times sales.

Despite the expected growth slowdown in the second half of the year, shareholders have every reason to like the stock today, especially at that discounted valuation.