Costco Wholesale (COST 1.01%) is a reliable stock for gains and dividends. However, despite sales starting to sag this year, the price keeps climbing. Costco stock is up 22% in 2023, and it trades at a price-to-earnings ratio of 41. That's above its one-, three-, and five-year averages.

However, I would still recommend buying Costco stock, even at this price. I'll tell you why.

Things are heading back in the right direction

Pre-pandemic, Costco reported mid-to-high single-digit comparable-store (or comps) growth on average for many years. That kind of reliable growth, along with increasing profitability, gained legions of investing fans.

Growth accelerated throughout the first two years of the pandemic, reaching higher than 20% at its height. It was inevitable that it would be followed by a drop. But after hitting negative comps earlier this year, growth is now swinging back up. 

Metric Q1 23 Q2 23 Q3 23 June July August
Sales growth 8.1% 6.5% 1.9% 4.6% 4.5% 5%
Comps growth 6.6% 5.2% 0.3% (1.4)% 2.5% 3.4%

Data source: Costco quarterly and monthly reports. All growth is year over year. Fiscal 2023 starts Aug. 29, 2022.

Since sales are already increasing, when facing these comps in the coming quarters, year-over-year comparisons should be even stronger.

Good things are coming down the pipeline

Costco operates a membership model and enjoys fee income that goes straight to the bottom line. It marks up product prices with tiny margins, leading to robust consumer engagement, especially during difficult times.

For example, even though growth rates have been pressured, traffic is rising, increasing 4.8% over last year in the 2023 fiscal third quarter (ended May 7). The lower revenue numbers are coming from people switching away from expensive purchases, but they're doubling down on their reliance on Costco for the best prices.

This is why it's important to look further than just one metric and dig into some of the underlying behaviors to see the real picture. This also leads to strong card renewal rates and increasing membership. Costco is maintaining all-time high renewal rates of 92.5% in the U.S. and Canada and 90.5% worldwide. Card members increased by 7% over last year in the third quarter.

Management has been discussing the timing of a membership fee increase sometime in the near future. It's already around the average time when it previously increased the fee, which could add millions to the bottom line without impacting member rates. Given Costco's strong performance despite inflation, and since management knows customers are struggling right now, it's waiting on the fee hike. 

Something else to look forward to is the special dividend. Costco pays a dividend, but the regular dividend isn't especially attractive, yielding 0.69% at the current price. However, the company has paid a special dividend four times over the past 11 years of $5 to $10 each time. It's about that time again in terms of historical averages, and management said it's likely to pay another one when it feels the time is right. In terms of cash, it's in an excellent position to share the wealth with shareholders, and that may be happening sometime soon.

COST Cash and Equivalents (Quarterly) Chart

COST Cash and Equivalents (Quarterly) data by YCharts.

It's not as expensive as you think

Many people would agree with everything I've said and still not want to buy Costco right now because it appears to be expensive. However, that's partially offset by Costco's excellent and growing business. Since you can't time the market, a valuation that's high but not astronomical shouldn't necessarily hold you back if you are holding with a long-term horizon.

But it's more than that because the price-to-earnings ratio right now includes a quarter with lower net income, an unusual case for Costco, due to a one-time charge. If you would back that out, the valuation wouldn't be this high. And when you value the stock with its forward price-to-earnings ratio, the valuation is below average.

COST PE Ratio (Forward 1y) Chart

COST P/E Ratio (Forward 1y) data by YCharts.

Now is a great time to buy Costco stock before performance improves in the coming quarters.