COVID-19 has been an economic disaster, with small businesses getting wiped out, large companies declaring bankruptcy, and unemployment reaching 14% at its worst. Some companies, however, have seen skyrocketing sales as a result of current conditions, and large retailers are near the top of that list.

As customers have stocked up on essentials from their favorite big-box stores, Costco Wholesale (NASDAQ:COST) and Walmart (NYSE:WMT) are some of the winners. Let's take a look at what makes them different and which one is a better investment today.

A Walmart customer carries a large package in the store.

Image source: Walmart.

A case of two leading companies

Costco and Walmart are both discount retailers that sell grocery items as well as general merchandise products, such as clothing and furniture. They both also have special units, such as Costco's travel and optical units and Walmart's prescription drug and healthcare units.

The main difference between the two companies' business models is that Costco sells items in bulk and requires a membership, whereas Walmart's differentiating factor is its sheer size and the amount of products it offers. Its superstores are an all-in-one shopping experience that offer convenience and price benefits, with many shopping and delivery options. Whereas many retail companies are moving to a small-size or boutique feel, Walmart is still king of the giant store.

Walmart is an ubiquitous presence in the U.S., operating in all 50 states with nearly 5,000 stores. It's making its mark on the global landscape as well, with a total of 11,500 stores globally, and is the largest retailer in the world. Costco, on the other hand, has only 547 stores, or warehouses, in the U.S. and Puerto Rico for a total of 787 worldwide.

Costco took $149 billion in 2019 sales, while Walmart made $524 billion. Let's see how their sales have been growing. (One note: The two companies' fiscal years differ slightly. For comparison, Costco's spring quarter covers Feb. 17 to May 10; Walmart's covers Feb. 1 to April 30. Walmart just reported results for its summer quarter, but Costco hasn't yet.)

Company / Metric Summer 2020 Spring 2020 Winter 2020 Fall 2019 Summer 2019
Costco sales growth N/A 7.3% 10.5% 5.6% 7%
Walmart sales growth 5.7% 8.6% 2.1% 2.5% 1.8%

Data source: Company reports.

In general, Costco's sales outdo Walmart's in terms of growth, but Walmart has been seeing tremendous success since the pandemic began, and since it has focused on expanding its digital options. However, Costco takes in almost a third of its sales, even though it only has a less than a tenth of Walmart's store count.

What the future holds

Both of these companies have been making strong inroads in digital, which impacted them positively during the pandemic. Walmart, as the largest U.S. retailer, certainly had the opportunity to trounce Amazon.com (NASDAQ:AMZN) in the beginnings of Amazon's branching out to every sales category under the sun and missed it. It's gotten on board, though, and has aggressively grown its e-commerce program successfully. Digital sales grew 97% in the third quarter, even greater than the 74% increase in the first quarter.  

Customers loading a box into a hatchback vehicle

Image source: Getty Images.

Costco membership grew to 55.8 million in the quarter ended May 10, up from 55.3 million 12 weeks before. Executive memberships, which cost $120 instead of the basic $60 membership fee, are growing as well. The membership renewal rate was 91%, which is typical for the company. Costco's markup is only about 13%, well below the retail average, and customers love getting those savings when purchasing in bulk quantities. The company gets a portion of that back through its dependable membership fees. Costco has seen digital success as well, and despite its bulk, has proven that it can become an agile business in the digital world. It opened 16 new U.S. warehouses in 2019 and one each in the U.K., Australia, South Korea, and China. The Chinese store, in Shanghai, had 139,000 sign-ups on opening day, and there's huge potential in that region. 

Where the stock is going

Costco is fairly pricey, trading at 36 times forward earnings estimates, while Walmart's share price is a more moderate 26, but there's a reason for that. Costco shares are up 16% year to date as of Wednesday morning and have an impressive 18.6% five-year annualized return, while Walmart's shares are up 11% year to date and have a 14% five-year annualized return. Those numbers are all pretty remarkable, and both of these companies have been solid investments. They will both continue to be, and I'd recommend them both. But if I had to choose one over the other, I'd choose Costco, for its recession-proof model, strong customer loyalty, and great potential for further growth.