While babies are a blessing, they can also be more expensive than most new parents ever imagined. Research shows that it costs a family with a median income nearly a quarter of a million dollars to raise a child through age 17 in the United States. Whether you are expecting a new addition in just a few months or a little farther down the road, follow these steps to prepare your finances for the wee one in your future:

Use the time before birth to save

I know from experience this can feel like a very long nine months if you or your partner are expecting a baby this year. That’s why you should use it to your advantage by setting a goal to put away as much money as you can in extra savings by the time your new addition arrives. This is especially useful if one of you would like to become a stay-at-home parent. Go ahead and practice living on only the income of the parent who will continue to work so you can figure out if it’s even possible. You should save the other income for the nine months leading up to a birth, which will allow you to give your potential new arrangement a trial run, and also serve as a way to help ramp up your savings. Make sure to put the extra funds in a separate account so you won’t be tempted to spend any of it on cute baby outfits and toys.

Run the new numbers

Depending on where you live and your childcare needs, welcoming a new baby to your family can add $600 a month to the budget – sometimes less, sometimes much more if you plan on returning to work and need a nanny or daycare services. It’s important to figure out where the extra cash is going to come from, and what you’re going to cut back on to make it work for your situation.

Use some of the time before the baby arrives to prepare a new spending plan for your family. To do this, first go through your current budget line by line and ask yourself questions such as: Will I spend more or less on commuting? Work clothes? Insurance? If you’re planning to stay home, your insurance agent may be willing to give you a lower rate, and you’ll likely save on wardrobe and commuting costs.

Do your homework

Take the new budget and add in estimated expenses related to the baby. It’s easy to research those costs online. You can also ask a friend or family member how much they pay for everything from childcare to diapers. Daycare prices for one child can cost as much or more than a mortgage payment in many U.S. cities, with monthly rates ranging from $800 to $1,100 (or more) for an infant. The cost tends to go down incrementally for toddlers and preschoolers.

Borrow instead of buying

While you may be tempted to buy every adorable gadget advertised on Amazon, impulse spending is not your friend, now or ever. Instead, try to borrow everything you can. If you have friends or family that were recently pregnant, many of them will gladly lend or give you their gently used hand-me-downs for the baby and maternity clothes for you. Make sure to keep them in good shape and offer to give them back when you’re done, or help another new mom by passing them along.

You can also buy “nearly new” baby clothes and other items from used children’s clothing stores and places such as Facebook marketplace. Children younger than five outgrow their clothes so fast that it doesn’t make sense to pay full price. Plus, your infant will never know they are wearing a cousin’s onesies.

Patience pays off

If possible, wait until after a baby shower to buy any big-ticket items you might need. Even if you don’t have a formal party, you’re likely to receive gifts from friends, work colleagues and family members. If you receive gift cards, remember to keep the receipts and try to bundle them, if possible, to use for large purchases such as strollers, cribs and car seats.