There’s no getting around it: In much of the country, this is a terrible time to unload your home.

Roughly 11 million mortgages are now “underwater” and over a million properties are in foreclosure proceedings. Even after all the carnage, home prices in 20 U.S. cities just dropped by the most in 18 months.

Yeesh. It’s enough to bring to mind that classic quip of gallows humor: It’s always darkest before it’s pitch black.

But even if it’s not the perfect time to shop your home, sometimes life intervenes. A new child enters the world, or a toddler becomes a teen. Homeowners with growing families often have no choice but to trade up to something bigger and better, because the walls are starting to feel like they’re closing in.

And so begins the complicated kabuki dance, of selling one home and buying another. Because there’s so much at stake, with large sums of money on both sides of the equation, it can be a highly stressful moment. Kind of like those movie scenes where sweaty bomb-defusers are trying to figure out which wire to cut: One false move, and you could blow up your finances for good.

That’s what terrified Claire Benson-Mandl. This year, the healthcare consultant in Vancouver, Canada, traded up from a townhouse to a freestanding home with an extra suite and a roomy private yard. She did it so her family, which includes a 3-year-old daughter, would have space to grow. But the home juggling didn’t come without some sleepless nights.

“It was horrific, just terrible,” remembers the 40-year-old. “I’m sure the anxiety took a toll on my lifespan. There were times when I was considering crawling to friends, family, even Facebook associates, wondering how I was going to come up with the money to bridge the gap.”

Benson-Mandl ended up succeeding at the tricky two-step, of selling her home and closing on the new one within days of each other. It took quick action, savvy strategizing and some price-cutting. But if you can pull it off, it can actually be an ideal moment to trade up to your dream home.

“There’s never been a better time to move up,” says Chris Bixby, a senior financial planner and adviser to high-net-worth individuals at Key Private Bank in Burlington, Vermont. “If your $150,000 house has dropped by 10 percent, and the $250,000 house you want to buy has dropped by 10 percent as well, then any loss on your sale will be more than made up by the gain on your purchase.”

But beware what you wish for, Bixby warns. That dream scenario could turn nightmarish very easily, if you end up with two homes simultaneously. That happened to one of his relatives, who bought a new home too quickly, and then struggled under the weight of two separate mortgages for four full years.

So how do you keep your wits about you, and manage the trading-up process calmly and intelligently? A few tips:

Contingency clauses are critical.
Insist on a clause stating that you be allowed to sell your own home before your desired purchase goes into effect. During the housing boom, that was a laughable thought, and would’ve got you run off the property. But in this tough environment where so many are so desperate to sell, you should be able to include that fail-safe protection.

When in doubt, sell first
If you can’t arrange for such a contingency clause, then it becomes a straight question of whether you should buy or sell first. The simple answer: Sell. If you buy a new place before unloading your existing one, it’s very possible you could be saddled with multiple mortgages for months or years. It’s just not worth the risk. Sell first, and then if you have to rent for a while before you find the right property to purchase, so be it.

Price aggressively
If you fall a few thousand short of your ideal sale price, it’s not the end of the world. The real thing to worry about, if you’re truly desperate for a new home, is not being able to sell at all. You want to move the merchandise, so price your property for a quick sale, confident that you’ll be able to make up the difference on the buying end.

Crunch the numbers
It might seem foolhardy to take on a sizable mortgage at a precarious time of near-double-digit unemployment. But as always in personal finance, it comes down to the numbers. Mortgage rates remain so historically low – around 4.5 percent for a 30-year fixed loan, according to Bankrate.com – that if those rates compare favorably to your current loan, you could conceivably take out a bigger mortgage but be paying a lower monthly nut. “But remember that with bigger homes come bigger costs,” warns Bixby. “Everything goes up: Property taxes, upkeep, utilities. So when you’re upgrading, always make sure the finances work, first and foremost.”