Looking for the best state to put down roots? A recent study may have the answer.

Idaho is the top state to live in for those wanting a well-rounded life, according to an August analysis by personal finance site WalletHub. It scored the best across five categories in the study: affordability, economy, education and health, quality of life and safety.

“When deciding on a place to move, you should first consider financial factors like the cost of living, housing prices and job availability,” analyst Chip Lupo wrote. “Many states have strong economies, though, so you should also consider a wide variety of other factors, such as how where you live will impact your health and safety, and whether you will have adequate access to activities that you enjoy.”

Two of the study’s top five states were located in New England.

New Jersey ranked No. 2, followed by Wisconsin, Massachusetts and New Hampshire.

Idaho ranked in the top 10 for three categories: affordability (No. 10), economy (No. 7), and safety (No. 3).

Meanwhile, two of the bottom five states were located in the South. New Mexico ranked last in the study, followed by Louisiana, Mississippi, Alaska and Arkansas.

New Mexico ranked no better than No. 25 across the five categories WalletHub scored, and was in the bottom five for education and health (No. 47) and safety (No. 49).

WalletHub ranked states 1 through 50 for each of the five categories it scored. The top states in each category were:

  • Affordability: West Virginia
  • Economy: Vermont
  • Education and health: Massachusetts
  • Quality of Life: New York
  • Safety: New Jersey.

In many cases, a state’s affordability did not directly correlate to a good overall ranking. Four of the top five states in the study ranked No. 30 or worse – Wisconsin (No. 30), New Hampshire (No. 40), Massachusetts (No. 44) and New Jersey (No. 49).

And all but one of the states ranked in the bottom five had affordability score worse than No. 25 – Alaska (No. 43).

WalletHub’s affordability results highlight a situation that many consumers find themselves in – making trade-offs to save money.

Recent studies have shown that 1-in-4 car owners have delayed maintenance to afford gas prices, and half of families are cutting back on other spending to afford back-to-school shopping.

Discount store Dollar General revealed that its seeing an inflow of customers earning $100,000 or more who are looking for cheaper daily necessities.