WalletHub recently compared over 400 U.S. college towns and cities to determine the best in America. To be considered, the cities had to have a college or university population of at least 7,500.

How does one decide what makes a good college town? Their criteria included quality of education, cost of living, crime rate, and 28 other indicators for students. Each metric was graded on a 100-point scale and the weighted averages were combined into a final score. 

Turns out, the home of San Diego State University, UC San Diego, University of San Diego and many other colleges and universities ranked pretty high. 

Out of 415 places included in the rankings, San Diego came in at No. 10 with an overall score of 54.55. Where the Southern California city really shined was in the “Social Environment” category, scoring No. 1 overall. The city’s strong student population coupled with great nightlife, restaurants, breweries, and sports activities put it above the crowd. That also helped make up for a so-so No. 103 ranking in the “Academic and Economic Opportunity” category and low No. 341 ranking in the “Wallet Friendliness” category.

When broken out by population sizes, San Diego came in No. 4 among large cities included in the rankings, trailing only Austin, Las Vegas, and Tampa.