MILWAUKEE -- Choosing the right place to raise your kids can be a tough decision.

Luckily for those in Wisconsin, WalletHub recently ranked the state the 6th best place to raise a family in the country.

The study was based on factors including family fun, health and safety, affordability and socioeconomics. Wisconsin scored high in the affordability category, coming in as the fourth most affordable state in the nation.

Wisconsin was ranked 11th for socioeconomics, 14th for health and safety and 21st for family fun. Massachusetts was named the number one state to raise a family, with Minnesota and New Hampshire following close behind.

New Mexico was at the bottom of the list.

Check out the complete results of the study to see how other states fared.