Quality of life in an American city often depends on the neighborhood one lives in, as abject poverty and crime can be found just blocks away from prosperity. Still, as much as a city can be judged on the whole, some cities face widespread problems that detract from their residents’ overall quality of life.

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.

42. Philadelphia, Pennsylvania
> Population: 1,567,442
> Median home value: $150,700
> Poverty rate: 25.8%
> Pct. with at least a bachelor’s degree: 27.4%

The typical Philadelphia household earns only $41,233 a year, well below the statewide median income of $55,702. Goods and services are about 12% more expensive in Philadelphia than they are nationwide, and after adjusting for the city’s relatively high cost of living, the median income in Philadelphia is only about $41,200, one of the lowest of any U.S. city. Philadelphia’s status as one of the worst cities to live in is underscored by the city’s high poverty rate. More than one in four city residents live below the poverty line, well above the 14.7% U.S. poverty rate.

Philadelphia is also a relatively dangerous city. There were 1,029 violent crimes in the city for every 100,000 residents in 2015, nearly three times the violent crime rate nationwide.

To determine America’s worst cities to live in, 24/7 Wall St. reviewed data on the 551 U.S. cities with a population of 65,000 or more as measured by the U.S. Census Bureau. 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 America’s 50 worst cities to live.

Click here to see the 50 worst cities to live in.
Click here to see our detailed findings.
Click here to see our methodology.