When it comes to retirement, taxes and affordability are key factors when deciding where to settle.

A new study by Bankrate.com looks at those and other factors in ranking all states based on the environment they offer retirees.

Bankrate to the rescue. The New York City-based personal finance website used five categories related to the life of a retiree and weighted them according to their importance: affordability (40%); overall well-being (25%); quality and cost of healthcare (20%); weather (10%); and crime (5%). Each category was ranked separately to arrive at an overall state ranking.

Here, in ascending order, are Bankrate's top 10 best states to retire to in 2023.

10. Nebraska

Effective in 2024, Nebraska will no longer tax Social Security benefits, It also offers seniors age 65 and older a homestead tax exemption. Nebraska ranks 13th in affordability; 18th in healthcare; 37th in well-being; 35th in weather; and 21st in crime.