There are a few major factors that make a certain place a good choice for retirees. Affordability is a major factor for seniors on a fixed income, and access to top-quality healthcare is certainly important as retirees age. In addition, retirees want things to do -- many play golf, or go to the theater, for example. With these things in mind, here are the five worst states to retire to in 2017, according to a recent analysis by WalletHub.

Despite having beautiful landmarks such as Castle Hill Lighthouse, Rhode Island ranks as the least retirement-friendly state for 2017. Image Source: Getty Images.

The five worst states for retirement in 2017

I won't keep you in suspense. Out of the 51 candidates (including D.C.), here are the least retirement-friendly states, according to WalletHub, ranked in descending order -- so the worst state is listed last.

47. Hawaii. To be fair, Hawaii did rank highly in several categories. For example, at 81.3 years, Hawaii has the highest life expectancy for seniors in the United States. And, more than 82% of Hawaii seniors are in "good or better" health. However, Hawaii ranks as the least affordable state in the country, with a cost of living that's twice as much as the lowest state, and some costs specifically related to retirement are especially high. For example, in-home health services are among the most expensive in the country. Also, Hawaii has the second-highest property crime rate in the country, a big turn-off to many retirees.

48. Connecticut. Like much of the northeastern U.S., Connecticut isn't a particularly affordable place to live. The state's overall cost of living is among the highest in the U.S., and it ranks as the fourth worst state in terms of tax-friendliness to retirees. The weather in Connecticut isn't particularly appealing, and the state has below-average public healthcare facilities. On the positive side, however, Connecticut does have one of the lowest crime rates in the nation and ranks No. 1 for water quality.

49. District of Columbia. With the worst rates of property and violent crime in the country, D.C. ranks low in terms of retirement destinations. To make it worse, D.C. has the second highest cost of living in the U.S. and the highest percentage of seniors living in poverty. It's not all bad news for D.C. retirees, however. Retirees do enjoy the best access to public transportation in the U.S., as well as the highest number of physicians per capita.

50. Alaska. Despite ranking as the most tax-friendly state in the U.S., Alaska's high cost of living is a big reason it ranks second to last. In-home health and adult day healthcare are more expensive in Alaska than anywhere else in the country. Alaska also has one of the highest violent crime rates in the country, some of the lowest-quality drinking water, and one of the lowest rates of healthcare professionals such as dentists and nurses. Finally, Alaska ranks dead last when it comes to "mildness of weather," although that fact is unlikely to surprise many people.

51. Rhode Island. Although Rhode Island didn't rank dead last in any of WalletHub's individual categories, it just got overall poor marks in virtually every aspect of retired life. If you notice, all of the other states on the list excelled in one or more categories. This isn't the case for Rhode Island.

Cost of living is well above average, and tax-friendliness to seniors is among the worst in the nation. Nearly 10% of retirees are below the poverty level, and there isn't a particularly senior-friendly job market that struggling retirees can take advantage of, if needed. Weather isn't very nice, and the state ranks toward the bottom of the list in terms of things to do, such as museums, theaters, and golf courses. Furthermore, elder-abuse protections are third worst in the U.S, as is the number of physicians per capita.

What makes a state retirement-friendly?

In case you were curious, the five best states to retire, according to WalletHub's methodology, are:

  1. Florida.
  2. Wyoming.
  3. South Dakota.
  4. Iowa.
  5. Colorado.

What makes these states so retirement-friendly? For starters, most of them are more affordable for retirees than other states. The top three have no state income taxes, and for the most part, the top states have strong job markets for seniors who want to work part-time, as well as affordable senior-specific services, such as in-home healthcare.

In addition, quality of life is a big factor. Florida has beautiful weather, Wyoming has the best air quality in the country, and Iowa is full of things for retirees to do, such as golf courses and museums. Many of the top states have low crime rates, lots of volunteer opportunities for seniors, and strong, populous senior citizen communities.

Finally, access to high-quality healthcare is a big priority for most retirees. South Dakota, for instance, has more nurses and healthcare facilities per capital than any other U.S. state. And almost four out of five Colorado seniors are physically active, giving Colorado seniors a longer life expectancy than seniors in most other states.

It's not all about these factors

To be clear, these are the five worst states to retire in, but only in terms of things such as affordability and senior-friendly environments. There are other, more personal factors that should be taken into consideration as well. Most obviously is the proximity to your friends and family -- if your entire family is in Hawaii, it may not seem worth the cost savings to relocate to the mainland, for example.

On a similar note, these findings don't consider that the best option for many retirees is to simply stay put. According to Jim Mitchell, professor of sociology and director of the Center for Diversity and Inequality Research at East Carolina University, failure to consider the financial implications of selling their home is a common mistake. "For many, home equity is a significant asset and the risks and benefit of relinquishing that asset should be considered carefully in light of replacement costs," says Mitchell.

The bottom line is that while the five states here are the worst states for retirement in 2017, at least when considering general affordability, quality of life for seniors, and healthcare options, you need to take your personal situation into account as well.