Retailing is a brutal industry for all but a select few companies. If the company doesn't have a large scale and/or a leading market share, then it's less likely to be able to generate consistent sales and earnings growth. And even if it does have these characteristics, it can struggle with low profit margins because rivals are always willing to cut prices.

Retailing giants Walmart (WMT -0.08%) and Lowe's (LOW -0.04%) stand out as winners in this difficult operating environment. And while the two companies don't excel in every arena, both of them bring some attractive factors to the table.

But not everyone has the available capital to invest in multiple retailers to help fill out a diversified portfolio. Let's compare the two retailers to see which is the better investment fit today.

Affirming vs. raising

Each of these retailers reported solid earnings results in mid-August, but Walmart is enjoying better momentum right now. The company posted 6% higher comparable-store sales in the U.S. market for the Q2 period. In contrast, Lowe's announced a 2% decrease.

Investors shouldn't read too much into that difference, though. The home improvement industry is seeing some contraction lately after several years of big gains. Lowe's competitor Home Depot also posted a modest comps decline for Q2.

Still, Walmart's recent results were surprisingly strong, convincing management to raise its 2023 outlook to call for sales growth of between 4% and 4.5% this year, up from the prior target of 3.5%. Lowe's management merely affirmed its prior outlook that predicted small declines for 2023. That suggests growth-focused investors will find more to like about Walmart stock right now.

Profits and cash returns

Lowe's has Walmart beat on two key financial metrics. It is far more profitable, for one. Lowe's generated $4 billion of operating profit last quarter on $25 billion of sales, translating into a 16% margin. Walmart boosted its own profitability, too, yet consistently generates margins of around 3% to 4% of sales. Investors shouldn't expect this gap to narrow by much, either, since Walmart mainly sells consumer staples like groceries while Lowe's is located in the consumer discretionary category.

Income investors will also prefer Lowe's for its higher dividend yield. Shares pay a yield of roughly 2% today while Walmart's yield is 1.5%. Both companies have excellent track records of roughly 50 consecutive annual payout raises, meaning it is highly likely that their dividends will rise each year.

The price is right

Two factors about the stocks' relative valuations suggest that conservative investors will prefer Walmart's stock today. It is valued at a cheaper 0.7 times sales, after all, or about half of Lowe's valuation of 1.4 times sales. And Walmart's valuation is more stable, reflecting its larger sales footprint and its recession-resistant business. Lowe's stock will tend to enjoy bigger jumps when the economy is booming, but it faces sharper declines during downturns.

Overall, though, Walmart looks like the better choice here. Its accelerating growth and rising profit margin point to potentially stronger earnings ahead, with less risk of a surprising slump due to a recession. Walmart's industry-leading status confers benefits that Lowe's doesn't enjoy, either, as it fights Home Depot for customers.

Both retailers are likely to set sales and profit records in a few years, but Walmart is priced to deliver a better balance between capital appreciation and dividend income in 2023 and beyond.