Some are in the country. Some in the city.

Some are resort meccas. Some are quiet suburbs.

Some are among the country’s most expensive places; others are within the reach of just about anyone’s budget.

Whatever their differences, the 15 locations on the Cyberhomes Best Places to Retire list have one thing in common: ample opportunities for retirees to stay active, healthy and wise. For those seeking a place to live out their last decades — and hopefully their best decades — that’s no small consideration.

A landmark study funded by the MacArthur Foundation in the late 1990s showed pretty conclusively what many had long suspected. Growing old successfully, with good health and peak vitality, depends more on where you live, who you associate with and what you do than it does on your genes.

With that in mind, the database wizards at Cyberhomes combed the country for communities with the highest concentrations of affluent older people — places where new retirees might find the most potential friends, a key to anyone’s active life. Then we ranked the neighborhoods by their proximity to important amenities such as hospitals, golf courses, museums, theaters and art galleries that elders might need or want to stay active and interested in life.

We looked for a geographically balanced list. And, recognizing that these are tough times for retirement accounts (in spring 2009, only 13 percent of Americans believed they would have enough money to live comfortably in retirement, according to a survey by the Employee Benefit Research Institute), we picked spots across the range of home prices. Five of our top 15 neighborhoods have inexpensive real estate, relative to regional median home values; five are moderately priced; and five are in some of the most expensive towns in the nation.

We hope you find something here that fits your taste and budget.