With shares of Costco Wholesale (COST 0.84%) up more than 60% since early last year, investors may be a bit hesitant to dive into a new position. Giving them even more pause is the fact that the stock's valued richly, at around 50 times this year's expected per-share earnings. They're understandably concerned that there's just no upside left to tap.

The thing is, investors are right to entertain these doubts.

Just don't get too comfortable being part of the pessimistic crowd. Costco stock has a funny habit of performing far more bullishly than it seems it should.

Is it too good for its own good?

You probably know the company: Costco is a club-based discount retailer. It boasts over 70 million paid memberships and more than 130 million total cardholders, who are paying either $65 or $130 per year for the right to shop at one of its 878 stores. Most of them are located in the United States, although Costco has a small brick-and-mortar presence outside of the U.S. as well. Last fiscal year it did over $242 billion worth of business, turning $6.3 billion of it into net income.

More importantly, it's good at what it does. It may be the best in the business, in fact, even though it competes directly with power players like Walmart's warehouse-retailing unit Sam's Club. Costco's been doing this since opening its first store in an airplane hangar all the way back in 1976, when it was still called Price Club.

And there's the conundrum for would-be buyers. Even if it's not a high-growth company, Costco is a reliable grower. Its top line hasn't failed to grow on a year-over-year basis in any quarter in over a decade, while its profit growth has been almost as consistent. Investors want to plug into this resilience, and are even willing to pay a premium for it.

They're just not great at tapping the brakes when the stock gets too far ahead of its underlying earnings.

Can you make sense of Costco stock's crazy price action?

That's exactly what's happened here since early last year, although the steep run-up that followed started with a disadvantage already in place. That is, Costco shares were also red-hot because of the COVID-19 pandemic in 2020 and 2021. For perspective, in addition to the 65% gain since the beginning of 2023, Costco stock's up an incredible 170% since the end of 2019, and 400% since the end of 2016. Sales and earnings are up for this time frame, but not nearly to the same degree.

The result? Costco shares' trailing price-to-earnings (P/E) ratio rose from around 25 then to a little over 50 now. That's rich even by the standards of popular technology stocks.

COST Chart

COST data by YCharts.

Most investors understand that the stock is currently overpriced, or at least near-fully valued -- it's near analysts' consensus target of just under $890 per share. The fear of missing out on the next leg of its bullish momentum, however, is also palpably strong. That's at least some of the reason the stock's peeled back from its early July peak.

Returning to the original question: Is it too late to buy Costco stock? The answer is...a little.

But how much is "a little?" That's the problem. As much as many investors would like a decisive, quantitative entry price for Costco, it's not in the cards. This is a ticker that ebbs and flows on internal and external qualitative factors; there's a "feel" to it. All that can be safely said right now is that shares are still priced a little too frothily to feel good about stepping into just yet.

On the flip side, don't be too picky about your entry price. If you're waiting for this stock's P/E ratio to slide back to the mid-20s like it was a few years ago, forget it -- it's not going to happen. Just look for signs that the current selling has run its course and the stock's starting to attract buyers again. It's a judgement call, and you'll know it when you see it. Probably.

And if you don't happen to get in near the exact low, that's OK too. You're still stepping into a fantastic long-term holding. It'll be fine given enough time.

Over time, the company matters more than the stock

It can certainly be a frustrating concept, particularly to newer investors who like things numerically neat and tidy. Some stocks work that way. However, most of them don't. Don't sweat it. Get used to it, in fact.

As one of the Motley Fool's core philosophies explains, you invest in companies -- not stocks. Look for quality companies, and their stocks will take care of things in time. Costco stock's certainly done that plenty over its history, even with a sky-high valuation.

And, that's precisely why it's not too late to buy it, provided you're truly looking five or more years down the road. That's also why your exact entry price doesn't matter.

If your time frame is only five weeks, though...well, that's a different story. Costco shares could still easily be priced lower five weeks from now than they are now, but that has more to do with the unpredictable market environment than this company itself. Trying to time your trade entries, when you're really only looking at the short term, is a dangerous game.