Austin ranked No. 9 overall in the personal finance website’s annual ranking of the 150 largest U.S. metropolitan areas, earning high marks for both educational attainment and the quality of education. 

WalletHub evaluated metro areas using 11 metrics, including the share of adults with high school diplomas, bachelor’s degrees and graduate or professional degrees. It also examined factors such as the quality of public school systems and universities, summer learning opportunities and gaps in educational attainment by race and gender.

Higher education levels can translate to higher earnings and, over time, higher tax contributions, according to the study.

Austin ranked 10th for educational attainment and fourth for educational quality, helping it achieve its top-10 status. WalletHub said educational attainment made up 80% of each metro’s overall score while education quality accounted for the remaining 20%.

The study found that Ann Arbor, Mich., was the nation’s most educated metro area, followed by Durham-Chapel Hill, N.C., and Madison, Wis. — all metro areas that are home to a flagship university.

At the bottom of the rankings were McAllen and Brownsville — both in Texas — followed by Visalia, California.