Investing in the retail sector can prove challenging, particularly during uncertain times. Consumers and retailers face various economic challenges, including an uncertain tariff policy.

However, it's important to look beyond the recent turbulence. In fact, it could create a buying opportunity for long-term successful retailers that maintain a competitive edge.

Walmart (WMT -1.05%) and Kohl's (KSS 3.15%) have been moving in opposite directions. But which retailer offers the better stock return potential going forward?

Someone picking out an item in a store.

Image source: Getty Images.

Walmart

Walmart has an established identity that resonates strongly with shoppers. Since opening its first discount store more than six decades ago, it has sought to offer customers low prices.

To help accomplish this, it examines costs closely. In fact, this is ingrained in the company's culture. That gives Walmart a competitive advantage over other retailers.

Management has also invested resources into technology to keep up with the competition, including e-commerce behemoth Amazon. This includes omnichannel capabilities that allow for online ordering and picking up at the store, often on the same day. It also has a subscription program, Walmart+, that offers benefits like free shipping.

Shoppers remain drawn to Walmart's selection, convenience, and low prices. At its core Walmart U.S. division, same-store sales (comps) increased 4.6% in the fiscal second quarter. Importantly, higher traffic contributed 1.5 percentage points, while increased spending accounted for the balance. The period ended on July 31.

Management bumped up its companywide sales growth outlook for this year, raising it from 3.5% to 4.25%, using the midpoint of its guidance. The figure excludes foreign-currency exchange translations.

Owning the shares has been beneficial for shareholders over the years. In just the last year through Sept. 2, Walmart's stock appreciated 26.7%, nearly double the S&P 500's (^GSPC 0.34%) 13.6%.

The valuation has become more reasonable during this period, with the stock's price-to-earnings (P/E) ratio contracting from 40 to 36.

Still, investors expect the market-beating stock returns to continue, given that the shares trade at a higher P/E multiple than the S&P 500's P/E of 30.

2. Kohl's

Kohl's offers a broad range of offerings across categories like apparel, accessories, beauty, and home products. It seeks to sell these items at moderate prices.

Unlike Walmart, its offerings haven't been attracting shoppers. Kohl's has struggled with traffic and sales for some time, despite various initiatives, such as offering people the ability to return items they bought on Amazon at Kohl's stores.

The company's fiscal second-quarter comps fell 4.2%. This helped drive its operating income, adjusted for certain nonoperating and nonrecurring items, down to $161 million from $165 million. The results are for the quarter that ended Aug. 2.

Management doesn't expect sales to improve anytime soon, either. It projects this year's comps to drop 4% to 5%.

It's hard to see management's turnaround plans, since Kohl's doesn't have a permanent chief executive officer. The company has cycled through CEOs, including the board of directors dismissing CEO Ashley Buchanan earlier this year after only a few months on the job due to the discovery of an inappropriate relationship.

Investors have sent the shares down 16.8% over the last year. The stock, with a P/E multiple of 9, trades at a much lower valuation than the S&P 500, however.

Which way to invest?

It's tempting to view Kohl's as a value stock. After all, it trades at a P/E ratio that's one-third of the S&P 500's P/E multiple. However, with slumping sales and profitability and no clear plan to reverse course, I'd stay away from the stock.

Walmart, with its consistent ability to draw customers and invest in the future, is the clear choice for me, despite the above-market valuation. It's worth paying more, especially given the company typically performs well during challenging economic times, as more people shop at Walmart due to its prices.