If you plan on having children and working while you raise them, you might want to consider moving to Connecticut.

A new study has examined which states are the worst for parents planning to work while raising kids – and North Carolina ranked the fifth least suitable.

States were judged on a combination of the following: childcare affordability, public-school rankings, maternity leave pay, maternity leave length, and the cost of living.

Only four states finished worse than North Carolina in these categories.

New Mexico was named the most unsuitable state for working parents largely due to its lack of paid maternity leave and low average income.

On the opposite end of the spectrum, Connecticut was found the best state in this regard thanks in part to its 12 weeks of paid maternity leave and the low amount parents spend on childcare.

The study was conducted by Human Resources tech researchers at SelectSoftware Reviews.

The second worst state for working parents was found to be Montana, due to the state’s lack of paid maternity leave and high cost of living.

 Michigan came in third worst, while West Virginia was found to be fourth worst based in part on its second lowest average income at $49,000 a year.  West Virginia also has an above-average cost for childcare, with parents spending 36 percent of their income for that purpose.

According to the study, North Carolina – the fifth worst state for raising children while working – is 43rd in the public-school rankings among states, and, on average, requires parents to spend 32 percent of their annual income on childcare.