"In recent years, Home Depot had pulled ahead of Lowe's in a major way, and while it's always been the superior operator, I think it's worth asking why," the "Mad Money" host said on Thursday. "After all, both stocks have been slammed here."
Cramer pointed out that Home Depot's stock is down 7.5 percent for the year and Lowe's stock is down 7.8 percent, but "unlike so many other names, they haven't bounced nearly at all."
"At these levels, it pays to wonder which one is a better buy," he said.
Cramer admitted that over the years, he has preferred Home Depot over Lowe's because of its generally better earnings results, same-store sales and growth.
He also likes Home Depot because of the investments it has made in technology; in 2010, the company gave its salespeople smartphones designed to handle in-store communications, manage inventory, search for products and process customer checkouts.
In 2015, Salesforce.com CEO Marc Benioff talked about how his customer relationship management company was working with Home Depot on its customer service model, eventually rolling out a Home Depot app designed to help customers schedule appointments and get quotes for products.
"They were doing buy online, pick up in the store before BOPUS was ever even an acronym," Cramer said. "The whole setup is optimized for the customers, especially the big-ticket professional contractors. And that, by the way, is where the real money is."
The "Mad Money" host acknowledged that Lowe's has also been investing in technology, but at a slower rate. Lowe's started moving its software to the cloud in September, long after Home Depot made the push.
And while Lowe's has its own apps, some of which have been critically acclaimed, Cramer argued that they are still behind on technology that improves the customer experience.
"Do not get me wrong: Lowe's obviously recognizes that it has a lot of catching up to do on the tech front and they've gotten aggressive about it," he said. "But it still seems to me that Home Depot has more of a focus on its bigger ticket customers, and ... winning them over is everything."
But the rivalry doesn't all fall to technological capabilities, Cramer said, positing another, simpler theory: that Lowe's fell behind while integrating RONA, the Canadian retailer it acquired in 2016.
When it comes to investing, Cramer noted that Lowe's was a lot cheaper, trading at 14 times next year's earnings estimates compared to Home Depot's 17 times price-to-earnings multiple.
But he argued that Lowe's discount was deserved because investing in the company is slightly riskier than buying shares of Home Depot.
"Bottom line? With Lowe's and Home Depot down big from their highs, I think the latter is a better buy than the former, perhaps because of its technology or because Lowe's may have been distracted by its relatively recent acquisition of RONA," Cramer said. "Either way, Home Depot has the better numbers, and while I think both stocks will work here after this clobbering, HD is the one I like most. When the market settles down, this domestic retailer with no trade exposure will be the one to buy."