Worry over the potential impact of a recession is weighing heavily on Costco (COST 0.17%), as historically high inflation and rising interest rates could impact the warehouse club's future growth.

Costco's stock is down 19% for the year, about in line with the S&P 500. But with a business model that relies upon low-margin, high-volume sales, rising costs -- including those for commodities and transportation -- are putting pressure on profits.

Man walking aisles of a warehouse club.

Image source: Getty Images.

While most of its earnings are derived from its membership fees, which typically get raised every few years, Costco will be hard-pressed to raise them again now when consumers are already feeling strapped. Although it would provide an immediate bump to revenue, it might also force customers to not renew or sign up.

There are a number of competing factors affecting Costco's stock, so let's see whether the warehouse club leader can continue growing over the next few years, and if that makes its stock a buy.

Consumers going down market

Inflation is a dual-edged sword for Costco. On the one hand, its business model is vulnerable to the ravages inflation causes to consumer buying power and the effect rising costs have by eating into its margins. But on the other, those same consumers are also seeking out ways to save money and stretch their wallets, and could turn to Costco for its bargains.

But the retailer is facing more competition -- and not just from other warehouse clubs like Walmart's (WMT 1.32%) Sam's Club or BJ's Wholesale Club, but also from non-traditional stores like the dollar store chains. They might not offer bulk-buying opportunities (which isn't always a benefit), but the deep discounters have expanded their assortment of goods, including fresh and frozen foods, which makes them surprisingly effective rivals.

During the Great Recession of the last decade, Dollar General and Dollar Tree saw more upscale customers visit their stores, but they didn't all leave when times got good again. The improved selection and greater perceived value of their merchandise kept them coming back.

Indeed, financial advice guru Dave Ramsey says consumers often find themselves needlessly overspending at Costco to make their membership fees feel worthwhile.

And Walmart itself has said it is seeing higher-income shoppers increasingly going down market to its stores. It used to be that the retail king catered mostly to the low- and middle-income segments, while Costco attracted the mid- to upper-income customer. But Walmart said those earning $100,000 or more are more frequently being found in its aisles.

That could be why Costco's net sales were up 8% in its fiscal first quarter, which ended Nov. 20 while Walmart saw a near 10% rise.

The high cost of free money

Another factor that is affecting Costco's stock is the growth of its physical store footprint. The company operates some 847 warehouses around the world, and it has been expanding rapidly in recent years. This expansion has helped to drive growth for the company, as it has allowed the warehouse club to reach new customers and increase its market share. However, the expansion of Costco's physical stores has also come at a cost, as the company had to invest heavily in new locations and infrastructure.

Moreover, Costco's stores are not just for food, but also contain large amounts of discretionary spending items that consumers can easily set aside when push comes to shove. As CFO Richard Galanti told analysts on the retailer's earnings conference call, "it rains on all of us during these tougher times, particularly with bigger ticket discretionary items." However, he also maintains that the softness Costco is experiencing is relative to the strength it saw a year ago.

But that was a period marked by consumers splurging on goods after receiving extra stimulus checks, something many economists now count as the match that lit the fuse of inflation. Unfortunately, that free money is no longer available.

Crossing the digital divide

Costco has also struggled to keep pace with other retailers in the e-commerce space. This has been a particular concern in recent years, as the pandemic has led to a surge in online shopping. In response to this trend, Costco has been investing in its online capabilities and expanding its e-commerce offerings, but it remains to be seen whether these efforts will be sufficient to allow the company to compete with other online retailers effectively.

E-commerce sales were down 3.7% in the latest quarter, or 2% on a currency-adjusted basis, while Walmart saw a 16% gain.

That was due in large part to the decline in that discretionary merchandise. Consumer electronics and appliances represent about 40% of Costco's online volume, and they were hit hard this quarter, falling by high-single-digit percentage rates. 

Concerned friends looking at laptop.

Image source: Getty Images.

Taking the good with the bad

All this may sound bleak, but it's not as bad as all that. First, Costco has a loyal customer base that values the company's low prices and wide selection of goods. This should help the company maintain its market share and attract new customers over time.

Second, Costco has a strong balance sheet, with a healthy level of debt and strong cash flow. This should give the company the financial flexibility it needs to still invest in its business and pursue growth opportunities.

Still, it's not the cheapest stock. Even with its shares down, Costco trades at elevated valuation ratios compared to earnings, sales, and free cash flow. I wouldn't be buying large tranches of Costco stock at this time, but small bites until better prices present themselves will ensure your portfolio can benefit from this fundamentally high-quality business.