While having a baby is usually a joyous occasion, the logistics of the process can differ wildly based on where you’re raising your family. Healthcare costs, hospital rankings, mortality rates, availability of doctors and midwives, and many other factors vary from state to state and region to region.

WalletHub recently decided to crunch some numbers to figure out which states are the best for soon-to-be and brand-new parents, and which are the worst. The financial advisory site (which loves to rank states on characteristics like how happy, fun, and environmentally friendly they are) examined a number of different factors related to pregnancy, childbirth, and infancy in all 50 states plus the District of Columbia.

The data encompassed 26 different factors related to childbirth and parenting, including how much hospitals typically charge for C-sections and conventional deliveries, the average cost of a babysitter, the state’s parental-leave policy, maternal and infant mortality rates, vaccination rates, and how many pediatricians, OB-GYNs, midwives, and childcare centers there are per capita.

Below are the top 10 best states for having a baby overall, according to WalletHub's analysis.

1. Vermont
2. Massachusetts
3. Minnesota
4. New Hampshire
5. North Dakota
6. Connecticut
7. Colorado
8. Nebraska
9. District of Columbia
10. California

And here are the top 10 worst:

1. Mississippi
2. Alabama
3. South Carolina
4. Louisiana
5. Oklahoma
6. West Virginia
7. Georgia
8. Arkansas
9. New Mexico
10. Nevada

Few states had consistent ratings across all categories, in part because in the U.S., good healthcare is incredibly expensive. Vermont, the overall winner, was number one in the healthcare category and number five in family friendliness, but it ranked all the way down at number 20 for cost. California cracked the overall top 10, but was more costly than any other state save Alaska. Louisiana, meanwhile, was the cheapest state to have a baby, but was 51st in the healthcare rankings.

The best states to give birth in aren’t necessarily the best states to raise a child in, either, according to the site's analysis. New Hampshire was second in health care, but number 40 for baby friendliness, meaning it has few child care centers and poor parental leave policies. Maine, too, was number seven in the healthcare rankings but only number 37 in baby friendliness.

Overall, it seems that when it comes to having kids, no state is perfect. See the full list at WalletHub.

[h/t a plus]