Ah, retirement: the golden dream for so many, yet within reach of so few — at least a comfortable one, if the trouble people have saving for it is any indication.

Related: 10 states with the best economies

To help them with that, WalletHub checked out the 150 largest cities in the United States to see where those retirement dollars will last the longest.

Considering 31 key metrics, including everything from how many senior citizens already live in a given city to what sorts of recreational activities there are for seniors (and others) and — of course — the cost of living, WalletHub ranked each city in four overall categories: affordability, activities, quality of life and health care.

Tax-friendliness toward retirees, an elder-friendly labor market, walkability, crime statistics, air and water quality ratings and the death rate of the 65-and-older population, as well as life expectancy, emotional health, a city’s walkability and the percentage of its citizens who use public transit all went into the final picture, as did numerous other factors.

If you’re considering moving to a different city when you retire, you might want to check out the 10 best ones for retirees, below: 

Los Angeles

Sure the traffic is insane, but you can still find your retirement oasis in Los Angeles, and the winter weather is brag-worthy. (Photo: iStock)

10. Los Angeles

Bring your wallets if you’re thinking of retiring in Los Angeles. While the city scored pretty well on health care, coming in at 36 out of the 150 cities, and extremely well on both activities (12) and quality of life (2), when it came to affordability it finished down near the bottom of the barrel, at 125.

One reason the city did so well on activities is its tied-for-first ranking (a five-way tie, actually, with Chicago; Philadelphia; Washington, D.C.; and Minneapolis) for the most recreation and senior centers per capita. 

Photo: AP

Beautiful summers and excellent health care make Minneapolis a great retirement bet — if you don’t mind winter. (AP Photo)

9. Minneapolis

Minneapolis is not all that affordable either, coming in at 129 out of 150, and it really didn’t do all that well on quality of life, finishing near the middle at 76. But this Minnesota city did far better on activities (5) and health care (2).

And of course there’s that five-way tie for first place for the most recreation and senior centers per capita. 

Atlanta

Atlanta offers a pastoral, yet urban, beauty, as seen in Piedmont Park, but what makes it rank in the top 10 is its plethora of activities, including museum-going. (Photo: iStock)

8. Atlanta

Atlanta’s sore spot is its ranking for quality of life, with a ranking of 120. But this Georgia peach-of-a-city makes up for that with an affordability rank of 52, a health care rank of 51 and an activities rank of 3.

That activities rank is probably due to Atlanta’s distinction of actually being in a six-way tie for first place for having the most museums per capita — with New York City; San Francisco; Washington, D.C.; St. Louis; and Richmond. 

Cape Coral

A canal scene in Cape Coral, Florida, inspires dreams of placid days on the water, which northern retirees might yearn for come January. (Photo: iStock)

7. Cape Coral

Florida, perhaps not surprisingly, took top honors for having four cities to finish in the top 10, with Cape Coral just the lowest-ranking of those. And lots of retirees apparently like Cape Coral, since the city has the third-highest percentage of its population aged 65 and older.

This Florida city may have only gotten a 66 in the activities category, but a health care rank of 24, an affordability rank of 17 and a quality of life rank of 10 pushed it into seventh place overall.

Las Vegas

When you leave the Las Vegas strip, you’ll find a city whose winter weather might make it worth considering for retirement. (Photo: iStock)

6. Las Vegas

Las Vegas’s big failing is on health care, with a ranking of 94. But it compensates in other ways, such as quality of life (30), affordability (21) and activities (13).

Interestingly, its neighboring city North Las Vegas has the dubious distinction of being one of the five cities having the fewest recreation and senior centers per capita; North Las Vegas finished at a dismal 134 for activities. 

Photo: AP

One of several best-kept secrets in South Dakota, Sioux Falls ranks high for health care and affordability. (AP Photo)

5. Sioux Falls

Workers anticipating health issues in retirement may want to head to Sioux Falls, South Dakota. Though not the biggest city in this group of 10, it’s the biggest city in the state — and it finished top in the nation for health care. Although it didn’t do anywhere near as well in activities — finishing at 70 — or quality of life — 81 — it also did very well in affordability, coming in at 19.

And workers who anticipate continuing to work in retirement will find the place attractive, too, since it finished fourth for the highest percentage of employed people 65 and older. 

Miami

Miami ranks high on activities for retirees, including, of course, the simple pleasure of going to the beach. (Photo: iStock)

4. Miami

The third Florida city to finish in the top 10, Miami offers just a 71 ranking for quality of life, although it does better for affordability (39) and health care (21). But it stands out for its second-place finish for activities. Fun in the sun, indeed.

The city is also in a six-way tie for first place with San Diego, Virginia Beach, Tampa, Honolulu and Corpus Christi for the most fishing facilities per capita — undoubtedly a contributor to that second-place activities finish.

Scottsdale, Arizona

Close to, but not overshadowed by Phoenix, Scottsdale conjures images of golfing and desert sunsets, and its quality of life ranks high. (Photo: iStock)

3. Scottsdale

Scottsdale, Arizona, has the fourth best “mild weather” ranking out of all 150 cities, which may explain why it has the highest percentage of population aged 65 and older among its competitors.

Scottsdale is also pretty affordable, with a score of 58, and it did quite well in the health care (17) and activities (16) categories. For quality of life, it came in fourth of all the cities. 

Tampa

Tampa ranks high for affordability and for activities, such as strolling along Seddon Channel. (Photo: iStock)

2. Tampa

Tampa, Florida doesn’t do all that well regarding health care, with just a 72 rank. But quality of life rated an 18, activities got a 17 and affordability was a pretty attractive 3.

And then of course there’s that six-way tie for the most fishing facilities per capita — that can certainly help to explain the popularity of this Florida city to make the list. 

Orlando

In addition to the more-famous amusements of Orlando, the city has some nice parks, such as Lake Eola Park. (Photo: iStock)

1. Orlando

Whether you’re a wizard, a Muggle or a Disney aficionado, you’ll likely find something in Orlando, Florida, to your liking during retirement, with its activities ranking of 6. Affordability does pretty well, too, with a 7, and health care is 11.

While the city’s handicap seems to be quality of life, with a ranking of 73, this Florida city nonetheless has “magicked” its way to the top of the list.