Costco Wholesale (COST -0.21%) has long been an outperformer in the retail sector, and the impact of the pandemic has only widened the gap between the warehouse retailer and its peers.

While discretionary retailers have stumbled, Costco has surged as online sales have boomed and consumers have returned to stock up on essentials like food, cleaning supplies, and paper products. In the fourth quarter, Costco's comparable sales jumped 14.1%, excluding fuel prices and foreign exchange rates, showing that the membership-based business has thrived during the crisis -- as have peers like Walmart, Target, and Amazon, all of which offer wide ranges of products, including essential items, at low prices. Costco has also seen e-commerce sales nearly double, rising 91.3% in the quarter, a 16-week period that ended on August 30.

Year-to-date, Costco shares have gained 18%, beating the S&P 500's 5% gain, and Costco shares have increased by nearly 500% over the last decade, not including dividends. Costco's historical bona fides may be clear, but does this stock have what it takes to make you a millionaire? Let's take a closer look.

A view of the parking lot in front of a Costco

Image source: Costco.

A clear leader

Costco's dominates a unique niche in retail, the membership-based warehouse chain. It isn't without competitors, such as Walmart's Sam's Club and BJ's Wholesale, but Costco has more than double the revenue of either of those rivals, making it the undisputed leader in the sector.

The model has a number of advantages over traditional retail. Costco's base of more than 55 million members, who pay $60 annually (or more for executive memberships), gives it a competitive advantage over traditional retailers. That membership base locks in customers and gives Costco a reliable income stream, which makes up much of the company's profits and incentivizes increased spending at its stores as shoppers look to maximize the value of their memberships.

Additionally, that revenue stream helps Costco keep prices low on its bulk goods. Its gross margin has hovered around 13%, significantly lower than that of traditional retailers, showing how its prices are significantly lower than its competitors' prices.

Customers also love Costco: Its membership renewal rates are around 90%, it regularly ranks among retailers with the highest customer satisfaction rates, and its comparable sales regularly outperform those of its brick-and-mortar peers.

The growth path

Costco continues to grow by opening new stores domestically and abroad, growing same-store sales, and building out its e-commerce business.

From August to the end of the year, the company has nine new store openings planned after a pause earlier in the year -- six in the U.S. and three in Canada -- and seems likely to continue expanding as long as demand is strong and there's room in the market.

Unlike Walmart and other peers, Costco doesn't offer curbside pickup, preferring to encourage customers to come into its stores -- but the company has embraced e-commerce, partnering with Instacart to deliver same-day perishables, and it offers two-day delivery of non-perishables with an order minimum of $75. Those moves have paid off during the pandemic, with e-commerce sales doubling in August. Expect Costco's e-commerce growth to remain strong. It has a relatively small retail footprint compared to other big-box retailers, so it's key for the company to have another way to reach customers.

With pressure on discretionary retailers during the pandemic, Costco is likely to pick up market share both on- and offline, which could boost sales growth over the next year or two. Beyond that, the company should continue to grow thanks to its unique set of competitive advantages, and investments in both stores and e-commerce.

The fundamentals

At a price-to-earnings ratio (P/E) of 41, Costco trades at a higher valuation than it has in nearly 20 years, but the company is arguably in a stronger position than it's been in in a long time. It's clearly one of the retail winners during the pandemic; it's proven it can continue to grow regardless of what Amazon does, and it's seeing double-digit comparable sales in recent months, which could last for the duration of the pandemic -- or at least until consumers have other options for spending money at places like restaurants as the economy normalizes.

The company has been growing its dividend annually since 2004, but its yield today is just 0.8%, partially a reflection of its high valuation. Over the last decade, Costco has paid out generous special dividends on three separate occasions -- and based the historical pattern, the company seems due for another one. However, management has tamped down expectations of another special payout, so it may not happen again, at least not soon. Given the fast-changing retail environment, Costco may choose instead to invest in its business.

Is it a millionaire maker?

Whether or not Costco can make you a millionaire probably depends on your time horizon. At a market cap of about $150 billion, it doesn't seem reasonable to expect the stock to be a ten-bagger, and as a mature retailer, the company's growth prospects aren't going to match those of a high-growth tech stock.

However, with its dividend growth, competitive advantages, and growth opportunities, Costco is the kind of stock that would be deserving of a place in almost any portfolio. It won't make you a millionaire overnight, but it's a low-risk option that should be able to outperform the market over the years to come.