Thanks to continued improvement in public health care, Americans today are healthier than ever. The average American is expected to live 79 years, about six years longer than in 1975. The improvement, however, has not been uniform across the United States, and some cities are stuck in the past. In some of the least healthy cities, life expectancy is as low as it was 40 years ago.

To determine the least healthy cities in the country, 24/7 Wall St. compiled an index of various health factors and outcomes. Health factors in an area, including eating and exercise habits of residents, the availability of clinical care, social and economic conditions, and the physical environment, tend to be accurate predictors of an area’s health outcomes — its residents’ length and quality of life.

According to the Centers for Disease Control and Prevention, up to 40% of deaths from the five leading causes are preventable. Premature death can often be prevented through changes to personal behavior. In every metro area in which a larger share of adults smoke, are physically inactive, and are obese than the country as a whole, the premature death rate is high and more years of potential life are lost due to premature death per capita than the national average.

Residents in many of the least healthy metro areas lack the means necessary to lead a healthy lifestyle. In an email with 24/7 Wall St., Amanda Jovaag, data lead at health advocacy group County Health Rankings & Roadmaps, said, “Income provides economic resources that shape choices about housing, education, child care, food, medical care, and more. As income and wealth increase or decrease, so does health.” In each of the least healthy metro areas, the typical household makes at least $4,700 less than the typical American household.

84. Los Angeles-Long Beach-Anaheim, CA

> Premature death rate: 253.4 (per 100,000)
> Adult obesity rate: 20.7%
> Pct. adults without health insurance: 14.7%
> Poverty rate: 17.1%

The number of primary care physicians, dentists, and mental health providers per capita can also dictate the availability of medical care and consequently affect health outcomes. The number of preventable hospitalizations is another indicator of the quality of a metro area’s health care system. In 24 out of the 25 least healthy cities, there are more preventable hospitalizations per capita than the national average of 54 per 1,000 Medicare enrollees.

Access to the health care system is perhaps as important as its quality. In many of the cities with the worst health outcomes, a large share of residents is uninsured. “Those without insurance are often diagnosed at later, less treatable disease stages than those with insurance and, overall, have worse health outcomes, lower quality of life, and higher mortality rates,” Jovaag said.

For a variety of reasons, rural populations tend to be less healthy than urban ones. “The reasons behind this difference are varied,” Jovaag said. “Certainly, resources such as access to clinical care and healthy foods play a role, but we also know that poverty and unemployment are more prevalent in rural counties.” Many of these factors contribute to the differences in health outcomes between rural and urban cities.

As part of a recent epidemic, deaths from drug overdose have been on the rise and have contributed to the first increase in the U.S. death rate in a decade. Injury deaths, a leading cause of which is drug overdose, disproportionately affect many of the communities on this list.

To determine the least healthy cities, 24/7 Wall St. created an index modelled after analysis conducted by County Health Rankings & Roadmaps, a Robert Wood Johnson Foundation and University of Wisconsin Population Health Institute joint program. To identify the least healthy cities, 24/7 Wall St. reviewed all U.S. metropolitan statistical areas. The index rankings are based on overall health outcomes, a weighted composite of length of life, quality of life, and overall health factors. The health factors component is itself a weighted composite of healthy behaviors, clinical care, social and economic factors, and physical environment measures. Data on life expectancy came from the Institute for Health Metrics and Evaluation, a global health research center affiliated with the University of Washington.

Click here to see the 25 least healthy cities in America.