If Gas Prices Stay High, Costco Stock Could Be a Better Buy Than Walmart

Source Motley_fool

Key Points

  • Costco has outperformed Walmart stock so far in 2026.

  • While Walmart customers are buying less than 10 gallons per trip to the pump, Costco recently set new records for gasoline sales volumes.

  • Both stocks are strongly outperforming the S&P Retail Select Industry Index, but Costco seems better positioned for an environment of lingering high gas prices.

  • 10 stocks we like better than Costco Wholesale ›

As of this writing on June 10, a new round of U.S. military strikes in the Iran conflict has driven up the price of oil. Higher oil prices mean higher prices at the gas pump. And in an economy where many Americans already feel pressured by high costs of living, that could lead to some changes in how people spend their discretionary income.

Some retail stocks are more vulnerable than others to high gasoline prices. Retail sector stocks in general are struggling in 2026. So far this year, Walmart (NASDAQ: WMT) and Costco (NASDAQ: COST) are both strongly outperforming the S&P Retail Select Industry Index, but only Costco is outperforming the S&P 500 index:

Will AI create the world's first trillionaire? Our team just released a report on the one little-known company, called an "Indispensable Monopoly" providing the critical technology Nvidia and Intel both need. Continue »

WMT Total Return Level Chart

WMT Total Return Level data by YCharts.

Costco shares have delivered slightly higher returns than Walmart stock in 2026. And if gas prices stay high, that outperformance is likely to continue. Costco might be better positioned than any other retailer to keep thriving even if gas prices spike again.

Let's look at a few reasons why Costco could be a better buy than Walmart.

Walmart customers are cutting back on gas

Walmart and Costco both sell gas. So on that basic level, both retailers will keep earning revenue from gasoline even if gas prices stay higher for longer. But customers seem to be reacting to high gas prices in a way that's more troubling for Walmart's business.

On May 21, during the company's most recent earnings call, Walmart's chief financial officer John David Rainey said that although the retailer's higher-income customers are still spending "with confidence," lower-income customers are "more budget-conscious."

As part of that trend, Rainey shared a surprising statistic: Walmart fuel-center customers are now buying an average of less than 10 gallons of gas per visit. That's the lowest level since 2022.

It's a bad sign, indicating that Walmart shoppers are being hit hard by high gas prices. If people are still topping up their tanks at Walmart gas pumps but having to cut back on gas, that could mean they're tapped out and ready to pull back on other consumer discretionary spending. That could lead to less foot traffic in Walmart stores.

Costco: Record-breaking gasoline sales

Gasoline sales make up a significant portion of Costco's revenue -- about 10% of total net sales, according to the 2025 annual report. But the recent spike in gas prices has driven Costco's gas sales even higher than usual.

On the company's most recent quarterly earnings call on May 28, CEO Ron Vachris said that Costco achieved "record-breaking volumes" in its latest fiscal quarter, and the final five weeks of the quarter were "our top five volume weeks ever."

Even beyond the sheer volume of gasoline that they buy, Costco members seem to behave differently when buying gas. Instead of buying cheap gas and driving away, Costco's gas customers tend to stick around and shop. Vachris said on May 28 that company executives believe higher gasoline sales volumes "will drive even greater loyalty with these members in the future, as members who use our gas stations typically spend more with us in the warehouse."

During a previous earnings call on March 5, Costco's CFO said that about 50% of gas shoppers also "cross-shop" at the nearby Costco warehouse. Buying gas at Costco isn't just a way to save money, it's an occasion to go spend some more. People might think: "I'll stop by Costco for the cheap gas -- oh, and while I'm there, I'll buy some groceries for dinner."

A consumer pumps gas while watching the numbers on the pump.

Image source: Getty Images.

Why buy Costco stock versus Walmart stock?

High gas prices aren't the only factor that determines how people spend money or where they shop. But if the Iran conflict leads to a longer, more severe spike in gas prices, it would likely drive inflation even higher for longer across the economy. If inflation rises, Walmart's lower-income customer base is likely to pull back on spending sooner than Costco's more affluent gas-pump bargain hunters.

Costco has a recent price-to-earnings (P/E) ratio of 48.8, compared to Walmart's P/E multiple of 42.3. Neither stock looks cheap compared to the S&P 500's current P/E ratio of 31.3. But if I had to choose today between investing in shares of Costco or Walmart, I'd buy Costco stock.

Should you buy stock in Costco Wholesale right now?

Before you buy stock in Costco Wholesale, consider this:

The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Costco Wholesale wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.

Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $438,283!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,257,427!*

Now, it’s worth noting Stock Advisor’s total average return is 938% — a market-crushing outperformance compared to 206% for the S&P 500. Don't miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.

See the 10 stocks »

*Stock Advisor returns as of June 13, 2026.

Ben Gran has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Costco Wholesale and Walmart. The Motley Fool has a disclosure policy.

Disclaimer: For information purposes only. Past performance is not indicative of future results.
placeholder
Gold Slumps as Dwindling Iran Peace Hopes Reignite Fed Rate ApprehensionGold headed for its worst week since May as collapsed Middle East peace talks stoked inflation fears, driving dollar inflows ahead of crucial U.S. nonfarm payrolls data.
Author  Mitrade Team
6 Month 05 Day Fri
Gold headed for its worst week since May as collapsed Middle East peace talks stoked inflation fears, driving dollar inflows ahead of crucial U.S. nonfarm payrolls data.
placeholder
Market Flash: Oil Surges 5% on Israel-Iran Strikes, Gold Crumbles Below $4,300 Oil prices surged 5% following direct Israel-Iran strikes, while gold tumbled below $4,300 as a blowout U.S. jobs report fueled intense market anxieties over a December Federal Reserve rate hike.
Author  Mitrade Team
6 Month 09 Day Tue
Oil prices surged 5% following direct Israel-Iran strikes, while gold tumbled below $4,300 as a blowout U.S. jobs report fueled intense market anxieties over a December Federal Reserve rate hike.
placeholder
US Attacks Iran Amid the “Ceasefire”: Bitcoin, Gold, and Oil ReactThe United States launched strikes against Iran on Tuesday after a US Apache helicopter was downed over the Strait of Hormuz, breaking the fragile ceasefire previously announced by President Donald Tr
Author  Mitrade Team
6 Month 10 Day Wed
The United States launched strikes against Iran on Tuesday after a US Apache helicopter was downed over the Strait of Hormuz, breaking the fragile ceasefire previously announced by President Donald Tr
placeholder
WTI steadies around $87.50 despite renewed supply concernsWest Texas Intermediate (WTI) oil price experiences volatility after registering over 2.5% losses in the previous day, trading around $87.40 per barrel during the Asian hours on Wednesday.
Author  Mitrade Team
6 Month 10 Day Wed
West Texas Intermediate (WTI) oil price experiences volatility after registering over 2.5% losses in the previous day, trading around $87.40 per barrel during the Asian hours on Wednesday.
placeholder
Gold Price Analysis (XAU/USD): Gold Falls to 6-Month Low as Inflation Fuels Rate Hike Bets, A Buying Opportunity or a Falling Knife? Gold hit a 6-month low on Fed rate hike bets. However, strong central bank buying and technical indicators suggest potential tactical bounces and long-term accumulation windows.
Author  Mitrade Team
Yesterday 07: 35
Gold hit a 6-month low on Fed rate hike bets. However, strong central bank buying and technical indicators suggest potential tactical bounces and long-term accumulation windows.
goTop
quote