A recent study by WalletHub analyzed the country’s 150 most populated cities to determine 2017’s best and worst places to raise a family. While the Bay Area reigns supreme to its residents, the city rankings were scattered from best to worst. 

WalletHub weighed over 40 metrics that include housing statistics and school ratings to determine the ranking. The lowest ranking Bay Area city is Oakland, which landed at No. 115 out of 150. Oakland ranked extremely low in family fun, health and safety, affordability, and socioeconomics. However, the city did rank fairly well in the education and childcare category, finishing number 32 out of 150.

San Francisco comes in at No. 39 with its affordability (the least affordable city of all) and socioeconomic ranking bringing it down. San Francisco did rank 16 out of 150 in the family fun category and won fourth place in “most attractions.” Sacramento shows up one spot in front of it at No. 38.

The ranking concluded the top Bay Area cities to raise a family are San Jose, coming in at No. 13, and Fremont, all the way up at No. 5. Fremont ranked No. 1 overall in health and safety as well as socioeconomics. Both cities also share an extremely low divorce rate, with San Jose at No. 3 and Fremont at No. 1 overall.

Earlier this year, Fremont was named the least-stressed city in Americawhile San Francisco was dubbed unaffordable to all its residents. Looks like those sentiments held true here as well.