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.

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.

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 percent 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 [may not] 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.

Here are the top and bottom five states with the best schools.

States with the best schools:

5. Maryland

Overall grade: B

> Per pupil spending: $12,922 (18th highest)

> High school graduation rate: 87.0% (16th highest)

> Pct. 3 & 4 yr. olds enrolled in preschool: 50.5% (10th highest)

The wealthiest state in the nation, a typical household in Maryland earns $75,847 a year. Despite a strong tax base, Maryland’s $12,922 annual per-pupil education spending is only a few hundred dollars higher than the average spending nationwide. Though school spending is not especially high in Maryland, it is equitable. No state in the country has more even funding distribution across districts than Maryland.

Ranking relatively well in school finance, Maryland also does better than the vast majority of states in student achievement. In Maryland 55.8% of 11th and 12th graders’ advanced placement tests earned scores of at least a 3 by far the largest share of any state in the country.

4. New Hampshire

Overall grade: B

Per pupil spending: $15,386 (7th highest)

High school graduation rate: 88.1% (7th highest)

> Pct. 3 & 4 yr. olds enrolled in preschool: 53.1% (7th highest)

Children in New Hampshire are more likely to be raised in a financially secure household with college educated parents than children in any other state. Growing up in poverty can significantly hinder academic performance, and in New Hampshire, three-quarters of all children live in families earning at least twice poverty level income, a far higher share than the 57.2% of American children growing up in such households. Additionally, 63.9% of children in New Hampshire have at least one parent with a college degree, compared to less than half of all American children.

With so many children coming from backgrounds conducive to academic success, students in New Hampshire report better results in the classroom than is typical. The state is home to the second highest share of fourth and eighth graders proficient in reading than any other state in the country.

3. Vermont

Overall grade: B

Per pupil spending: $19,654 (the highest)

High school graduation rate: 87.7% (11th highest)

Pct. 3 & 4 yr. olds enrolled in preschool: 54.2% (5th highest)

Vermont is one of several New England states to have one of the highest rated education systems in the country. As is the case in most other states in the region, students in Vermont tend to do well in many standardized measures of academic achievement. About 45% of fourth graders and 44% of eighth graders are proficient in reading, each the third largest share of any U.S. state. Strong academic performance may be linked to Vermont’s relatively robust early childhood education program. Some 54% of three- and four-year olds in the Green Mountain State are enrolled in preschool, a larger share than in all but four other states.

Vermont spends $19,654 on its schools per pupil annually, more than any other state. The high per-pupil spending is largely due to higher costs resulting from the state’s many small, rural districts.

2. New Jersey

Overall grade: B

Per pupil spending: $15,946 (6th highest)

High school graduation rate: 89.7% (2nd highest)

Pct. 3 & 4 yr. olds enrolled in preschool: 63.7% (2nd highest)

Only three states report a higher median annual household income than New Jersey’s $72,222. Partially because of its strong tax base, New Jersey invests heavily in its public school system. The Garden State spends the equivalent of 4.8% of its taxable resources on its schools, second in the country only to Vermont. Each year, nearly $16,000 per student are spent on New Jersey schools -- more than all but five other states.

While the connection between school spending and educational outcomes is complex, in New Jersey, high spending accompanies strong academic performance. The state has some of the largest shares both of math and english-proficient eighth graders, and about 38% of 11th and 12th grade advanced placement test scores in New Jersey are 3 or better -- high enough to qualify for college credits -- the sixth largest share of all states.

1. Massachusetts

Overall grade: B

Per pupil spending: $14,081 (11th highest)

High school graduation rate: 87.3% (13th highest)

Pct. 3 & 4 yr. olds enrolled in preschool: 57.8% (3rd highest)

Based on a variety of measures related to school funding and academic achievement, Massachusetts earns a better grade than any other state in Education Week’s Quality Counts report. Early childhood education is important for cognitive development, and in Massachusetts, 57.8% of three- and four-year olds are enrolled in preschool, one of the highest shares of any state. Perhaps due in part to a robust childhood education program, Massachusetts has the highest share of fourth and eighth graders who are proficient in math and reading.

The state's successes, however, are not entirely attributable to its education system. Children living in poverty face a host of challenges that can hinder educational achievement, and children growing up in Massachusetts are far more likely to grow up in a financially secure environment than most youth. Additionally, children raised by educated parents are more likely to do better in school, and in Massachusetts, 61.7% of children have at least one parent with a post-secondary degree, well above the 48.8% national average.

States with the worst schools:

5. Oklahoma

Overall grade: D+

Per pupil spending: $8,929 (7th lowest)

High school graduation rate: 82.5% (21st lowest)

Pct. 3 & 4 yr. olds enrolled in preschool: 43.2% (22nd lowest)

There is no consensus among researchers that higher education spending leads to better educational outcomes. While the relationship is complex, a certain amount of resources is needed to attract high quality teachers and provide adequate access to education technology such as computers, among other costly learning materials. This could explain the correlation between spending and outcomes across states.

Per-pupil spending in Oklahoma averages just $8,929 a year, the seventh lowest expenditure of all states. Like many other states with relatively low education expenditure, state students score poorly on standardized tests. Just 2.7% of eighth graders achieve advanced scores in math, nearly the worst standardized test performance of all states.

4. Idaho

Overall grade: D+

Per pupil spending: $8,066 (2nd lowest)

High school graduation rate: 78.9% (12th lowest)

Pct. 3 & 4 yr. olds enrolled in preschool: 29.6% (the lowest)

In Idaho, annual education spending is $8,066 per student, the second lowest of all states after only Utah. According to Education Week researchers, a certain level of funding equity across school districts is critical to the health of a state’s education system. In a addition to low per pupil funding, education spending in Idaho is also poorly distributed across districts.

Preschool enrollment is often a positive experience for children, and can be especially beneficial to working mothers and low-income families. As such, it is a key component of a healthy state education system. In Idaho, less than 30% of three- and four-year-old children are enrolled in preschool, the lowest percentage of all states.

3. New Mexico

Overall grade: D

Per pupil spending: $10,714 (18th lowest)

High school graduation rate: 68.6% (the lowest)

Pct. 3 & 4 yr. olds enrolled in preschool: 40.7% (15th lowest)

New Mexico’s 68.6% high school graduation rate is the lowest rate of all states. Mirroring the poor graduation rate across the state, New Mexico’s standardized test scores also trail those of most states. For example, the percentage of fourth grade students who demonstrate proficiency in reading, at 22.9%, is also the lowest in the country. Nationwide, 34.8% of fourth grade students demonstrate reading proficiency. Such poor outcomes are likely at least partially tied to various socioeconomic factors. Because the source of school budgets is largely property tax revenue, low incomes can help explain low funding. New Mexico’s per pupil expenditure is below average, and the typical state household earns a modest $45,382 a year, sixth lowest compared with other states.

2. Mississippi

Overall grade: D

Per pupil spending: $9,656 (13th lowest)

High school graduation rate: 75.4% (4th lowest)

Pct. 3 & 4 yr. olds enrolled in preschool: 49.0% (15th highest)

Children from wealthier families are far more likely to attend well-funded schools, where for a variety of reasons the quality of education is often substantially higher than in poorer schools. With a median household income of $40,593 a year, Mississippi is the poorest state in the nation. State schools spend $9,656 per pupil annually, well below the national average per-pupil spending of $12,156. Further, just 1.7% of students attend school in districts that report spending levels that exceed the U.S. average, versus 38.6% of students across the nation. According to Education Week, the poverty gap between rich and poor Mississippi school districts, particularly for eighth graders, is getting worse, and faster than in the vast majority of states.

By many measures of achievement, students in Mississippi are trailing their counterparts across much of the country. For example, only 4.0% of advanced placement test scores among 11th and 12th graders in the state are high enough to earn college credit, the lowest share in the country, and well below the 29.3% national average.

1. Nevada

Overall grade: D

Per pupil spending: $8,441 (5th lowest)

High school graduation rate: 71.3% (2nd lowest)

Pct. 3 & 4 yr. olds enrolled in preschool: 33.5% (2nd lowest)

No state’s school system is rated worse than Nevada’s. The state’s high school graduation rate declined by nearly 12 percentage points over the decade through 2012. This was the largest decline of all states, the vast majority of which reported graduation rate increases. Just 71.3% of seniors graduate high school, lower than in all states except for New Mexico.

High preschool enrollment is an indication of a healthy education system as it is frequently beneficial to both families and children. In Nevada, just one-third of eligible children are enrolled in preschool, the second lowest proportion of states and in stark contrast to the national share of nearly half of preschool-aged children.