Costco (COST 0.28%) has been an amazing investment for lots of people, averaging annual gains of more than 20% over the past three, five, 10, and 15 years. That's quite impressive! You might, therefore, want to invest in Costco yourself. Well, here's a green flag for you -- but there's a red flag, too.

The green flag is simply Costco itself and the way it does business. It serves multiple stakeholders very well: It limits its markups on products, offering customers good prices; it offers above-average wages and benefits to its employees; and it delivers not only solid stock-price appreciation over time to shareholders but also dividend income. Costco's dividend yield was recently just 0.55%, but the company has occasionally paid out some hefty special dividends. Policies and practices such as these result in rather loyal customers, employees, and shareholders.

Someone is hugging a red heart and smiling.

Image source: Getty Images.

Costco is an appealing stock for lots of reasons, a key one being its membership model. You need to be a member to shop there, and memberships start at $65 per year. That alone delivered close to $5 billion in revenue for Costco in 2024 -- and it made up the bulk of profits, too.

The company also has a strong private-label brand in Kirkland, which generates greater profits than name-brand items in general.

So, what's the red flag? Well, it's Costco's valuation, which seems on the steep side. Its recent forward-looking price-to-earnings (P/E) ratio of 46 is above its five-year average of 40, and its recent price-to-sales ratio of 1.56 is above the five-year average of 1.12. Buying into the company today would leave you with little or no margin of safety. And safety would be welcome these days, with so much economic uncertainty, due to tariffs, for example.

Costco often trades at a lofty valuation, though, because it has performed so well. So, if you're afraid you may never see a much more attractive price, you might just buy some shares for your long-term portfolio, but perhaps not a boatload. You might build a position in the stock incrementally over time.