Few concerns facing the United States — or any nation — are more important than ensuring children receive a first-rate education. At her confirmation hearing on Tuesday, U.S. education secretary nominee Betsy DeVos answered questions about school proficiency. Policymakers and observers disagree as to how to spend public education funds and how exactly schools should be improved. At the very least, however, most agree that school proficiency must be measured.

The nation’s education system has remained steady through poor economic times as well as policy changes. But steady is not enough and there remains considerable room for improvement.

44. Alabama
> Overall grade: D+
> Per pupil spending: $10,038 (15th lowest)
> High school graduation rate: 89.3% (3rd highest)
> Pct. 3 & 4 yr. olds enrolled in preschool: 42.4% (18th lowest)

Trailing most states in most education measures, Alabama’s school system was graded seventh worse of all states. Not all data, however, point to poor school performance. Alabama’s high school graduation rate of 89.3% is third highest. Similarly, over the decade through 2012, the state’s graduation rate increased by 12.9 percentage points, the fifth best.

Test scores in Alabama are also improving much faster than in most states. While this is a very good sign for the state, it is also generally the case in states where scores were low to begin with. And often, as is the case in Alabama, achievements remain relatively low despite the improvement. On the most recent round of standardized tests, just 26.1% of fourth graders and just 17.2% of eighth graders demonstrated proficiency in mathematics, each dead last compared with other states.

24/7 Wall St. reviewed education data for each state from the 2017 edition of the Quality Counts report, released annually by Education Week. The report assessed metrics in three broad categories that can determine the strength of a school system: school finances, student achievement, and environmental factors. Massachusetts schools are rated best of all states, while Nevada’s school system has the lowest score.

Click here to see the states with the best and worst schools.

According to Sterling Lloyd, assistant director at the Education Week Research Center and coauthor of the Quality Counts report, the grading framework rewards states with a “well-rounded approach to education.” Broadly speaking, in states at the top end of the ranking, parents have the resources to support their children’s learning in well-funded schools; students report high academic achievement in the classroom; and graduates are able to pursue careers in an economy where opportunities are available to them.

Family income levels can play a major role in the quality of a child’s education. As Lloyd explained, “it certainly helps for parents to be able to provide stability and resources.” A child from a high-income family may enjoy greater access to books and a personal computer, as well as access to extracurricular activities that require some monetary investment. These educational tools and learning experiences are generally less available to poorer children.

In the United States, 57.2% of children are raised in households with incomes at least double the poverty level. In all but two of the states in the top half of the rankings, a larger share of children live in such households. Conversely, in only six of the 25 lower ranked states the share is greater.

Because school budgets are funded largely by property taxes as well as extensive private fundraising, a child from a high-income family is also more likely to attend school in a well-funded school district. Children attending such schools benefit from a range of additional advantages, including teachers with higher pay and greater qualifications.

By contrast, “children living in low-income areas have the resources to help them get off to a good start,” Lloyd said. Citing research indicating the benefits to all children of pre-K programs, Lloyd went on to say that “preschool can help to counteract certain disadvantages and is especially important for children in poverty.” Despite the higher stakes for low-income families, the likelihood of a child attending preschool is lower across states in which more families face financial instability.

Other socioeconomic measures, such as parental educational attainment and having fluent English speaking parents, can also have a significant bearing on a student’s chances for academic success.

To identify the states with the best and worst schools, 24/7 Wall St. used Education Week’s Quality Counts 2017 report. The report is based on three major categories: chance for success, finances, and K-12 achievement. The chance for success category includes data on family income, parent education and employment, child schooling, and employment opportunities after college. Graduation rates are defined as the percent of public high school students who graduated on time with a standard diploma for the 2014-2015 school year. All other data are for the most recent available year and are based on Education Week’s analysis of data from the U.S. Census Bureau, among other sources. The finance category incorporates metrics on cost-adjusted per-pupil spending and how equitably spending was distributed across school districts in the state in 2013. The K-12 achievement category uses 2015 test score data from the National Assessment of Educational Progress. Each category was weighted equally in determining the final ranking.