Several Bay Area cities make list of best places to retire in California

Click through this slideshow to see the best and worst places to retire in California, according to WalletHub. Click through this slideshow to see the best and worst places to retire in California, according to WalletHub. Photo: Douglas Sacha/Getty Images Photo: Douglas Sacha/Getty Images Image 1 of / 39 Caption Close Several Bay Area cities make list of best places to retire in California 1 / 39 Back to Gallery

Already thinking about where you're going to retire? If you live in the South Bay, you may not have to go far.

WalletHub released a list of the best and worst places to retire in California, and three Santa Clara County cities made the top five.

The site compared 250 cities across three categories to determine the city's final "retirement score," which ranges from 39 to 62, with 62 being the best.

SEE ALSO: The best places for Bay Area expats who want to live like a king

The three categories used to calculate the final score are "quality of life," "health care" and "activities." Each category is broken down further into subcategories, with each subcategory carrying its own weight.

For example, some of the subcategories under "quality of life" include adjusted cost of living, violent crime rates, and the "elder-friendliness" of the labor market.

A small city south of Los Angeles is the best California city in which to retire, according to the study.

TOP US CITIES TO LIVE: San Francisco can't even beat Omaha in study

San Francisco ranked 91st, with a retirement score of 51.37. The city ranked 239th in quality of life, 57th in health care, and third in activities.

Click through the slideshow to see the best and worst places to retire in California according to WalletHub.