It would be easy to presume one of these retailing giants is just as good of a pick as another. After all, a cursory glance suggests they're selling the same basic goods to the same consumers, right? The three just take slightly different approaches to doing so.

But the retailing business isn't quite as simple as it seems on the surface. Walmart (WMT -0.08%), Target (TGT 0.18%), and Costco Wholesale (COST 1.01%) are all different enough in how they operate, and one of them is a better bet in the current environment.

I'd be putting my investing dollars toward Walmart stock right now. Here's why.

Walmart sells more of the right merchandise right now

Don't panic if you already happen to own Costco or Target stock. In time, both of these retailers should be fine and, even though they are lagging of late, their stocks will be fine too.

On balance though, it's Walmart with the overall upper hand right now.

Take last quarter's comparative results from Target and Walmart as an example. Whereas Walmart reported same-store sales growth of 6.4% and overall year-over-year revenue growth of 5.7%, Target's total sales slipped 4.9% year over year, while same-store sales tumbled to the tune of 5.4%. The disparity mirrors a similar one seen between the companies' first-quarter numbers.

WMT Revenue (TTM) Chart

WMT Revenue (TTM) data by YCharts

What gives? The knee-jerk assumption is the drop for Target is related to boycott efforts levied by right-wing groups against Target for its decision to feature LGBTQ+-related merchandise during Pride Month in June. But this ignores what's perhaps the more plausible explanation that involves growing concerns about the direction of the overall economy. That's the fact that Walmart sells more of the most basic goods including groceries, while Target's big draw is its more discretionary goods that cost-conscious and cash-strapped consumers just aren't buying like they usually do. As Target's Chief Operating Officer John Mulligan acknowledged during the second-quarter earnings call, "I think the consumer is still taking a very cautious approach to discretionary spending in the goods sector."

Costco has yet to post last quarter's numbers, but the results investors have heard this year are just OK. Adjusted sales for the quarter ending in early May were up 3.5%, and July's top line was up 4.5% year over year. June's revenue actually fell, however, as did May's. The club-based retailer's guidance for the quarter now underway also fell short of estimates, with Costco recognizing the same inflation that's causing consumers to tighten their purse strings is also crimping demand for the bigger-ticket items -- like furniture and appliances -- that the company also offers.

There's no end to this headwind on the horizon either.

A better handle on inflation's impact

Then there's the other upside of owning Walmart stock that's not as evident. That is, Walmart is better equipped to handle lingering inflation than Costco and Target are.

This wasn't always the case. Last year was notably tough for megacompany Walmart on the cost front. Its cost of sales (or merchandise) grew more than actual sales did, dragging operating income down to the tune of 5.5% year over year. Higher interest expenses also took a bigger bite out of the bottom line. Being bigger than Costco and Target, it's tougher to respond quickly to changes in the economic environment.

Its sheer size, however, means Walmart can ultimately respond to inflationary pressures in a bigger, better way. For instance, late last year CEO Doug McMillon flatly told many of its product suppliers it wouldn't be paying higher prices to source goods -- a message it reiterated in February of this year. And, being the world's single-biggest seller of several categories of consumer goods, it's in a position to hold that line.

Neither Costco nor Target enjoys the same degree of distribution leverage with its suppliers.

Walmart also has a growing number of private-label products it can fall back on should national brands choose to not sell their goods to and through Walmart.

But Walmart's ability to deal with inflation isn't limited to its hold on suppliers by virtue of being the world's biggest brick-and-mortar retailer. It's also benefiting from inflation's impact on consumers. CFO John Rainey noted during the company's second-quarter earnings call:

[W]ith respect to high-income consumers, we continue to see share gains across all income demographics. I think encouragingly for us in the quarter, the number of categories that we saw share gain in actually expanded. But this has been pretty consistent for five or six quarters now.

That's not to suggest Target and Costco don't attract higher-earning customers. They do.

However, these are consumers Costco and Target largely already serve, thus limiting opportunities to win more of them over. Data from Numerator indicates the average Costco customer lives in a household earning on the order of $125,000 per year. The figure's closer to $80,000 for Walmart's and Target's core customers -- or was anyway.

That number's seemingly inching higher for both retailers now. The thing is, prior to this year Target was still meeting the more discretionary spending needs for this lower-earning crowd. Those extra discretionary dollars just don't exist right now. Walmart offers more of the more-affordable stuff consumers have to have.

Walmart is the clear winner until something changes

None of these distinguishing factors are permanent. There will come a time when wages are growing faster than inflation again and price worries aren't so prevalent. Suppliers are also perpetually looking for new places to promote their products, including online. To this end, an analysis from PYMNTS indicates Walmart has already squandered its dominance of several key product categories like clothing and furniture to Amazon, and it is threatened on the personal care and even auto parts fronts.

Meanwhile, Walmart is starting to shutter more than a few stores, opening the door to rivals looking to expand their reach into certain geographic markets. This may improve same-store sales in the short run, but it clearly hurts long-term revenue growth. Perhaps it's running out of places to establish viable brick-and-mortar presences.

Those are relatively modest threats, though, and Walmart's competitive advantages are going to remain protected for the foreseeable future. That's why Walmart stock is the smartest pick among the three names in question right now.