Costco Wholesale (COST 0.17%) has been a good buy over the past year, delivering returns of 11% while the S&P 500 has struggled, falling 12% over the same time frame. Consumers see lots of value in Costco's stores, which allow paying members to save with bulk purchases, and there are those who simply enjoy the treasure-hunt experience Costco can offer.

Its popularity is evident in its sales numbers, which continue to look strong while other retailers have struggled as the pandemic's grip on the economy and consumer behavior has loosened. And there's one impressive streak the company has been on that goes back more than two years.

Costco's comparable-store sales growth has been at least 10% for 27 straight months

Every month, Costco releases comparable-store sales numbers for its different business units (e.g., the U.S., Canada, international, and e-commerce). The chart below displays the monthly comps growth for both the total company, and the U.S. segment, which accounts for the bulk of its business.



Data source: company filings. Chart by author.

Aside from the early stages of the pandemic when lockdowns hurt the business, Costco's overall comps growth has consistently been 10% or higher. U.S. comps growth has followed a similar path, but it did fall to 9.6% in Dec. 2020, so its streak is only slightly less impressive. When looking at the total company, the last time comps growth was below 10% was in May 2020, when it was 5.4%.

And these are truly astounding numbers when you consider how difficult it is for a brick-and-mortar retailer with over $200 billion in annual revenue to generate that kind of consistent growth. The numbers above do include the impact of gas prices, which have provided a boost to the results after rising rapidly this year, but it goes both ways: In 2020, gas prices were low and dragged down overall comps.

In Aug. 2022, the growth rate decelerated to 10.1%, so there are signs things are slowing down for Costco, and the streak could finally end. But regardless of what has been going on with the economy -- whether there's been a pandemic, soaring inflation, or gas prices jumping up and down -- Costco has delivered an impressive run in the past two-plus years, one that illustrates just how resilient its business model is.

Is Costco a no-brainer investment?

Given how well Costco has been performing, it might seem like an obvious buy for investors. But is it really? One of the drawbacks with the stock is that it trades at a high valuation. Today, its forward price-to-earnings ratio sits at 31.7. That's nearly double the S&P 500 average of 17.6. Investors are paying a serious premium for the business.

From that standpoint, you could certainly argue the stock is overvalued and due for a correction. However, after seeing how Costco has come out of the pandemic stronger than ever, it has proven it very well warrants a premium. In the trailing 12 months, the company has accumulated $4.1 billion in free cash flow and profits of $5.6 billion on revenue of $217.5 billion.

Costco's impressive sales growth and solid fundamentals make it unlikely you'll find the stock trading at a discount anytime soon. So for long-term investors, the premium the retail stock commands today shouldn't deter you from owning what has proved to be a fantastic business. While I wouldn't call it a no-brainer buy with its valuation at these levels, it remains a sound investment you can buy and hold for years, potentially even decades.