The tariff risk is a big one for retailers. It can spike costs significantly for businesses, forcing them to either pass on those increases to consumers, or absorb them, resulting in leaner profits. It's not a great situation, regardless of which way you want to look at it.

Some retailers, however, have been demonstrating strong resilience in the face of these threats, in a great sign of their sheer strength. Walmart (WMT -1.68%), Costco Wholesale (COST -1.12%), and Dick's Sporting Goods (DKS 1.00%) all posted strong quarterly numbers recently. Does that make them good buys today? Let's take a closer look and find out.

Person shopping for groceries.

Image source: Getty Images.

1. Walmart

On May 15, big-box retailer Walmart released its latest quarterly results, for the period ending April 30. Sales for the quarter totaled $165.6 billion, which were up by 4% when excluding the impact of foreign exchange. And its operating income also rose by more than 4% to $7.1 billion.

Around 60% of the company's sales come from its grocery operations, which is why the business may be better suited to handle the effects of tariffs than other retailers. Groceries are necessities that consumers simply can't forgo the way they can with more discretionary purchases when prices rise. And with Walmart offering a vast array of products, it's also a convenient one-stop shop for customers in the event they do want to buy more than just groceries.

The retail stock has done well this year, rising by more than 7% in value entering trading this week. At more than 41 times its trailing earnings, it isn't a cheap buy. But if you want stability and are willing to hang on for the long haul, Walmart can be one of the safer and more resilient retail stocks to put in your portfolio right now.

2. Costco Wholesale

Another top retailer that has been doing well of late is Costco. It posted its latest numbers on May 29, and it posted comparable revenue growth of 8% for the period ending May 11. Total revenue of $63.2 billion was up by a similar percentage, while net income of $1.9 billion rose by 13%.

The company did say that tariffs have increased its costs and forced it to raise prices in some situations. But consumers can often save money on a per-item basis when shopping at Costco by buying in bulk, and a solid growth rate in the past quarter seems to indicate that's still very much the case.

Costco's stock is up 9% this year, but at 57 times its trailing earnings, its valuation has gotten a bit out of hand. And my concern is that if economic conditions worsen, consumers may not be able to afford to buy in bulk, even if it means saving money in the longer term. Cutting out a trip to Costco is an easy way for shoppers to reduce their overall expenditures, and that may end up happening if economic conditions don't improve.

When you combine that with an extremely high-priced valuation, you end up with a stock that could be due for a steep correction. As much as I like Costco's business, this isn't a stock I'd buy today, as there's simply too much optimism and bullishness priced into its current valuation.

3. Dick's Sporting Goods

The retail stock that has surprised me the most is Dick's Sporting Goods. The sporting goods retailer is not only doing well and growing, but it's in acquisition mode as well. Recently, it announced plans to buy Foot Locker for $2.4 billion as it looks to reach a broader customer base.

And Dick's is already doing well as it is. In its most recent quarter, which ended on May 3, its same-store sales growth was 4.5%, marking the fifth straight quarter where its comparable growth rate was more than 4%. That's a remarkable achievement at a time when consumers are supposedly cutting back on discretionary purchases. The bad news is that the company did experience an 11% decline in its bottom line, with net income falling to $264 million for the period (on net sales of $3.2 billion).

The stock has been struggling this year, and it is down more than 20% thus far in 2025 amid macroeconomic concerns. But it trades at just 13 times its trailing earnings and could be a good value buy, especially with it still producing solid growth and looking to enhance its prospects with the acquisition of Foot Locker.

While there is some risk here in the short term, given Dick's modest valuation, I think the stock can make a lot of sense as a long-term hold, as it gives investors a good margin of safety at its reduced price.