We are in a loneliness epidemic. Where you live can make a difference for your health and happiness

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.

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. 

For those who have recently relocated, finding a better community or area and being closer to support systems were among the most important considerations when choosing where to live. For those who plan to move within the next two years, 79% reported nearby support systems as a top factor.

While a walkable city makes necessities like food and health care easier to access, it also gives residents a sense of belonging—an increasingly important factor for families, as experts point to how strengthening social ties can help combat the physical and mental health consequences of isolation. 

The health impact of loneliness is equivalent to smoking up to 15 cigarettes a day.

The chance to hop on a bike and head to the local theater, stroll to the library for an event, or cruise to the waterfront grabbed the attention of Paula Lewinski and her husband when solidifying their decision to move to Portsmouth, N.H.—one of Fortune’s top-ranked cities. 

Living in a walkable place fosters social interaction—you naturally become familiar with the local school crossing guard, shop owners, and other parents at the park nearby. Those loose ties and seemingly mundane connections sustain residents, giving people a sense of belonging and safety at any age. 

“There’s a lot going on here, and we are just super excited about being able to go out our door and get to fill in the blank,” Lewinski, 60, tells Fortune. She loves exploring the outdoors and hopes to volunteer alongside her new neighbors as she settles into her community. 

Local health care

Struggling with a health issue, whether ongoing or sudden, can increase people’s sense of social isolation, especially if access to health care is inadequate or located far beyond a city’s borders. Appropriately enough, access to health care influences people’s decision on where to move. 

“Health care is very unevenly distributed across the U.S.,” says Dr. Brad Bowman, chief medical officer and head of data science at Healthgrades. “Depending on where you live, you may have exceptional care just within a few miles.” 

Having a solid system of care nearby makes more of a difference than finding the perfect doctor, Bowman says. And having reliable health care close to your home also reduces time spent in transit, which makes care more difficult and also isolates people in the interim. 

Along with places where health systems play an integral role, Fortune’s list includes a handful of college towns like our top pick, Cambridge, Mass. While the charm of a college town instills a sense of tight-knit community among residents, these cities also tend to have ample health and educational resources for families that extend beyond the student body. 

High-quality education

For parents, of course, school quality is a major driver in decisions about moving, and our methodology accounts for that. 

“Finding the right place for a child to thrive and be successful is critical,” says Jon Deane, CEO of GreatSchools. “Schools show up for kids and really support them, and a lot of parents recognize that.” 

About 90% of parents with school-age children looking to move in the next two years factored quality schools into their decision, according to the Harris poll. Parents said the safety of the school and area, the academic reputation, a pleasant school environment, and quality of the faculty mattered most.

Resources for older adults

Many parents are simultaneously caring for their aging parents—or soon will be, as the number of Americans age 65 and older will more than double over the next 40 years. For the sandwich generation, senior resources can make all the difference in a community. 

While the quality of a city’s resources for seniors is not always top of mind for younger adults, it is another important factor in prioritizing well-being as people age, says Shannon Guzman, director of housing and livable communities at the AARP Public Policy Institute

Robin Schnell, 69, who also moved to Portsmouth to retire, recalls her mother’s struggle to get herself to the grocery store as she aged. 

“When she lost the ability to drive, that left her without food,” Schnell tells Fortune. “There was no public transportation, so she had to move.” 

That experience led Schnell to prioritize relocating to a city with access to necessities like food and a local pharmacy within one mile by foot, a marker of accessibility for people as they age.

From a town’s walkability index to its number of retirement care centers and senior-friendly events and activities, a city’s support of its aging population is as essential to older adults as it is to the families who care for them. Almost one-fourth of adults age 65 and older are socially isolated, per the U.S. Centers for Disease Control and Prevention.

Availability of multigenerational housing and recreational facilities can help combat that isolation. 

“The idea is to make sure people can remain as active and independent as they want to as they age,” Guzman says. “There should be amenities, services, and features that help support that goal.” 

A version of this article appears in the June/July 2023 issue of Fortune with the headline, “All in the Community.”

Subscribe to Well Adjusted, our newsletter full of simple strategies to work smarter and live better, from the Fortune Well team. Sign up today.