Fort Collins, Colorado, home to Colorado State University. 3.0/Wikimedia Commons When deciding where to go to college, location can matter just as much as academics. Factors like safety, job opportunities, and cultural vibrancy can elevate — or detract from — the college experience.

Niche, a company that researches and compiles information on cities, recently named the best college towns in America, focusing on the overall livability of places where undergraduates from a top-250 college make up at least 10% of the town's overall population.

To determine "livability," Niche narrowed in on each city's cost of living, public-school quality, the percentage of residents who hold at least a bachelor's degree, and the overall strength of the area's real-estate market. Niche also factored in things like diversity, crime rates, and access to amenities. You can read a detailed breakdown of the methodology here.

From the homes of big state schools to small towns housing tiny private schools, here are the 30 best places to live while you're earning that degree.