(Bloomberg) -- US retail sales stagnated last month on declines in auto purchases and gasoline prices, though gains in other categories suggested consumer spending remains resilient.

The value of overall retail purchases was flat last month after a revised 0.8% jump in June, Commerce Department data showed Wednesday. Excluding gasoline and autos, retail sales rose a better-than-expected 0.7%. The figures aren’t adjusted for inflation.

The median estimate in a Bloomberg survey of economists called for a 0.1% rise in retail sales.

For many Americans, the significant pullback in gasoline prices has boosted sentiment and likely freed up cash to spend elsewhere. Even so, widespread and persistently high inflation is eroding workers’ paychecks and forcing many to lean on on credit cards and savings to keep up. That presents an enduring headwind to the resilience of consumers in the months ahead.

Sales at gasoline stations fell 1.8% in July, reflecting a steady retreat in gas prices from the record highs seen in mid-June. Purchases at motor vehicle and parts dealers dropped 1.6%.

What Bloomberg Economics Says...

“July retail sales data provided an encouraging signal for a third-quarter GDP rebound after two quarters of contraction. Declining gasoline prices gave consumers some much-needed respite, and they were able to reroute some spending.”

-- Yelena Shulyatyeva and Eliza Winger, economists

To read the full note, click here

Meantime, sales picked up elsewhere. Nine of the 13 retail categories showed increases last month, according to the report, including building material stores, nonstore retailers and electronics. Prior to July, overall retail sales had risen every month this year.

A pullback in consumer spending -- the main engine of US growth -- is a necessary element in the Federal Reserve’s inflation fight. Policy makers are seeking to cool the economy enough to tame price increases, but not so much as to cause a recession or drive a surge in unemployment. Wednesday’s report is one of many data points the central bank will consider when deciding the size of another rate hike next month.

Treasury yields held gains and the S&P 500 index opened lower after the data, which suggested consumer discretionary spending is solid enough to keep the Fed on a path of aggressive interest-rate hikes.

Earnings out this week have also shed light on the health of US consumers. After slashing its outlook a few weeks ago, Walmart Inc. said results improved more than expected in late July thanks to robust back-to-school sales, lower fuel prices and more buying by wealthier customers seeking bargains -- a likely byproduct of inflation. Home Depot Inc. earnings beat estimates, but customer transactions fell for a fifth-straight quarter. 

Target Corp., however, missed even the lowest profit estimates as the company cut prices on home appliances, patio furniture and other discretionary items to right-size inventory. 

What Companies Are Saying... 

“As the year’s progressed, we’ve seen more pronounced consumer shifts and trade down activity... The rising costs for essential items and customers reprioritization spend led to significant mix shifts in our business.” -- John David Rainey, chief financial officer of Walmart Inc., on an Aug. 16 earnings call

Our guidance “assumes that inflation persists at current levels and that we may see a slightly greater offset in transactions through the year. But it’s a conservative assumption and not really based on observation right now.” -- Richard McPhail, chief financial officer at Home Depot Inc., on an Aug. 16 earnings call

“It’s critically important that you all understand we are not currently seeing any measurable reduction in customer spending or any evidence of customers trading down.” -- Howard Schultz, interim CEO of Starbucks Corp., on an Aug. 2 earnings call

Grocery store sales were up 0.2%, likely reflecting rising food prices rather than a significant uptick in purchasing activity. Data out last week showed the cost of groceries has surged 13.1% in the last year, the most since 1979. Sales at restaurants and bars, the only services’ component in the report, climbed 0.1%, the weakest print since a decline in January.

The retail sales report primarily focuses on goods, not services. Consumers have been shifting back toward pre-pandemic spending patterns, which leans more on services like entertainment and travel, and away from the merchandise-heavy tilt of the past two years. A fuller picture of spending in July, which includes both services spending and inflation-adjusted figures, will be released later this month.

Sales receipts at nonstore retailers -- which includes e-commerce -- climbed 2.7%. Amazon.com Inc.’s Prime Day, which occurred mid-month, likely played a role. The event was the largest on record, according to the company, as members bought more than 300 million items globally. 

Do you think inflation in the US has peaked? This week’s MLIV Pulse survey takes a hard look at prices. Please follow this link to share your views.

So-called control group sales -- which are used to calculate gross domestic product and exclude food services, auto dealers, building materials stores and gasoline stations -- were up a better-than-forecast 0.8%, matching the strongest since January.

(Updates with market open)

©2022 Bloomberg L.P.