Massachusetts has the best public schools in the country, per WalletHub, which looked at the overall quality and safety of public schools in each state according to 21 different factors.

Top 5: Massachusetts, New Jersey, New Hampshire, Wisconsin, Vermont

Worst 5: Louisiana, New Mexico, West Virginia, D.C., Mississippi (See the full list, here.)

Spending: While 4 of the 5 top states for quality were among the 10 states who spend most on education, a higher level of spending did not necessarily correlate to higher quality of publics schools. For example, D.C. came in third for spending, but has some of the worst public schools according to the study.

Expand chart Data: WalletHub; Chart: Andrew Witherspoon / Axios

Factors: The study took into account graduation rates for low income students, drop out rates, median ACT and SAT scores, reading and math test scores, number of students participating in violence and number of reported bullying incidents among other factors.

Highlights: