Most of us spend our 20s learning how to adult and launching our careers, so it seems unfair that Mother Nature expects us to become parents then too. A woman's fertility peaks in her 20s and begins to decline in her 30s, just as many of us are finally starting to earn a decent salary. And there's no question the idea of having a baby can feel financially overwhelming.

About 40% of people aged 18 to 40 said that credit card or student loan debt was keeping them from starting a family, according to a 2017 survey by the Reproductive Medicine Associates of New Jersey. And 30% said they delayed getting pregnant because they “couldn’t afford it right now” and “need to make more money.”

But when it comes to calculating the expense of giving birth and taking care of a baby, knowledge is power. If you’re thinking about starting a family, there are a few facts you should know about what it will cost.

To get our top stories delivered to your inbox, sign up for the Healthy Living newsletter

One study found the average cost of giving birth in a hospital, for example, is $18,329. For people with commercial health insurance, out-of-pocket costs averaged $2,244. If mom needs to have a cesarean section, the average price jumps to $27,866, with out-of-pocket expenses at $2,669.

And the bills don't stop there. While the cost of raising a child varies depending on where you live and how much money you make, a 2017 U.S.D.A report estimates that new parents can spend more than $1200 a year for the first two years of a child's life.

Having a baby can be a big and scary step. To learn more about the expenses involved—including the costs of egg freezing and fertility treatments—so you can plan ahead, check out the video above.