Your college years are supposed to the best four – or more – years of your life and the town you're living in makes a big difference.

It turns out Southwest Ohio is a pretty good choice.

University of Cincinnati and Xavier University students live in the 12th-best college town among mid-size cities, according to a recent WalletHub study. Cincinnati ranked 50th overall.

Oxford, home to Miami University, boasts the 29th-best college town overall and 15th among small cities.

That ranking is more than judging football tailgates and fraternity parties. WalletHub compared more than 400 U.S. cities based on 28 measures for students from average student loan debt to breweries per capita.

The three key factors:

"Wallet friendliness," which considered the adjusted cost of living for young people as the most important aspect.

Social environment, which weighted nightlife options, crime rate and students per capita most heavily.

Academic and economic opportunities, which weighed the quality of higher education the highest.

A school's location is just as important as a strong curriculum to a student’s academic success and personal development, experts say.

Sorry, Buckeyes, but Ohio State University's home city was well below UC's and Miami's towns. Columbus ranked 71 overall and 21 among big cities.

Athens, home to Ohio University, ranked 112 overall and 53 among small cities.

Data used to create the rankings were collected from the U.S. Census Bureau, Bureau of Labor Statistics, Federal Bureau of Investigation, National Center for Education Statistics, Numbeo, U.S. Department of Housing and Urban Development, TransUnion, TripAdvisor, Areavibes, Yelp and WalletHub research.