In 1980, 23% of U.S. lower-income households lived in majority low-income neighborhoods; in 2010, that had risen to 28%. At the other end of the economic scale, the share of upper-income households living in majority upper-income neighborhoods doubled, to 18% in 2010 from 9% in 1980, according to a new Pew Research Center income segregation report based on census data.

Income segregation also rose over the same time period in 27 of the nation’s 30 largest (in terms of households) metropolitan areas, according to the report, “The Rise of Residential Segregation by Income,” written by Paul Taylor and Richard Fry. It includes data on income segregation comparing those 30 metropolitan areas, as well as interactive maps.

The increase in income segregation is a contrast to the long decline in black-white racial segregation in neighborhoods. Why would income segregation be rising? The major reason is that the share of neighborhoods that are predominantly middle income or mixed income has declined, from 85% in 1980 to 76% in 2010. In turn, the shares that are majority lower income or upper income have grown.

The larger picture here is that the share of middle-income households has gone down over time. These middle-income households (defined as those where incomes are 67% to 200% of the national median) were 54% of households in 1980 but only 48% in 2010. The share of upper-income households has grown over the 30-year period, to 20% from 15%.

The report based its analysis on changes at the census-tract level. Census tracts have an average of about 4,000 residents and roughly follow neighborhood boundaries, so they are the measure of choice among experts to look at neighborhood change or composition.

As is usual with studies of this kind, the analysis was limited to census tracts in metropolitan and micropolitan areas, where 93% of the nation’s population lives. For 2010, the analysis included 67,462 tracts out of the 73,057 in the 50 states and District of Columbia.

The idea behind neighborhood-level segregation analysis is to study the potential exposure of people to others from different groups. But census tracts located outside metropolitan and micropolitan areas can include so much land that they would not resemble what most people would consider a neighborhood. As this list of 1990 Texas census tracts shows, there are some that encompass hundreds of square miles.