Americans take into consideration a number of factors when deciding where to live, including the quality of schools, the strength of the local economy and job market, the area’s safety and culture, as well as its climate. Cities that perform well by these measures are more likely to attract new residents, and those that do not tend to drive residents away.

Comparing entire cities to each other can be problematic, particularly since living conditions can vary from one neighborhood to the next. Still, as much as a city can be judged on the whole, some cities face widespread problems that detract from residents’ overall quality of life.

22. Michigan
> Worst city to live: Detroit
> Population: 677,124
> Median home value: $42,600
> Poverty rate: 39.8%
> Adults with at least a bachelor’s degree: 14.2%

Once the fourth largest city by population and wealthiest by income per capita, Detroit’s economic decline over the past several decades may be the largest of any U.S. city. Detroit’s population is a fraction of what it was at its 1950 peak of 1.8 million people, and it continues to decline at a near nation-leading pace. The number people living in Detroit fell 19% over the past 10 years to just 677,124 today, the largest population decline of any city in the state. The typical Detroit household earns just $25,980 a year, about half the $51,084 national median household income.

There were 1,760 violent crimes reported per 100,000 Detroit residents in 2015, the highest violent crime rate in Michigan and the second highest of any U.S. city. Crime and overall urban decay have depressed real estate prices in the city to a fraction of their former value. The typical occupied home in Detroit is worth just $42,600, the lowest median home value of any city other than nearby Flint, Michigan.

American cities are often held to the standards of national averages, or against all of the other cities in a country. However, for the residents that actually live in these places, a more appropriate point of comparison are those cities that can be found nearby, in the same state.

To determine America’s worst cities to live in each state, 24/7 Wall St. reviewed data on the largest U.S. cities. Based on a range of variables, including crime rates, employment growth, access to restaurants and attractions, educational attainment, and housing affordability, 24/7 Wall St. identified the worst city to live in each state.

Click here to see the worst city to live in every state.
Click here to see our detailed findings and methodology.