LUBBOCK, Texas — found where Texas and New Mexico rank among the best states to live in the United States, according to a WalletHub survey.

The survey ranked Texas as the 37th best state to live with an overall score of 48.56. New Mexico was given an overall score of 29.86 and ranked number 50, or the worst state to live, according to the survey.

The study showed that Texans work the third highest amount of average weekly hours. Texas has the fourth lowest percent of the population who are 25 or older with a high school diploma or higher.

The rank of each state depended on its score. The survey determined scores with several factors including affordability, economy, education, health, quality of life and safety.

The top three states were Massachusetts with a score of 61.67, New Jersey with 61.48 and New Hampshire with 59.32.