We are in a loneliness epidemic. Where you live can make a difference for your health and happiness
Fortune · Illustration by Studio Muti

Many of the ties that connect us have been severed. Along with the pandemic’s isolation measures came the rise of remote work and an uptick in moves out of major metros. More people have found themselves separated from strong support systems, and the physical and emotional distance is pushing some to the brink.

“The pandemic has had a number of invisible costs in our country, and the increase in loneliness, the increase in mental health strain, these are part of those costs,” Dr. Vivek Murthy, the U.S. surgeon general, said at Fortune’s Brainstorm Health conference in Marina del Rey, Calif., in April.

Even before the pandemic, loneliness was commonplace, with its effects felt across roughly half the U.S. population, especially among young people and caregivers. According to one study published in the journal PLOS Medicine, the health impact of loneliness is comparable to smoking up to 15 cigarettes a day. It’s a strong predictor of poor physical and mental health outcomes and early mortality. And for those nearing the end of life, the strength of people’s relationships contributed more to their happiness than did wealth and success, according to the lengthiest longitudinal study on happiness; strong support systems are therefore imperative.

The cities ranked in this year’s edition of the Fortune 50 Best Places to Live for Families share a range of qualities that can act as antidotes to loneliness. In our analysis of nearly 1,900 cities across the country, the best places to live scored high on assets like health care, education, and resources for seniors—all of which can help fight isolation and build social ties.

For the first time, this year’s list highlights the best place to live in each of the 50 states. While some states—whether owing to certain laws or their political climate—may not meet everyone’s needs, the list provides people a wide range of options across the U.S. from which they can find a place to call home.

View this interactive chart on Fortune.com

We factored in data like affordability, walkability, and a city’s well-being index, which can correlate strongly with community connectedness. Fortune’s analysis resulted in a ranking of cities where people can weave themselves into the fabric of the community by accessing a myriad of resources in the town and surrounding areas. Beyond being a factor in longevity, feeling socially connected builds resilience, reduces stress, and can give people purpose as they age.

Social connectivity is often defined by the strength of your local ties, so where you live is a key determinant. In a poll conducted by Harris in late March and early April on behalf of Fortune, nearly 20% of Americans reported moving in the past year, and almost half said they plan to move in the next two years.