A new ranking by WalletHub tackles the question of which states offer the best environments for raising a family.

In a wide-ranging study that looked at everything from healthy services, to entertainment, to education and salaries, the personal finance website noted that there are many factors that families will want to consider when choosing a state to live in.

"Raising a healthy, stable family sometimes requires moving to a new state," WalletHub said in the report. "The reasons people choose to move are often similar: career transitions, better schools, financial challenges or a general desire to change settings. Wants and needs don’t always align in a particular state, though."

The study compared 50 states across 51 key indicators of family-friendliness, grouped into four main categories: family fun, health and safety, education and childcare and affordability, WalletHub said.

The following states, in ascending order, were ranked the highest for family living:

10. New Jersey

The Garden State scored the highest in the nation in the category of education and childcare. The state also had the third-highest median family salary and the third-lowest divorce and separation rate.