The Granite State is a great place to raise kids.

New Hampshire is the state with the highest overall child well-being in the United States, according to the 2018 Kids Count report published Wednesday by the Annie E. Casey Foundation, a nonprofit group dedicated to improving the welfare of American kids. But New Mexico was deemed the worst.

The annual report ranks the 50 states by combining 2016 data on economic well-being, education, health, as well as family and community. And it digs even deeper into those four areas to measure poverty, death rate, alcohol and drug use.

Turns out, the stronger economy is creating better living situations for many parents and kids. The report found about 1.6 million fewer children are living in poverty than five years ago; more parents are employed; and fewer families are spending a disproportionate amount of their income (more than 30%) on housing costs.

Five of the top 10 states for overall child well-being are in the Northeast, where incomes are generally higher. New Hampshire came in first and Massachusetts second, followed by New Jersey, Minnesota, Iowa, Utah, Connecticut, Vermont, Nebraska and Virginia. New Hampshire kids benefit from the state’s low child poverty rate (just 8%), while Massachusetts was the only state where more than half of fourth graders were reading proficient. And Utah boasted the lowest percentage of children in families without secure parental employment (18%).  

ALSO READ: These are the best states for working dads – and the worst

But one in five children were still living in poverty in 2016, particularly in states in Appalachia, the Southeast and Southwest, which scored the lowest in the overall rankings. The lowest-ranked 10 states were, in ascending order, Arkansas, Alabama, Texas, Oklahoma, Arizona, Alaska, Nevada, Mississippi, Louisiana and New Mexico. New Mexico and Mexico shared the highest child poverty rate (30%). New Mexico and West Virginia shared the highest rate of kids in families without secure parental employment (36%). And New Mexico also hit the bottom of the list because 75% of its fourth graders are not reading proficient.

WalletHub’s recent best and worst states report also ranked New Mexico as the worst state to raise children when factoring in family-friendly metrics such as childcare costs, median family salary, housing affordability and the unemployment rate. The state known for its crop of green and red chile peppers has a median household income of $43,872, which is well below the national average of $59,039, while the average home value in New Mexico is $175,100, according to Zillow.

New Hampshire scored highly on WalletHub’s report, as well, landing in third place largely thanks to having the lowest infant mortality rate. Massachusetts took the top spot on this list, however, trumpeted for being a fun, safe state with affordable housing and good schools. The median household income is $67,846, according to the US Census Bureau, with the median list price for a home is hitting $419,900 earlier this year, according to Zillow.

ALSO READ: These are the best and worst states to have a baby

Minnesota took second place as the best state to live in, with the highest median family salary, which was $65,599 in 2016. North Dakota followed in fourth, ranking No. 1 for having a low divorce rate, lowest percentage of families in poverty, and some of the most affordable housing (the median home cost in North Dakota is $188,800).

Vermont, Wisconsin, New York, Iowa, Nebraska, and California rounded out the WalletHub list of top 10 best, while Nevada, Georgia, Arkansas, South Carolina, Oklahoma, Louisiana, West Virginia, Alabama, Mississippi and New Mexico were ranked the top 10 worst cities to raise a family.

This article was originally published in January 2018, and has been updated with the Kids Count data.