BOSTON (CBS) – The Massachusetts school system is second to none, according to a new survey.

WalletHub ranked the school systems of every state across 21 key measures, and found that Massachusetts is far ahead of the pack. In fact, three New England states come in the Top 5, with New Hampshire at No. 3 and Vermont in fifth.

READ MORE: Rachael Rollins Nominated To Be U.S. Attorney For Massachusetts

Bay State schools rank first in both quality and safety, according to WalletHub. It also takes the top spot when it comes to math and reading test scores, median ACT score and has the lowest percentage of threatened or injured high school students.

READ MORE: Pilot Program For Free MBTA Rides On Route 28 To Begin August 29

New Jersey schools ranked second in the study. The worst school system in the country belongs to Louisiana, WalletHub says.

Massachusetts also finished first in WalletHub’s school survey in 2016. 

MORE NEWS: Massachusetts Gas Prices Remain Above $3 Per Gallon; 'Could Be Less Expensive In August'

See the full report here.