(NEXSTAR) – When it comes to retirement, where you live can greatly affect just how golden your post-career years actually are.

A new study from Bankrate ranks all 50 U.S. states when it comes to affordability, overall well-being, healthcare quality/cost, weather and crime. With soaring inflation and a volatile stock market, affordability was given the most statistical weight, with the others decreasing respectively.

Iowa is the best state in which to retire, the study found, thanks to its affordability (3), quality/cost of health care (11) and crime (12).

“Choosing where to retire is deeply personal, but Iowa’s affordable cost of living, inexpensive but high-quality health care and low crime make it a compelling option for retirees looking to stretch their retirement income in this economy,” said Bankrate analyst Alex Gailey. “In our overall ranking, the best and worst states for retirees are split geographically. The Midwest and the South claim the top five states, while the Northeast and West claim the bottom five states, primarily because of the differences in cost of living.”

For some residents nearing retirement in Alaska – ranked 50 out of 50 – New York (49), California (48), Washington (47) and Massachusetts (46), a move toward the middle of the country could pay off, Bankrate’s findings suggest.

While all five of the least favorable states scored poorly when it came to affordability, Alaska also ranked last for weather and 49th for crime.

5 Best States to Retire5 Worst States to Retire
1. Iowa50. Alaska
2. Delaware49. New York
3. West Virginia48. California
4. Missouri47. Washington
5. Mississippi46. Massachusetts
(Bankrate)

“For many Americans, a comfortable retirement may feel out of reach,” Gailey said. “After battling elevated inflation over the last two years, relocating to find cheaper housing or a lower cost of living may be a good alternative for retirees who have tighter budgets but want to retire comfortably. If you’re considering a late life move to lower your cost of living in retirement, our rankings provide some food for thought.”

The American Association of Retired Persons (AARP) reports that an increasing number of retirees left their home state to find cheaper housing in 2022.

The annual study from Hire A Helper, an online moving-services marketplace, found that 12% of American retirees moved for that reason in 2022, the highest percentage since 2014.

“That kind of cost consciousness is something we haven’t seen at this level since 2014,” Miranda Marquit, chief data analyst at Hire A Helper, told AARP, citing Census data.