Retail stocks are broadly struggling in 2026, but Costco Wholesale Corporation (NASDAQ: COST) has managed to outperform the S&P 500 index while Walmart (NYSE: WMT) has not.
Both Costco and Walmart have strongly outperformed the S&P Retail Select Industry Index so far this year, though Costco shares have delivered slightly higher returns than Walmart stock.
Analysts suggest that if gasoline prices remain elevated, Costco’s outperformance over its retail peers is likely to continue well into the year.
The national average for gasoline currently stands at $4.42 per gallon, up 25 cents in just one month and sharply higher than the $3.16 average recorded a year ago, according to the American Automobile Association.
Costco reported “record-breaking” gas volumes near the end of its most recent quarter as fuel prices climbed, signaling that consumers are actively seeking out cheaper fuel options.
Costco’s member-only gas stations typically sell fuel at discounts of $0.20 per gallon or more compared to local averages, giving drivers a compelling reason to bypass traditional gas stations.
With oil prices spiking due to the war in Iran and ongoing uncertainty across the Middle East, the incentive for shoppers to seek out Costco’s discounted fuel has grown considerably stronger.
The warehouse retailer benefits from a clear domino effect, where customers who visit to fill up on discounted gas frequently cross into the warehouse to stock up on groceries and household essentials.
On the company’s latest earnings call, CFO Gary Millerchip noted that “about half of members that will shop at the gas station will also cross-shop at the warehouse,” underscoring the strategic value of Costco’s fuel business.
Costco earned approximately 10% of its net income from gasoline sales in 2025, and Costco members carry higher average incomes than customers of both Walmart and Amazon, making them more resilient spenders.
Higher gas prices will inevitably push up Costco’s own transportation and energy costs, but the company can offset those pressures by growing its cardholder base, sustaining high membership renewal rates, and continuing to open new warehouse locations.
Costco currently trades at a price-to-earnings ratio of 48.8, compared to Walmart’s P/E multiple of 42.3, with neither stock appearing cheap against the S&P 500’s current P/E of 31.3.
Despite the premium valuation, Costco’s unique combination of discounted fuel, bulk pricing, and an affluent and loyal membership base gives it a structural advantage over Walmart in a high-gas-price environment.