Residents in the Washington region have different average life spans depending on what Metro station they live near, according to data released Monday.

Life expectancy is tied to socioeconomic and health factors, and Virginia Commonwealth University and the Robert Wood Johnson Foundation compiled data to show that life expectancy can vary in jurisdictions that are next to one another.

The average life expectancy nationwide is 79 years. Babies born in the District and Prince George’s County have an average life expectancy of 78 years. Take the Metro a few stops away in Fairfax and Arlington counties, and the life expectancy increases to 86 years. Babies born in Montgomery County can be expected to live to about 84 years old.

Out of these five jurisdictions, D.C. and Prince George’s County have the lowest high school graduation rate, at 62 percent and 74 percent, respectively. By comparison, the high school graduation rate in Montgomery County is 88 percent. The study also looked at unemployment, poverty and people who spend more than 50 percent of their income on housing. The study took data from the annual Robert Wood Johnson Foundation’s “County Health Rankings.”

“The health differences shown in these maps aren’t unique to one area. We see them in big cities, small towns and rural areas across America,” Derek Chapman, the associate director for research at VCU’s Center on Society and Health said in a release.

In June, the Northern Virginia Health Foundation and Virginia Commonwealth University’s Center on Society and Health released a study showing that life expectancy can vary even within neighborhoods in Northern Virginia. A baby born in parts of western Lorton, for example, is expected to live to 89, while a newborn a short distance away in Manassas has a life expectancy of 76 years.

Like the Metro map above, that study showed that socioeconomic factors — even if your community is located within a generally wealthy region — can affect life expectancy.