Both Costco Wholesale (NASDAQ:COST) and Nike (NYSE:NKE) are feeling the impacts of the COVID-19 pandemic. While Costco was able to keep almost all its stores open during the shutdown, Nike had to shift almost entirely to online-only. Now that cities, states, and countries are beginning to reopen their economies, Costco and Nike are adjusting to the change.

Costco was not immune to the impacts of the outbreak; the changes it made to stay open increased its expenses. Meanwhile, Nike is well on its way to reopening many of its stores. Both companies have faced significant volatility in the short term. Let's take a closer look at which one would make the better long-term investment. 

Which to choose?

Image source: Getty Images.

Costco benefits from staying open during the pandemic

Costco operates 787 warehouse stores worldwide, ]most of them in the U.S. and Canada. However, the company expects most of its future store growth to happen in foreign markets. Moreover, even though the COVID-19 pandemic is causing disruptions, the company still plans to open 10 warehouses in 2020.

Costco was able to stay open during the lockdowns, but it was not business as usual. It made adjustments to help customers and employees feel safer, and it increased wages to encourage employees to show up to work. Overall, these expenses added up to a cost of $287 million, or $0.47 per diluted share in the quarter. 

But it's important to note that and Home Depot experienced more substantial increases in expenses, even though their sales grew as well. This was an instance where having a brick-and-mortar presence proved advantageous against Amazon's e-commerce juggernaut. In the most recent quarter, Costco's revenue was up by 7%. What's more, operating income increased by 5%, even after increases in wages and sanitation costs. 

Furthermore, the fact that Costco sells groceries -- and, in some locations, gas -- gives consumers a compelling reason to visit. That allows the company to make more higher-margin in-store sales. 

Nike is hoping for a boost from sports restarting

Nike is in the business of designing, developing, and selling athletic footwear, apparel, and equipment worldwide. It is the largest seller of athletic footwear and apparel in the world. Its market-leading position will help it benefit from the trend toward active lifestyles, which has slowed down since gyms around the country were shut down. Over the last three years, revenue has grown from $32.4 billion to $39.1 billion.

The company gets a big branding boost from the famous athletes it sponsors across various sports, including Lebron James, Cristiano Ronaldo, Rafael Nadal, and Rory Mcllroy. Yours truly owns a pair of Nike Lebron James basketball shoes, which were exhilarating to compete in when playing team sports was still a thing. Nike should get a boost as gyms start reopening and the National Basketball Association resumes its season. Still, the coronavirus-induced shutdowns will likely cause Nike to report a dropoff in sales when it reports its fiscal-fourth-quarter results on June 25. The shutdowns in China negatively impacted Nike's third-quarter results, whereas the shutdowns in North America will negatively impact Nike's fourth quarter..

In the long run, Nike's direct-to-consumer business and Nike+ app will allow it to connect with customers and develop a better understanding of their behavior. It can then use this information to create products that are better fitted to its customers' needs -- simultaneously reducing the risk of developing and marketing a product that flops. 

A woman lacing up her Nike shoes.

Nike sponsors famous athletes. Image Source: Getty images.

The final verdict 

Costco and Nike are both excellent companies that will likely increase your wealth if you invest in them for the long term. However, if you had to choose between them, the one to pick should be Nike.  

Admittedly, Nike is selling at a premium compared to Costco. Its ratio of enterprise value to earnings before interest, taxes, depreciation, and amortization (EBITDA) is 31, compared to 19 for Costco. And its price-to-earnings (P/E) is 47, vs. 36 for Costco. However, the premium might be justified by the fact that Nike's average return on investment over the last five years is 24%, compared to 15% for Costco.

Still, volatility is likely to remain high as fears of a second wave of an outbreak are evident. Therefore, it would be practical to dollar-cost-average your purchase of this consumer goods stock.

CORRECTION: The original version of this report had a typo in the amount Costco lost in earnings per share because of its COVID-19-related expenses. We're sorry for the error.

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.