Where you live makes a huge difference in your standard of living. A salary that will buy you a nice standard of living in an affordable smaller city will not go nearly as far in San Francisco or the Big Apple.

In fact, based on data from the Economic Policy Institute, a two-parent, two-child family would have to bring home $49,114 a year “to secure an adequate but modest living standard” in Morristown, Tenn., versus $106,493 for the same standard in Washington DC.

That said, it is true that life in a small city has tradeoffs such as shorter business hours, relying on cars and fewer opportunities to socialize. However, a recent study from WalletHub compared 1,268 small cities in the U.S. to find out where you can get more quality of life for less money. The study compares 22 metrics in the cities, ranging from housing costs to household income to school-system quality to the number of restaurants.

Source: WalletHub

Methodology of the WalletHub study

To find the best (and worst) small cities in America, WalletHub compared 1,268 U.S. cities across four key dimensions: 1) Affordability, 2) Economic Health, 3) Education & Health and 4) Quality of Life. The study looked at cities with a population between 25,000 and 100,000 residents. Note that “city” does not include surrounding metro areas.

The final ranking was based on 22 relevant metrics that reflect the four dimensions of affordability, economic health, education & health and quality of life.

California Small Cities List

The top five small cities in the U.S.

College towns often score well on quality of life surveys, and this year’s WalletHub Best Small Cities survey is no exception, as Princeton, NJ, the home of world-famous Princeton College is ranked in first place on the list  with an overall score of 61.90. Littleton, CO was next on the list with a score of 57.62, and Dublin OH came in third (57.22). Brookfield, WI was ranked as the fourth best small city in the U.S. with a score of 57.18, and Leawood, KS rounded out the top five (57.09).

California Small Cities List

The five worst small cities in the U.S.

The five lowest ranked small cities in the U.S. are all in California. In fact, the bottom 22 small American cities on WalletHub’s 2015 best cities list are all located in California. Lynwood, CA is No. 1264 on the WalletHub list with a total score 29. Compton, CA is No. 1265 on the list with a score of 28.63. Bell Gardens. CA is 1266th with a score of 27.76, Huntington Park, CA No. 1267 (27.59), and Bell, CA comes in dead last with a score of 26.78.