Four years ago, Cynthia Millsaps learned that she was pregnant — except she didn’t mean to be. She and her husband already had three children, the youngest of whom was 9.

“We refer to her as ‘the best oops ever,’” said Millsaps, now 44, and living in Georgia in the US. “She has been a wonderful addition to our family but a real challenge since we had gotten rid of every baby item we owned at that point.”

Unplanned pregnancies are more common than you might think. In the US, some 37% of births are not planned, according to the National Center for Health Statistics. In Brazil, 30% of pregnancies are unplanned, and almost half of Australian pregnancies are surprises, according to Australia-based Children By Choice.

Raising another child is a tremendous financial commitment. Bringing up a child in the UK to age 21 is estimated to cost about £222,000 ($376,679), according to UK insurer Liverpool Victoria. In the US, the cost to age 18 is estimated at $241,080, according to the US Department of Agriculture.

That can mean working longer and saving less. “An unexpected baby can disrupt a family’s plans,” said Brett Evans, executive director of Atlas Wealth Management in Southport, Australia. Here’s how to handle the new addition.

What it will take: A surprise baby will require good communication between you and your partner, a solid support system of friends and family and some financial belt-tightening. “Start keeping track of what you are spending before the baby arrives,” said Sarah Redshaw, editor for BabyCentre UK. “Look at what you can save money on. Perhaps cut back on luxuries such as movie channels or lower your mobile tariffs to something a little more affordable.”

How long you need to prepare: You have until the baby’s due date, although some babies show up early, so don’t wait until the last minute. “Try and gather as much capital as possible to offset the drop in income once they arrive,” Evans said.

Do it now: Have the money talk. Parents “need to have a serious sit-down to review and discuss finances,” said Carmen Wong Ulrich, co-Founder and President of ALTA Wealth Management in New York City. “Assess your current situation before freaking out about the future.”

For instance, what’s going to happen to your family’s work situation? Will one parent have to take time off or leave a job? How long will you have paid maternity leave? Is paternity leave offered at your company? “The biggest expenses will actually be childcare and any lost hours or wages from missing work,” Ulrich said. “If you’re thrilled to stay home for the first year or more, be very clear that it may take some time to get back to where you were financially once you return to work.” Consider working part-time or freelancing for extra cash and to keep a finger in your field.

Plan for next steps. “Think about what will need to change, beyond diapers,” Ulrich said. “Will you need to move? And if so, what would that move look like? Could you stay put for the first year, then as the child grows bigger, move then?” Will you need a different vehicle to accommodate another car seat? Was one of you planning on starting a business or getting back into the workforce after a break? “Changes should not be made abruptly,” Ulrich said. “Discuss, crunch numbers, give yourself options such as Plan A and Plan B and reach out to friends and family for advice and guidance.”

Ask for hand-me-downs. Get the word out quickly that you’re in the market for good-condition baby items. “It’s key to get in the rotation and at least make people aware that you’re going to need some stuff, especially when you’ve already had kids,” said Brian Frederick, a financial planner with Stillwater Financial Planners in Arizona in the US. “Sometimes it’s assumed that you already have things.” Make use of classified ad sites such as Craigslist and Gumtree to find gently used gear. You can also find bargains on eBay.

Think before you spend. Many moms “invest quite a bit of money to put together baby showers — super popular in Brazil — in the hopes of getting it all back in great gifts and a ton of diapers, just to be completely disappointed by the small turnout and cheap gifts,” said Fernanda Ravagnani, editor for BabyCenter Brasil. “I’d suggest that moms skip baby showers and save the money to buy essential items for the baby.”

Do it later: Start socking money away. “If you plan to help your child with college, start putting away extra savings as soon as possible,” said Chad Creveling, managing director and advisor at Creveling & Creveling Private Wealth Advisory in Bangkok, Thailand. “Many people miss out on the compound earning effects of investing by waiting too long to start.”

That said, don’t save for college at the expense of other necessary savings. “You as a parent are like the foundation of a great house,” Ulrich said. “If you don’t shore yourself up and save enough to be financially strong, your future could crumble.”

Revisit your retirement plan. “Usually what happens is that people get their youngest out of college, and then they retire,” Frederick said. In the US, that typically means about 22 more years on the work clock, so plan accordingly.

Do it smarter: Don’t panic. “To me, the big thing is to be flexible,” Frederick said. “Usually, what I see happen is that people are really vigilant about planning for the financial aspect of kids, but when it’s an ‘oops’ baby, they just go ‘AAAAHHHH!’ Take a deep breath and come up with a new plan.”

And consider that there’s never a perfect planned moment, said Diane Rai, editor for BabyCenter India: “Even if mums-to-be feel negatively about their situation, they should try not to get stressed and aim to stay positive. Things do work out eventually.”