If you spent more money on food during the ongoing pandemic than you did on sneakers and sportswear, you'll understand why Costco's (COST -0.82%) sales were growing while Nike's (NKE -0.36%) were sinking. But pre-COVID-19, both were strong, innovative companies, and Nike is quickly rebounding from its coronavirus-related plunge. Which one is the better retail stock to buy today?

Brands that have stood the test of time

Costco's bulk-buy model has always been popular with grocery shoppers, which is why it has the highest sales of any food-focused retailer outside of Walmart. People pay to the tune of $60 for an annual membership, and increasingly, $120 for an executive card, for the privilege of shopping in the company's huge warehouses and benefiting from the great prices.

Costco also has pharmacies, travel units, and ear clinics on site in many stores and sells clothing, furniture, and appliances. While some of these ancillary units suffered as COVID-19 struck, the essentials categories were red-hot. And now that most of the company's units are fully open, total sales have soared. Costco has also succeeded in e-commerce, which surged over the past few months. Fiscal fourth-quarter sales were up 12.5% and digital revenue rose 90%. Annual sales increased to $163 billion.

Woman pushing a cart in a bulk-buy warehouse.

Image source: Getty Images.

Nike is the leading apparel company in the U.S., which is a lot to say for a company focused on athletic wear. Athleisure was becoming popular even before the pandemic, and people staying home and staying comfortable is pushing the trend even further. 

Sales fell a spectacular 38% in its fiscal fourth quarter, but they rebounded in fiscal Q1 2021 to a 1% decline. Most of that was due to the company's focus on direct-to-consumer (DTC), which it was developing before COVID-19 and accounted for almost a third of total revenue. Digital sales, which play an important part in DTC sales, increased 82%. Even amid the pandemic, Nike gained market share in women's and apparel.

The Nike community became even more relevant over the past few months as people stayed away from gyms and relied on digital options to help them stay in shape. Nike has several shopping, community, and fitness apps such as Nike.com, SNKRS, the Nike Training Club, and the Nike Running Club. Demand for the Nike commerce app increased nearly 200%, and monthly users saw triple-digit growth.

And these are important numbers because, as CEO John Donohoe said, "We know a consumer who connects with us on two or more platforms has a lifetime value that's four times higher than those who don't."

Close-up of person leaning down and adjusting their Nike sneakers while standing on a rock

Image source: Nike.

Where there are new opportunities

Costco has almost 800 warehouses in eight countries, as compared to Walmart's more than 11,000 global stores. Of those, 552 Costco locations are in the U.S., versus Walmart's nearly 5,000 stores. Supermarket chain Kroger has 2,800 U.S. stores. That means there's still plenty of market share for Costco to capture. There are still five U.S. states that don't even have one. And the company is slowly planting seeds globally. Costco's revenue growth exceeds its rivals' regularly, and there's no reason to see that stopping anytime soon, even though it might slow down as the economy picks up.

Nike is growing as well, and it continued to bring out new products and try new concept stores amid the pandemic. But the more important growth story is in its connected digital experience, which the company expects to drive sales as consumers expect a seamless omnichannel shopping experience. Although it faces competition from other athletic-focused and even regular apparel companies such as lululemon athletica and Gap, none of them come close to Nike's revenue and dominance. With first-quarter sales about flat year over year, investors can expect to see them turn positive in the second quarter.

What about their stocks?

Both companies' share prices are up about the same amount year to date, and they've performed similarly over the past 10 years. Nike stock is trading at 77 times trailing-12-month (TTM) earnings, and Costco is trading at 42 times TTM earnings, which isn't really cheap, either.

Costco edges out Nike just slightly in my opinion, because it's a safer bet. It performs well during challenging economic times even with some of its business closed, and it has a lot of opportunity ahead.