A comfortable retirement depends a lot on location, according to a new report from SmartAsset.

Experts over at the personal finance tech company sought to find America’s best places to retire and live out your golden years by first comparing state and local income and sales tax rates.

» RELATED: This is the best city to retire in Georgia if you're on a fixed income

The rates, according to the report, are based on a typical retiree earning $35,000 per year from savings, Social Security or part-time work,and take into account disposable income spending on taxable goods.

SmartAsset researchers also looked at the number of doctors’ offices, recreation centers and retirement centers per thousand residents in each area and, lastly, the number of seniors in each area as a percentage of the total population.

» RELATED: 4 things to know about retiring in Georgia

They found that nationwide, tax rates average 16.2 percent and seniors make up 17.9 percent of the general population.

Of the 10 cities ranked, Naples, Florida, earned top honors, with a tax rate of 13.7 percent and the highest percentage of seniors — 51 percent of its population. The Florida city earned a Best Place to Retire Index score of 100.

Cumming, in Forsyth County, came in second, with a Best Place to Retire Index of 93.67, up from 90.49 just last year.

» RELATED: This Georgia company was named one of the best places to retire from

Here’s more on how Cumming fared:

  • Overall rank: 2
  • Tax rate: 17 percent
  • Doctors' offices per 1,000 people: 31.9
  • Recreation centers per 1,000 people: 9.2
  • Retirement centers per 1,000 people: 2
  • Percentage of seniors: 16.4 percent
  • Best Place to Retire Index: 93.67

Cumming was also recently named one of the safest cities in Georgia based on FBI data. According to 2017 Census data, approximately 6,000 people live in the city, and an overwhelming majority (81.8 percent) are white. The median value of owner-occupied housing is $210,800 and median gross rent, $966 per month.

SmartAsset’s next best Georgia city to retire in is Stone Mountain, but the Dekalb city’s index score of 40.88 is more than 50 points lower than Cumming’s. Dacula, Decatur and Austell rounded out the top five in Georgia, but only Cumming made it into America’s top 10 places for retirees.

» RELATED: 4 myths about retirement in Georgia

The 10 best places to retire in America, according to SmartAsset

  1. Naples, Florida
  2. Cumming
  3. Beverly Hills, California
  4. Gig Harbor, Washington
  5. Wasilla, Alaska
  6. Media, Pennsylvania
  7. Farmington, Michigan
  8. Grosse Pointe, Michigan
  9. New Port Richey, Florida
  10. Orange Park, Florida

Explore the full report and its methodology at smartasset.com.

A previous version of this story incorrectly named Wasilla in Arkansas. Wasilla is the sixth-largest city in Alaska.