The US economy shrank for a second quarter in a row—a common definition of recession—as businesses trimmed their inventories, the housing market buckled under rising interest rates, and high inflation took steam out of consumer spending.

Gross domestic product, a broad measure of the goods and services produced across the economy, fell at an inflation and seasonally adjusted annual rate of 0.9% in the second quarter, the Commerce Department said Thursday. That followed a 1.6% pace of contraction in the first three months of 2022.

The report indicated the economy met a commonly used definition of recession—two straight quarters of declining economic output.

The official arbiter of recessions in the US is the National Bureau of Economic Research, which defines one as a significant decline in economic activity, spread across the economy for more than a few months. Its Business Cycle Dating Committee considers factors including employment, output, retail sales and household income—and it usually doesn’t make a recession determination until long after the fact.

Get The New York Times and Financial Times Digital Subscription Combo 77% OFF

Whether or not the US is in a recession now, ING economist James Knightley said that a downturn is “really only a matter of time,” given pressure on American households from inflation, equity markets and “the housing downturn really gathering pace now,” which he said “reinforces the feeling that it’s only a matter of time before we’re in a proper recession.”

Most economists surveyed this month by The Wall Street Journal expect the economy to grow in the third quarter and in 2022 as a whole, though lately they have lowered their estimates.

“We’re seeing a sharp and necessary deceleration rather than a recession,” said David Mericle, chief US economist at Goldman Sachs, adding that slower growth is needed to rebalance the economy’s supply and demand for goods and services, and cool wage growth and inflation. “I wouldn’t say we seem to be in contractionary territory on a go-forward basis,” he added.

The new figures mark a sharp pullback from the final quarter of 2021, when GDP rose at a 6.9% annual rate. That capped a year in which the economy recovered strongly from the effects of the 2020 pandemic-driven recession and posted its best annual growth since 1984, stoked by low interest rates and roughly $6.4 trillion of government borrowing and spending since Covid-19 struck.

President Biden took office a year-and-a-half ago pledging to heal a nation battered by the pandemic by boosting a nascent economic recovery with massive assistance from Washington. Headed into midterm elections this fall, the latest figures have put the White House on the defensive about the state of the economy.

Get The Wall Street Journal Newspaper | WSJ Newspaper | WSJ Print Save 30% Off

The GDP report underscored the challenges facing U.S. businesses, households and policy makers—including high inflation, weakening consumer sentiment and supply-chain volatility.

Consumer spending, which accounts for roughly two-thirds of total economic output, rose at a 1% annual rate in the second quarter, down from 1.8% in the first quarter. People continued to travel and shop as more people gained jobs.

Inflation hit a fresh four-decade high during the second quarter, eroding Americans’ purchasing power. The Federal Reserve responded by aggressively raising interest rates, which in turn cooled the housing market, reducing brokers’ commissions and denting construction. The central bank raised rates Wednesday and indicated more increases were likely.

Residential investment subtracted 0.71 percentage point from GDP. Business investment worsened slightly, with spending on structures and equipment declining.

Percentage–point contribution to GDP change for select categories, 2Q 2022

The U.S. economic recovery is following an unusual trajectory, with weakening output but strong job gains. The unemployment rate, a key barometer of economic health, held steady at a low 3.6% for the past four months, and employers continued to hire at a strong pace. The Labor Department said Thursday that new applications for unemployment benefits, a proxy for layoffs, held last week near the highest level of the year, a sign that the tight labor market is loosening.

Get The New York Times and The Economist Epaper 3 Years

Inventories—specifically, the pace at which companies restocked—accounted for much of the decline in the second quarter, subtracting 1.96 percentage point from GDP. A shift in spending away from goods and back toward services, and rising prices cutting into people’s buying power, left many companies with stockpiles of products they are now discounting to unload.

Walmart Inc. said on Monday that it was having to cut prices to reduce merchandise levels at its flagship chain and Sam’s Club warehouse chain. Many manufacturers are also still struggling with pandemic-related supply-chain disruptions.

Business is “a little unhealthy right now” at Best Tool & Engineering Co., according to its president, Joseph Cherluck. The company, based in Clinton Township, Mich., makes tools and plastic components like welding fixtures for vehicle dashboards, and the nationwide shortage of computer chips means auto makers are pushing back orders.

“Autos are waiting for chips and we’re seeing it down the supply chain,” said Mr. Cherluck, adding that he is concerned about the economy slowing. The 15-employee company has frozen equipment purchases and scaled back hiring plans as a result. “I feel uncertain about the rest of the year,” Mr. Cherluck said.

Trade provided one bright spot in the report: Exports rose at a robust 18% annual rate, as demand picked up for American-made goods and more international travelers returned to the U.S. after pandemic disruptions.

Get The WSJ Print Edition – The Wall Street Journal Newspaper 52-Weeks Delivery Save 30% Off

Some economists prefer to look at final sales to domestic purchasers—a subset of GDP that doesn’t include the often-volatile categories of inventories and trade—to better gauge U.S. economic activity. Final sales fell at a 0.3% annualized pace in the second quarter, after rising at a 2% pace in the first.

Americans still have relatively healthy balance sheets. After the pandemic hit the U.S. economy in early 2020, increased household saving, government stimulus checks and enhanced unemployment benefits boosted household finances. The resulting “excess savings”—the amount above what they would have had there been no pandemic—remains elevated. According to Moody’s Analytics, excess savings totaled $2.5 trillion in May.

Some consumers are hunkering down now. Aimie Gresham of Essex, Conn., has pulled back on discretionary spending—like dining out and expensive salon visits—to pay the higher prices for basics like oil, electricity and groceries in recent months.

“Even my cat’s food has gone up” by about $10 a bag over the past year, said Ms. Gresham, who works at a retirement financial firm. Her husband’s car has 250,000 miles on it, but the couple decided not to replace it because of the current high prices. “In any other market we would be buying a new car right now,” the 54-year-old said.