Costco Wholesale's (COST 1.01%) stock closed at its all-time high of $604.96 last April. Investors were impressed by the warehouse retailer's robust growth during the pandemic, when it became a top shopping destination for bulk purchases as well as its continued growth after the lockdowns ended.

Its sticky membership plans, high renewal rates, and ongoing expansion -- even as other retailers reduced their number of brick-and-mortar stores -- made it even more appealing.

However, Costco's stock has declined about 20% since then. Though its core business remains strong, its stock wasn't immune to the past year's broader market sell-off caused primarily by inflation, rising interest rates, and other macroeconomic headwinds. Does that pullback represent a good entry point for new investors?

A person shops in a grocery store.

Image source: Getty Images.

An evergreen business model

Costco generates most of its profits from annual membership fees, which lock in customers and enable it to sell its products at lower margins than many other retailers. Its bulk products and cheaper private label brands also make it a popular place to shop during economic downturns.

That evergreen business model allows Costco to regularly offset its inflationary headwinds and other rising expenses by raising its membership fees every five to six years. It implemented its last membership fee hike in 2017, so it won't be surprising if it raises its fees again this year.

Yet, Costco's high renewal rates suggest it still has plenty of pricing power. In the first quarter of its fiscal 2023 (which ended in November 2022), its global renewal rate rose 140 basis points year over year to 90.4% and increased 90 basis points to 92.5% in the U.S. and Canada. Its total number of cardholders also grew 7% year over year to 120.9 million.

Costco is continuously opening new warehouses to serve that growing customer base. It ended its latest quarter with 847 warehouses compared to 828 a year ago. That ongoing expansion should also keep Costco ahead of Walmart's Sam's Club, BJ's Wholesale, and other smaller warehouse club competitors.

Between fiscal 2017 and 2022, Costco's annual revenue grew at a compound annual rate of 12% as its earnings per share (EPS) increased at a rate of 17%. Over the past five years, its stock has risen nearly 160% and delivered a total return of 175% after factoring in its reinvested dividends.

So why did Costco's stock decline?

Costco seems like a solid long-term investment, but a few minor imperfections are weighing down its stock. First, it isn't completely immune to inflation, which has curbed consumer spending on its pricier products like consumer electronics and appliances. But it's also offsetting most of that pressure with brisk sales of food and sundries, and it expects inflation to cool off slightly in fiscal 2023, with declining prices for certain commodities like corn, flour, sugar, and butter.

A strong dollar also has been reducing revenue from its overseas warehouses, which accounted for 31% of its locations in its latest quarter. That impact reduced its sales by about 3% in the first quarter of fiscal 2023, but that pressure was largely offset by higher gas prices at its fueling stations.

Second, Costco's stock isn't cheap yet. Analysts expect Costco's revenue and earnings to grow 7% and 10%, respectively, in fiscal 2023. But its stock still trades at 31 times forward earnings -- making it a bit pricey relative to the forward price-to-earnings ratios of 22 and 18 for Walmart and BJ's Wholesale, respectively.

Costco's elevated valuation suggests too many investors are still holding it as a safe haven stock and that it could either stagnate or decline if the bear market finally ends this year. Therefore, Costco is still a safe stock to buy for the long term, but I wouldn't rush to buy it while its valuations are stretched and other blue chip stalwarts are still on sale.