Housing and food make up the bulk of these costs, with childcare, education, transportation and health care comprising almost all of the rest.

Babies in particular are expensive. One parent who tracked every dollar found that she spent $20,000 in the first 18 months alone.

And that’s on the low end. Households bringing in $200,000 can spend $52,000 just in the first 12 months of their newborn’s life, according to a report from NerdWallet.

Pregnancy and delivery are pricey too. Even with insurance, delivering a child could cost you around $3,400 out of pocket.

If you plan on supporting your child through college so she can avoid years of debilitating student loan payments, the size of that bill will depend on where she goes to school. Public universities charge an average of $20,090 for tuition if you’re in-state, and $34,220 if you’re not, a number that is comparable to an average private-school tuition.

In short, if you’re middle-income, have spending patterns that are similar to your fellow parents, have two children (the average family has between two and three) and send them to an in-state public school, you are looking at spending $514,200 total.

Don’t have two kids, and you’ll save over half a million dollars.

Then again, even if you do save that much, you might lose it all to a nursing home when there is no around to take care of you.

Like this story? Like CNBC Make It on Facebook

Don’t miss: One mom tracked every penny and found her 18-month-old has cost her $20,000