While many businesses have had to shut down as a result of COVID-19, Amazon.com (NASDAQ:AMZN) and Home Depot (NYSE:HD) have had the opportunity to stay open. But the two still face significant challenges, and both have made adjustments to serve customers while keeping employees safe. 

Those adjustments are hurting profits even as sales increase. The decision of which to invest in should go beyond the short-term circumstances and look at which company will likely do better over the long run. 

Amazon packages left in front of a doorstep.

Image source: Getty Images.

Amazon 

Still, it is difficult to overlook the challenges in the near term. In the release from the most recent quarterly results, CEO Jeff Bezos said, "From online shopping to [Amazon Web Services] to Prime Video and Fire TV, the current crisis is demonstrating the adaptability and durability of Amazon's business as never before, but it's also the hardest time we've ever faced." 

Overall growth for the company has been robust and doesn't appear to be slowing anytime soon. Revenue in the most recent quarter increased by 21% from a year ago. The pandemic has pushed people to shift more of their shopping to Amazon, and some of these customers will stick around even after the health crisis has run its course. 

The company already has an estimated 112 million Prime members. These customers not only pay a monthly or annual fee, but they also spend more money than other shoppers. One of the benefits of membership is Prime Video, and with the soaring demand for in-home entertainment, this feature makes the subscription even more enticing. 

The significant risks with Amazon in the near term are the increasing expenses to adjust to the coronavirus outbreak. In the first-quarter press release, Bezos said:

Under normal circumstances, in this coming Q2, we'd expect to make some $4 billion or more in operating profit. But these aren't normal circumstances. Instead, we expect to spend the entirety of that $4 billion, and perhaps a bit more, on COVID-related expenses getting products to customers and keeping employees safe. 

A Home Depot associate organizing inventory.

Operating expenses rose at Home Depot, hurting net income. Image source: Getty Images.

Home Depot 

Home Depot was deemed an essential business and allowed to keep its brick-and-mortar locations open. But it did need to make several adjustments to keep its employees and customers feeling safe in its stores. The costs of those changes are adding up, and unlike Amazon, the boost in sales might be short-lived. 

The company does have over $8.6 billion cash on hand after going to the debt markets and borrowing $5 billion. That should allow it to continue investing in long-term initiatives, even while dealing with the short-term impact of COVID-19. 

On April 1, the company announced some changes: Employees are to receive increased pay, more paid time off, and will undergo temperature checks before coming to work. Simultaneously, there are limits on how many customers are allowed in a store. A spring promotion was canceled, and only essential in-home services will be performed. 

Still, sales increased in its most recent quarter by 7.1%, as people sheltering in place took on home improvement projects. But the precautions to slow the spread of the coronavirus took a toll. As a result, total operating expenses increased by 17%, and net income was down by almost 11% even though sales increased. 

The final verdict

Both Amazon and Home Depot are great companies for long-term investors. But if you had to invest in only one of these retail stocks, it should be Amazon. While both are likely to grow your wealth over time, the prospects for the e-commerce giant are better and more sustainable than those of Home Depot. 

Uncertainty will likely remain high through the rest of the year. Therefore, investors should break down the desired allocation into pieces and dollar-cost-average over several months while accumulating shares.