The University of Texas at Austin has been named the top public school in America, according to rankings compiled by Niche.

Texas finished ahead of Michigan, Virginia, UCLA and California in the Top 5, it also ranks ahead of No. 10 Texas A&M, No. 60 Texas Tech and No. 62 Houston in terms of in-state schools.

Niche, which looked at 1,713 colleges to compile its rankings, used a formula to compile its rankings that took into account factors such as "the strength of the academic program, the aptitude of professors, the quality of campus amenities, the general character of student life, as well as student reviews."

Texas earned at least an "A-" in all but one of Niche's categories, including an "A+" rating for academics, athletics, campus quality and the local area.

You can get a full breakdown of Niche's formula here. The website used statistics from the U.S. Department of Education to create its data.

What's next for the Longhorns? Make sure you're in the loop by signing up for our FREE Texas newsletter!