New research shows that where you live could mean the difference between life and death. (iStock)

American life expectancy varies dramatically by location, with groundbreaking research showing as much as a three-decade gulf separating the places where people have the longest and shortest lives. In some cities, the difference between dying in your 50s and dying in your 80s can be measured in the span of a few blocks.

Disentangling the drivers of such differences is a more complicated affair. In some ways, place is simply a proxy for many factors that affect longevity, such as income, social class and overall health. But what if there were a way to strip those factors out of the equation to arrive at a number that could tell us exactly how much life we stand to gain (or lose) by changing our state or our Zip code?

That’s exactly what new research by a team of economists at Stanford University and the Massachusetts Institute of Technology aims to do. Starting with an extensive data set of every Medicare beneficiary from 1999 to 2014, they explored life expectancy differences between people who move after age 65 and those who stay put.

That allowed them to strip away all the factors that affect longevity — such as health, lifestyle and genetics — to isolate the effect of location on life span. The results create a picture of life expectancy in the United States that differs significantly from typical life span maps.

The best way to explain this research is to start with one of those familiar maps: The one below plots life expectancy at age 65 down to the level of commuting zone, a geographic unit one can think of as a collection of counties sharing a common urban core.

No surprises here: Life expectancy is lowest throughout much of the South and highest through the upper Midwest, in line with the general contours of such individual characteristics as income, happiness and overall health.

Strip out those traits, and the map that looks like this — the central finding of the new study.

This map doesn’t chart life expectancies; rather, it illustrates the effects of a place on the life expectancy of a senior who’s otherwise completely average from a health standpoint. The reddish places are a drag on life expectancy, reducing it by as much as nine months in some instances. The bluish zones show higher life expectancies, with an increase of as much as a year.

What’s surprising is that the relationship between place and longevity is causal: A person of average health who moves to one of the red zones can expect to die earlier as a direct result. If that same person moves to a blue area, it will prolong their life. “Where you live when you are elderly (over age 65) affects your longevity,” Heidi Williams, an associate economics professor at MIT and one of the study’s authors, said in an email to The Washington Post.

All told, moving from a place in the bottom 10 percent to one in the top 10 percent would extend the average person’s life by a little more than a year, researchers found.

The five places with the most positive effects on life expectancy were all in New York (Yonkers, New York City and Syracuse) or Florida (Port St. Lucie and Naples). Any would add at least a year to the average senior’s life.

The bottom five were scattered: Gulfport, Miss.; Las Vegas; Bakersfield, Calif.; Beaumont, Tex.; and Lake Charles, La.

So what is it about certain places that helps people live longer? A definitive answer requires more research, but there are enough interesting correlations to get the ball rolling.

A significant factor is the availability and quality of health care. Communities with providers who have high national rankings tend to have a more positive impact on senior longevity. On the other hand, a lack of services is probably one reason rural areas in the middle of the country fare so poorly on the map.

Weather and climate also play a role, and places with extreme highs and lows generally bring down life expectancy. Given what we know about the effects of extreme heat and cold on mortality, particularly for older people, that’s not a big surprise. Air pollution is another environmental factor that can affect life expectancy.

The authors emphasize that by far the biggest determinant to longevity in any given place is what they call “health capital” — the prior health behaviors, medical care and genetic inheritances people accumulate throughout their lives.

Policymakers looking to increase life spans should take place into account, they said. “There is a substantial causal impact of place-based factors that this conventional wisdom may understate,” the authors write.