CHARLESTON, WV (WOWK) — Even though West Virginia is one of the most affordable states to live in, the Mountain State is considered one of the worst places to live in, according to a study by WalletHub.

The study says they used four criteria to make the list: affordability; economy; education and health; and quality of life.

West Virginia ranked 41 out of the 50 states overall. It is ranked number two for affordability, being beaten out by Alabama. But the Mountain State is ranked 44 for both economy and education and health. The state is ranked 45 for quality of life, being beaten out by Arkansas, Kentucky, Delaware, Mississippi and Alaska.

The worst places to live, according to the study, include:

RankStateAffordabilityEconomyEducation and HealthQuality of Life
41West Virginia2444445
45South Carolina11274626
46New Mexico26364230
Table Courtesy: WalletHub

The best places to live, according to the study, include: Massachusetts; New Jersey; New York; Idaho; Virginia; New Hampshire; Florida; Wyoming; Minnesota; and Wisconsin.

The study says that West Virginia has the highest homeownership rate, beating out Maine, Minnesota, Michigan and Delaware for the top spot. West Virginia is also one of the states with the highest poverty rate. The states with a higher percentage of population living in poverty include Louisiana, New Mexico and Mississippi.