Here is where California ranks on the worst places to retire

FILE - A retired couple walks arm in arm on the beach. (Annette Riedl/picture alliance via Getty Images)

California landed near the bottom in a new ranking of the best and worst places to retire in the U.S. 

The Golden State came in 47th place out of all 50 states and ranked dead last in the category of affordability.

Financial services company Bankrate conducted its survey based on five categories: affordability, overall well-being, cost/quality of health care, weather, and crime, with each worth varying points. 

"We weighed affordability the heaviest in the ranking to reflect the challenges that so many Americans face with their retirement savings and the rising cost of living across the U.S.," Bankrate said.

SEE ALSO: Social Security just announced a change for millions of beneficiaries

In the crime category, California came in 38th.

Perhaps not surprisingly, the state ranked relatively well in the areas of weather and well-being, taking the 12th and 15th slots respectively. 

Its best ranking came in the category of quality and cost of health care, coming in sixth place.

​​Bankrate said in the overall ranking, the best and worst states for retirees were split geographically. 

"The Midwest and the South claim the top five states, while the Northeast and West claim the bottom five states for a second year in a row, primarily because of the differences in cost of living," the survey's researchers said. 

Loading Video…

This browser does not support the Video element.

New study shows retirement out of reach for millions due to student loan debt

Many older Americans are concerned that their student loan debt might get in the way of retirement. Data from the Federal Reserve shows 2.2 million people over the age of 55 still have outstanding student loan debt. The report finds that it may take an average of 11 years for workers between the ages of 55 and 64 to finish paying off these loans, leaving many to fear they won't be able to retire comfortably. Jason Matthews from Matthews Financial and Insurance Solutions, joined us on 'The Nine' for insight on how people can prioritize their finances and enjoy their golden years.

The states ranked the worst places to retire were:

47. California

48. Washington 

49. New York 

50. Alaska

The states named the best places to retire were:

1. Delaware 

2. West Virginia 

3. Georgia 

4. South Carolina 

Bankrate said in recent years, its surveys have consistently shown that most Americans feel that they're behind on retirement savings. 

The financial service firm also noted that those savings were not stretching as far, as inflation has pushed up the cost of living by double digits. 

"That reality is forcing many to find ways to stretch their retirement dollars, shift their retirement plans or do a combination of both," Bankrate said. 

The firm noted that retirement was a major milestone in a person's life and said, "Picking where to spend your golden years is a key part of that milestone, and as much as it’s a financial choice."