There may be no more unflappable retail stock than Costco Wholesale (NASDAQ:COST).

Shares of the warehouse retailer have marched higher consistently over the last decade, even as much of the brick-and-mortar retail sector has been turned upside down by the threat posed by Amazon and other online retailers -- and more recently the coronavirus pandemic.

Still, Costco has been a stalwart. The company benefits from multiple strengths and competitive advantages. First, it's an essential retailer, selling mostly consumer staples like groceries, household items like paper products and cleaning supplies, and gasoline. That has been a particular source of fortitude during the pandemic, as sales have surged as consumers have flocked to Costco for bulk goods like frozen foods and toilet paper. Costco's reliance on everyday items also helps make the company recession-proof, as its reputation for bargain prices will keep shoppers coming even in a bad economy like the current one.

The parking lot of a Costco store

Image source: Costco.

Additionally, the company's membership model helps lock in its customer base and creates a unique business model where most of its profit comes from membership fees, allowing the company to sell merchandise near-cost. It operates with significantly lower gross margins than conventional retailers, a sign of its bargain prices.

The chart below shows Costco stock's steady growth over the last decade. As you can see, the stock has been a consistent winner.

COST Chart

COST data by YCharts

Looking ahead, investors are likely wondering if Costco's streak of outperformance can continue over the next five years, especially as the retail industry continues to transform.

A tried-and-true strategy

More than most retailers, Costco's management team remains confident in the company's business model even as the broader industry continues to change. In a nod to the influence of e-commerce, Costco embraced online retail a few years ago, partnering with Instacart to provide same-day delivery on perishable items and offering free two-day delivery for non-perishables. However, the company remains focused on driving customer traffic into the store, which is more profitable for the company and is how its "no-frills" shopping model is designed to work. CFO Richard Galanti has said multiple times on earnings calls that the company is not interested in programs like curbside pickup, as its model benefits from customers shopping inside the store. Because a portion of Costco's merchandise is already rotating thanks to closeout sales, the company benefits from the "treasure hunt" effect, or shoppers discovering items they didn't know they wanted.

During the pandemic, both e-commerce and in-store sales have boomed. In its most recent quarter, comparable sales adjusted for fuel prices and currency exchange jumped 17%, while e-commerce sales, which are included in comps, soared 86%. Not surprisingly, profits surged as well, with earnings per share rising from $1.90 to $2.62.

That kind of momentum shows that Costco is generating strong tailwinds from the pandemic, and it should be able to capture market share from retailers that have been more challenged during the pandemic. Costco's membership base is also climbing fast during the crisis -- the total number of paid members increased 8% to 58,100 in the fiscal year ended in August, accelerating from the previous year. Costco's retention rate is also strong, at 88% globally and 91% in North America, showing that its overall strategy remains a successful one. All of those factors mean that Costco's strategy should continue to be a winner.

What the numbers will look like

Unlike many of its peers, including Walmart, Costco continues to open new stores. The company added 13 warehouses in its last fiscal year, and opened another eight in the last quarter, bringing the grand total to 803. Historically, Costco has opened about 20 warehouses every year, so the company should have about 900 by 2025, assuming that growth rate remains consistent. Comparable sales growth should slow down after the pandemic, but based on historical trends it is likely to be around 5%-10%, meaning investors can expect a 10% annual revenue growth rate over the next five years. That would lift Costco's annual revenue from roughly $163 billion in 2020 to about $263 billion in five years, or 61% total growth. On the bottom line, Costco has a history of steady margin improvement, so it seems reasonable to expect its profit margin to improve from 2.5% to 3% by 2025. That would give the company $7.9 billion in net income, meaning profits would basically double -- as would earnings per share, since the company doesn't generally repurchase significant amounts of stock.

Costco also has a habit of raising its dividend payouts by double-digit percentages, and it even pays a special dividend every few years, though it just paid one at $10/share. That means investors should expect dividend increases to follow with profit growth.

Is it a buy?

Based on its price-to-earnings ratio, Costco stock is more expensive today than it's historically been, trading at a P/E around 40 -- but the broad market is also historically expensive, so Costco's price tag seems to be mostly a reflection of general market trends. 

For investors looking for a safe stock, Costco is hard to beat. The company is recession-proof, has a reliable source of recurring revenue thanks to its membership base and strong retention rate, and is unique in the retail industry as a warehouse retailer of its size, giving it additional advantages.

The stock may be due for a breather after nearly doubling over the last two years, and growth will likely slow when the pandemic ends, but the business itself is rock-solid. For long-term investors looking for a solid compounder that will let you sleep easy, Costco looks like a great bet.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.