Best states to live a long, healthy life: Where do New York, New Jersey rank?

A new study by Life Extension ranked New York 18th and New Jersey 16th on a list of the best and worst states to live in for a long and healthy life.

According to the website, the best states tend to have scenic outdoor areas and active populations, like Hawaii.

Seven of the 10 states with the longest life expectancies also rank in the top 10 for living a healthy lifestyle, and the 10 states with the unhealthiest lifestyles also have the lowest life expectancies.

U.S. life expectancy has declined two years in a row. Globally, the United States ranks 40th for life expectancy at 78.5.

Here's a deep dive into their rankings:

The skyline of Lower Manhattan and One World Trade Center. (Photo by Gary Hershorn/Getty Images)

New York

  • Life expectancy: 77.7
  • Healthy lifestyle ranking: 25
  • Share of adults with anxiety symptoms: 28.8%
  • Share of adults with insufficient sleep: 34.6%
  • Share of adults who eat fruits, vegetables every day: 71.3%
  • Share of adults at a healthy weight: 34.4%
  • Share of population living with a half-mile of a park or school: 94.5%
  • Share of state GDP for outdoor recreation: 1.3%
  • Percentage of single-person households: 30.9%

The Wildwood boardwalk. (Photo by Roy Rochlin/Getty Images)

New Jersey

  • Life expectancy: 77.5
  • Healthy lifestyle ranking: 15
  • Share of adults with anxiety symptoms: 24.2%
  • Share of adults with insufficient sleep: 34.8%
  • Share of adults who eat fruits, vegetables every day: 71.45%
  • Share of adults at a healthy weight: 33.2%
  • Share of population living with a half-mile of a park or school: 91.4%
  • Share of state GDP for outdoor recreation: 1.5%
  • Percentage of single-person households: 26.2%

The sun sets off of Waikiki Beach on the Hawaiian island of Oahu. (Kent Nishimura / Los Angeles Times via Getty Images)

Top 5 States

1. Hawaii

2. Minnesota

3. Vermont

4. Washington

5. New Hampshire

Bottom 5 States

47. Kentucky

48. Louisiana

49. Alabama

50. Mississippi

51. West Virginia

(NOTE: The District of Columbia was included in these rankings)