Walmart (WMT 1.32%) and Target (TGT -0.70%) are direct competitors and two of the biggest players in the retail space. The big-box leaders are also competing for dollars from investors, and you could be wondering which stock might deliver better returns.

Read on to see which company these Motley Fool contributors think will post superior performance for your portfolio. 

Walmart's at the top of its industry

Keith Noonan: With its massive brick-and-mortar retail network, Walmart actually stands as the world's largest company by revenue, but the company isn't resting on its laurels. The retail giant has been making a big push into e-commerce, and its warehousing, shipping, and logistics infrastructure give it plenty of resources to continue gaining ground in the space and meeting customers wherever they may be. The company's bulk-purchasing and membership-oriented Sam's Club chain has also been putting up strong performance and further diversifies the business. 

While the stock recently saw a significant sell-off amid rising fuel costs, other inflationary pressures, and weaker-than-expected Q1 results, Walmart has an impressive history of outperforming when times get tough. Take a look at the company's dividend-adjusted total return compared to that of the S&P 500 index from 2008 to 2010. 

WMT Total Return Level Chart

WMT Total Return Level data by YCharts.

Amid the last big financial crisis and a sustained recession, the retailer crushed the broader market, and it could once again see climbing traffic if consumer purse strings continue to tighten.

Walmart also has a fantastic dividend history. The company has raised its payout annually for 49 years running, putting it just one year shy of reaching Dividend King status. Through multiple recessions, stock market crashes, a pandemic, and other challenges, the retail giant has reliably continued to raise its payout, and there's a good chance that investors can look forward to more years of uninterrupted payout growth. The stock currently yields roughly 1.8%, trades at approximately 20 times this year's expected earnings, and continues to be a strong candidate for those seeking low-risk long-term investments.

Target is seeing strong momentum

Parkev Tatevosian: Target has been one of the beneficiaries of the coronavirus pandemic. The brick-and-mortar retailer based in the U.S. has seen sales surge since the outbreak. Indeed, in its two most recently completed fiscal years (2020 and 2021), revenue jumped by 19.8% and 13.3%, respectively. Those rates are miles above its compound annual growth rate of 4.3% for the last decade.

Fortunately for Target shareholders, the positive momentum could continue. The company's capital investments in the business are paying off and popular with consumers. Target updated its fulfillment capabilities to include a robust suite of same-day services, including the option for customers to buy online and pick up in-store within hours, buy online and have a Target associate bring the order to your car in the parking lot, and even purchase online and have it delivered to your home within a couple of hours for a small fee. 

These services drive revenue growth and give Target a competitive advantage against Amazon. As fast as Amazon's fulfillment network has gotten, it cannot match the speed of Target's same-day services. As an added benefit, the same-day services are more profitable for the company than the standard free two-day shipping to customers' homes. That helps explain why Target reported record earnings per share of $14.10 in its most recently completed fiscal year.

TGT PE Ratio Chart

TGT PE Ratio data by YCharts.

To make the stock more appealing, Target's shares are trading at a price-to-earnings ratio of 12, near the lowest they have sold for in the last three years. The company faces potential near-term headwinds related to the slowing economy but is somewhat insulated from them because it is a discount retailer. The potential for recession hurt it a bit when it reported a disappointing first quarter for fiscal 2022. That report raised some investor concern and contributed to Target selling at a bargain price. 

Which retail stock should you buy?

For investors seeking sturdy plays in the retail space in uncertain economic times, Walmart and Target each have attractive characteristics. Walmart has size, infrastructure, and distribution advantages, but Target has been growing sales and earnings at much faster rates. Because the smaller retailer trades at lower price-to-earnings multiples and has a higher dividend yield, it looks like the better buy at current prices, but Walmart's durability during tough economic times means its stock is worth considering as well.