BJ's Wholesale Club (BJ 1.15%) delivered the most profitable third quarter in its history within a shaky macro environment. And its stock has outperformed the S&P 500 for well over two years now. 

After reaching an all-time high north of $80 last month, BJ's stock has since fallen more than 13%. Is now the time to buy the dip? Let's take a closer look to determine whether BJ's is currently a buy.

Digital sales growth remains strong

Headquartered in Marlborough, Massachusetts, BJ's Wholesale Club operates 233 retail locations, or clubs, as well as 163 BJ's gas stations across 18 states. A competitor of Costco Wholesale, BJ's opened its first warehouse club store in 1984.

BJ's same-store sales in Q3 jumped 9.7% year over year, nearly half of which was attributable to gasoline sales alone. BJ's membership fee income increased by a respectable 8.7%, hitting almost $100 million for the quarter. Most impressively, however, digitally enabled sales grew by 43% compared to the same period last year. 

Designed to make shopping more convenient, BJ's digital offerings grew more than 280% in the past three years. A popular curbside delivery option for members has helped expand the digital segment significantly. Boasting of BJ's online success during the Q3 earnings call, CEO Bob Eddy explained that within four years, digital sales grew from practically nothing to well over $1 billion.

Membership desk at a BJ's Wholesale Club location.

Image source: BJ's Wholesale Club.

Gasoline sales also proved to be a major boon in Q3. According to Eddy, "It's been, by far, the most profitable gasoline year we've ever seen." A major tailwind in Q3, gas sales accounted for nearly half of the year-over-year sales increase. BJ's also observed notable sales growth in its optical, home improvement, and tire departments.

Narrowing margins

Like all other retailers out there, BJ's has contended with persistent supply chain disruptions and the effects of inflation. Costs for commodities like milk, cheese, and chicken have gone up throughout the year, and BJ's has struggled to provide the value offering it is known for while still pulling in some profit.

Excluding gasoline, gross profit margins took a 30 basis-point hit in Q3, mainly due to higher material and transportation costs combined with inflation and price markdowns. BJ's CFO Laura Felice expects Q4 margins to also show a year-over-year decline -- although not as severe as Q3's. She also expects interest expenses to remain a headwind in the fourth quarter.

Realizing that the current macroeconomic environment is temporary, BJ's has remained focused on its core goals: offering value and growing its membership. Noting "some relief" in commodity prices, BJ's management team has kept the focus on helping its customers save money.

Is now the right time to buy BJ's stock?

Looking ahead, BJ's expects same-store sales (excluding gas) to reach 5% to 5.5% the year, implying 4% to 5% year-over-year growth in Q4. One catalyst anticipated to fuel growth in Q4 and 2023 is a recent co-branding partnership with Capital One, which presents an "enhanced value proposition" to BJ's members.

Considering the economic climate, I personally believe it's a good time to initiate or add to a position in BJ's Wholesale stock. Businesses geared to save people money tend to perform better during recession-like periods, and as long as the company remains on its current trajectory, I think BJ's stock will continue to reach new heights despite the prevailing bear market.

As Eddy claimed during the Q3 earnings call, "When the consumer outlook is uncertain, our members find comfort in being able to stretch their dollars with us." With a few more clubs expected to open in the coming months, BJ's Wholesale Club should keep gaining market share in the membership-based warehouse retail category.