The Great Recession shook households of every income, with a median 45 percent decline in wealth for the majority of consumers surveyed in a Federal Reserve study released Thursday.

The survey followed families from 2007 to 2009 as the financial crisis roiled the nation, offering what Fed officials said was the first detailed analysis of the finances of individual households through the recession. It found that nearly 63 percent of families surveyed suffered a drop in net worth. Though the size of the decline was largest among middle-income households, the richest families were the most likely to take a hit, the survey showed.

There were a few bright spots, however. The Fed found that a “sizable fraction” of households experienced gains in wealth, though officials said that was often as much about luck as about smart investing. And some families who lost money still improved their ranking compared with the rest of those who were surveyed.

“The shifts in wealth do not appear to be correlated in a simple way with families’ characteristics,” the Fed said in its report. “Instead, the pattern of mixed losses, gains and modest shifts in wealth across families generally holds.”

The Fed found that the drop in wealth was driven by the falling value of consumers’ homes, cars and financial assets such as stocks and retirement accounts rather than by an increase in household debt — a dynamic officials termed the “valuation effect.” For example, the median decline in home prices was $18,700, and the value of directly held stock plunged $6,500, or 31 percent. That helped boost the ratio of total debt to assets by three percentage points to 18 percent.

The consequence of the widespread erosion of wealth is a more cautious consumer, the Fed said. Even families who had no great changes in their financial situation reported that they wanted to boost their savings to buffer against tough times. Households were also less willing to take on risk and expected to work longer, according to the survey. At least 25 percent of people employed full time said they expected to postpone retirement by two years.

The Fed is not the only one to recognize the trend, which economists say still rings true today. Bernard Baumohl, chief global economist for the Economic Outlook Group, said he is lowering his forecast for growth this year, partly in response to weaker-than-expected consumer demand.

“Clearly, the head of steam the economy displayed when it entered 2011 appears to be dissipating,” he said.