Poorer New Yorkers live longer than the vast majority of other Americans below the poverty line, according to a new study from the Journal of the American Medical Association.  

The report finds that the average life expectancy of a poor male New Yorker is 79.5 years old, compared to 84 years-old among impoverished women in the city.

Within the five boroughs, Brooklyn and Queens ranked first with an expected life expectancy of 82.6 years.

Manhattan followed at 81.8. Staten Island trailed at 80.5, and the Bronx was last at 80.3.

Perhaps less surprising, income levels also play a big role. In Manhattan, residents below the poverty line die about 6 years earlier than wealthier people in the borough.

Medical experts say the strongest factors include an area's percentage of smokers, immigrants and median home value.

Obesity levels and college education also played roles.

Research was conducted between 2001 and 2014.