In the past 20 years, the S&P 500 has produced a return of 557%, which includes dividends. On an annualized basis, that healthy gain is in line with the broad index's historical 10% yearly gain.

However, some individual businesses have crushed this performance. Costco Wholesale (COST 1.01%), the massive warehouse club operator, is one such enterprise. This top retail stock has skyrocketed 2,750%, including dividends, in the past two decades and has a current market cap of $330 billion.

With Costco's stellar gain and high valuation, is it too late to buy the company's shares?

Still growing

For its fiscal 2023 (ended Sept. 3), Costco registered net sales of $238 billion, making this the world's third-biggest retailer after Walmart and Amazon. That figure is up 72% from just five years ago. According to Wall Street analysts' estimates, Costco's revenue is set to increase at a compound annual rate of 6.1% between fiscal 2023 and 2026. There's still some growth to be achieved.

Profits have risen at an even faster clip due to the benefits of economies of scale. The operating margin was 2.9% in fiscal 2013 but expanded to over 3.3% in the most recent fiscal year. This seems like a tiny change, but when dealing with a massive amount of revenue, it moves the needle for Costco.

As of Feb. 22, there were 875 Costco stores across the world. Management plans to open 31 net new warehouses this fiscal year, with international expansion -- particularly in China -- a key focal point.

While this growth has been impressive, I think it's unreasonable to expect Costco to keep up its historical pace. In other words, it's best to expect more muted gains going forward as the company is in a mature stage of its life cycle.

Unique business model

Costco might operate in a boring industry, but its business is unique in the cutthroat retail sector. Customers must pay annual fees for memberships that allow them to shop at the company's stores. This alone raked in $4.6 billion of revenue last fiscal year, up 8.4% year over year. There are currently 72 million membership households.

Having a predictable, high-margin, recurring revenue stream helps Costco sell its merchandise at rock-bottom prices. The typical markup on its products is just 11%, much lower than other big-box retailers. Shoppers can more than make up the cost of the annual membership fee with these savings.

Operating a membership model drives customer loyalty and stickiness for Costco, which helps insulate it from the threat of competition. Despite the booming success of Amazon in the past decade, particularly its Prime membership offering, Costco has continued to report strong fundamentals.

Expensive valuation

With the market hitting fresh all-time highs, it's not too surprising that some stocks are also in record territory. Costco shares have already climbed 13% through the first two months of 2024.

To be clear, this stock isn't cheap. It trades at a price-to-earnings ratio of 50.7. This is the most expensive level it has sold for since the turn of the century. And it's a huge premium to its trailing-10-year average of 33.7.

It looks like there are sky-high expectations embedded in the current valuation. This doesn't necessarily mean that it's too late to buy this stock. It just means that investors who want to add Costco should be patient and wait for a more attractive entry point.

But given that the market is fully aware of how wonderful a business this is, that day may or may not come.