What matters to you when it comes to where you live in retirement? Proximity to family? Cost of living and taxes? Healthcare resources and weather? Everyone's needs and interests are different.

If you think of retirement as sitting on a beach sipping a cold beer, South Dakota likely doesn't come to mind. So it might be a surprise to learn that this sparsely populated state tops the list of best states to retire.

A recent ranking by Bankrate looked at seven relevant features in the life of a retiree and used government and expert sources to compare states against one another.

They then weighed those rankings based on the importance given to them by responses to a survey, which found that 47% of Americans would consider moving when they retire.

The study examined seven categories, starting with cost of living and taxes -- both weighted 20%. Healthcare quality was weighted 15%, weather 15%, crime 10%, cultural vitality 10% and well-being 10%.

Based on Bankrate's ranking, these are 10 of the best states to retire in:

1. South Dakota

Cost of living ranking: 19

Taxes ranking: 2

People are content in South Dakota, according to Gallup's State of American Well-Being series, which surveys how people feel about aspects of their lives such as purpose, relationships, lack of money stress, community and good health.

South Dakota is also the second most tax-friendly state in the country, according to the Tax Foundation

2. Utah

Cost of living ranking: 25

Taxes ranking: 8

The Beehive State finished six spots behind South Dakota for cost of living, one for overall crime rate, eight for well-being, six for taxes and five for cultural vitality. It won out for health value by two and weather by six.

3. Idaho

Cost of living ranking: 12

Taxes ranking: 20

Idaho is both more affordable and significantly safer than the top two states, while also posting a superior health score and a top-10 well-being ranking. But Idaho has a higher tax burden and ranked poorly for cultural options.

4. New Hampshire

Cost of living ranking: 43

Taxes ranking: 7

Fourth-place New Hampshire is the safest place to live, provides excellent health care, low taxes and has plenty of things to do. But the state ranks poorly on cost of living--43 out of 50--and weather.

Image placeholder title

5. Florida

Cost of living ranking: 27

Taxes ranking: 4

Florida residents enjoy an average annual temperature of 70 degrees. It's also a low tax haven and ranks just outside the top 10 in well-being. Every other metric, though, finished middle-of-the-pack, with healthcare placing 36th, a major concern for retired couples who could spend, on average of $280,000 on healthcare costs, according to Fidelity.

6. Montana

Cost of living ranking: 23

Taxes ranking: 6

It's hard to beat the scenery in Montana. Montana scored high on culture, but, ranking No. 45 in the nation for weather, the winters could be tough.

7. North Carolina

Cost of living ranking: 12

Taxes ranking: 11

With a pleasant climate and low cost of living, North Carolina makes a good place for retirees.

8. Wyoming

Cost of living ranking: 28

Taxes ranking: 1

You won't get hammered by taxes here, but if you prefer warm weather, this may not be the place for you: Wyoming came in at No. 46 in the nation in that category.

9. Nebraska

Cost of living ranking: 17

Taxes ranking: 25

10. Mississippi

Cost of living ranking: 1

Taxes ranking: 24

Mississippi has the lowest cost of living, but is among the lowest ranked states for cultural vitality.