In just the past three years, shares of Costco Wholesale (COST 1.01%) have doubled in value. The only stock in the "Magnificent Seven" it hasn't outperformed during this stretch is Nvidia. It has been a hotter buy than all those other popular tech stocks.

The secret behind Costco's success isn't some flashy new artificial intelligence chatbot or cutting-edge technology. Instead, the company's strong brand, customer loyalty, and solid results have made it a top growth stock for many investors.

But at nearly 50 times its trailing earnings, has the stock simply become too expensive to own? Is now the time to finally step back and stop pressing "buy" on this stock?

Just how expensive is Costco's stock?

Costco's stock isn't just near its 52-week high, it's also at all-time highs. Costco's business has experienced significant growth since the start of the pandemic -- it's a go-to retailer for many customers, so it is to be expected that its value will go up.

COST PE Ratio Chart

COST PE Ratio data by YCharts

This is where the price-to-earnings (P/E) multiple can give investors a good gauge to determine if the valuation has truly accelerated too quickly. Over the past decade, the stock has averaged a P/E multiple of less than 34. Today, it's at more than 49. Investors are paying a huge multiple for the stock.

Is this too much of a premium for Costco's stock?

High multiples aren't uncommon for fast-growing businesses. The problem here is that Costco's growth rate has slowed drastically in recent years. It is below its 10-year average. It may have been acceptable to think the retail stock was worth more of a premium when its revenue was growing at over 20%, but as the chart above indicates, that has been the exception rather than the norm for Costco.

COST Revenue (Quarterly YoY Growth) Chart

COST Revenue (Quarterly YoY Growth) data by YCharts

Is Costco too expensive to buy right now?

Costco has a great business. It's planning to open more locations, another price hike for its membership is likely coming soon, and there's little concern that the business has run out of growth opportunities. Costco could be a good long-term buy -- but at its current multiple, investors are paying for a lot of future earnings growth.

If you want to hang on to it for decades, then it could still be a good investment for you. But it's not a stock I would buy today, simply because there are much better deals out there in the market today, ones that might have much more upside in the near future.

If Costco were to trade below 40 times earnings I would consider investing in it, but at today's valuation it is increasingly difficult to justify its price tag. While Costco isn't necessarily a bad investment, there are better long-term options out there for investors.