Large- and megacap stocks have performed well in 2024. Retail giant Costco (COST -0.44%) hasn't missed the party with the stock up 32% year to date. Its chain of membership warehouse clubs is gaining market share in the United States and putting up strong growth across its in-person and e-commerce operations, impressing investors.

At $863 per share as of this writing, it could be a future stock-split candidate. Will the stock reach $1,000 by year-end, and is it a buy at these prices? Let's investigate.

Strong growth and an incoming price hike?

The COVID-19 pandemic was a boon for retailers such as Costco. Revenue growth accelerated, pushing annual sales from $150 billion to $200 billion over just a few years. But unlike other retailers, Costco did not face a pandemic growth hangover. In fact, the company has continued to post strong growth and recently surpassed $250 billion in annualized sales.

The bottom line has followed suit with earnings per share (EPS) up close to 100% in the past five years. This strong growth has investors speculating a price hike is incoming for Costco's membership program. A membership currently costs $60 or $120, depending on the tier. There are well over 100 million members, and the company hasn't raised its membership price since 2017. Costco typically raises membership fees every five years or so, meaning the company is overdue for a price hike.

With high profit margins on the memberships themselves, a price hike could help Costco continue to grow its EPS over the next five years as well.

Forget $1,000 per share -- focus on valuation instead

It will require a 16% gain for Costco's share price to breach four-figure territory. Since the stock has already climbed by twice this amount in the first half of 2024, I don't doubt it's possible for Costco to surpass $1,000 before the end of the year.

Such a high stock price also makes Costco a stock-split candidate. Investors have recently seen Nvidia and Chipotle go through the process, and Costco's last stock split was in 2000.

But investors shouldn't focus on either of these things. Stock splits do not matter over the long term. A stock split just means there are more share of the same company available in the market. The actual stock price does not matter; what matters is valuation.

And Costco's valuation has been climbing for years. It currently has a price-to-earnings ratio (P/E) of 53, close to an all-time high and well above its long-term average of 27.

At these levels, investors have very high expectations for Costco's future growth.

COST PE Ratio Chart

Data by YCharts.

Avoid Costco stock (for now)

Costco is a great business. Even with $250 billion of trailing-12-month sales, the company was able to grow comparable sales 6.5% in its fiscal 2024 third quarter (ended May 12).  E-commerce sales were up 20.7% year over year. Earnings should continue to rise too, thanks to its track record of slow-and-steady growth.

But that's the issue: slow and steady. Costco is not a hypergrowth stock, but it's valued like one with a P/E ratio of more than 53.

Forget the stock split. Forget the potential for shares to reach $1,000 in the near term. It doesn't matter how great a business is if you have to pay too steep a premium to buy it: Price matters.