Costco (COST 1.01%) went public on Dec. 5, 1985, at a price of $10 per share ($1.67 adjusted for stock splits), and closed trading on Nov. 3 at a price of $371.96.

That is an impressive gain by any measure. Over the nearly 35-year time frame, Costco stock returned a compound annual growth rate (CAGR) of approximately 16.7%, excluding dividends. Over that same stretch, the S&P 500 generated annual returns of only about 8.3%. 

A $1,000 investment in Costco's IPO would be worth almost $223,000 today. Let's see how Costco was able to produce such eye-popping returns. 

Membership warehouses 

Costco is the leader in the warehouse retailing space, with 800 total locations as of Aug. 30 primarily in the United States, Canada, Mexico, United Kingdom, and Japan. The company's focus on selling high-quality merchandise at the lowest prices possible has attracted a loyal customer base.

woman shopping in a warehouse

Image source: Getty Images.

CEO Craig Jelinek highlights this strategy: "Costco is able to offer lower prices and better values by eliminating virtually all the frills and costs historically associated with conventional wholesalers and retailers, including salespeople, fancy buildings, delivery, billing, and accounts receivable. We run a tight operation with extremely low overhead which enables us to pass dramatic savings to our members." 

Net sales in the most recent fiscal year totaled $163.2 billion, making Costco one of the largest companies in the world. Achieving this kind of scale ultimately benefits shoppers as Costco's size will continue allowing it to buy inventory at favorable costs. This is what got the business to where it is today, and it is a virtuous cycle that is difficult to stop. 

Costco counts 58.1 million households as having memberships, which is the primary source of profit for the company. Since its overarching goal is to lower prices for customers, Costco earns next to nothing on merchandise sales and instead makes most of its profits from membership fees. Having a membership model drives loyalty and gives Costco the opportunity to keep delighting its customers, something that has served the company well historically. 

What a year it has been 

Even with what has been a turbulent 2020, the stock is up roughly 29% this year alone. The onset of the coronavirus pandemic has highlighted the essential nature of Costco's business. The market recognizes this, rewarding the stock with a price-to-earnings multiple of 42 compared to the Nasdaq's P/E ratio of 24. Quality businesses warrant a higher multiple than the overall stock market. 

Investors were probably wondering where a company Costco's size might find growth going forward -- then, 2020 happened. This year has accelerated an already existing shift to e-commerce, and Costco has been a huge beneficiary. In the most recent quarter, which ended Aug. 30, online sales soared 90.6% from the year-ago period. 

While it's difficult to say how long this hyper-growth can last in a post-pandemic world, Costco is well-positioned to take advantage of consumers' increasing appetite to transact when and where they want. 

A learning experience 

Costco's stock price appreciation since its IPO in 1985 would have made investors rich if they had the foresight to predict what the business could become and hold on during the ups and downs, both probably unlikely. 

But I think there is an important lesson we can learn here: owning high-quality businesses over the long term and letting them ride through the inevitable volatility can lead to market outperformance. Costco may not provide outsized returns over the next 35 years, but investors can still apply this framework when searching for the next big winner.