We research all brands listed and may earn a fee from our partners. Research and financial considerations may influence how brands are displayed. Not all brands are included. Learn more.

Wenting Li for Money

For many American families, owning a home is the key to building wealth. When divorce becomes part of the picture, all that can be turned on its head.

Considering that the median value of a home in the U.S. is $247,084, and the average amount of mortgage debt a person has topped $202,000 last year, deciding how to deal with the marital home and its accompanying debt can be a dangerous financial burden for a single person, even for a home that was comfortably affordable for a couple.

To help you make the best decision, Money asked financial and divorce experts to weigh in with everything you need to know about selling the home and finding strategies to keep it.

Sell the house

For many couples simply putting a shared home up for sale may seem like the simplest solution, but remember, that step won’t automatically erase all mortgage headaches or end the need to co-operate with your former spouse. You will still need to agree on a realtor and asking price as well as determine how the continuing mortgage payments will be made. Will you be splitting the expense 50/50? Will the spouse who continues living there make the full payment?

If your home sells for more than the outstanding balance on the mortgage, how will the remaining proceeds be divided between you both after settling the joint debt? End up underwater on the mortgage and you’ll have to decide if you can even afford to sell it and how you’ll pay off the remaining debt if you do.

To avoid disagreements, note the exact details of whatever arrangement you and your ex settle on when it comes to selling the home in your divorce agreement, and create a contingency plan in case the home sits on the market for longer than you hoped, says Warren, N.J. financial planner Chris Schiffer.

In addition, you’ll need to consider how selling the home will impact your taxes. You can each exclude the first $250,000 in capital gains — the amount your home has appreciated in value since you bought it — from your taxable income, if the home was your primary residence and you owned it for more than two years. If you opt to file a joint tax return, you can exclude up to $500,000.

Earnings above that exclusion or on the sale of, say, a vacation property, could stick you with a huge bill from Uncle Sam that you never counted on when arranging your divorce and agreeing to sell.

If you want to keep the home

Divorce upends life as you know it so it makes sense that a majority of the time at least one spouse isn’t ready to part with the marital home and add the stress of moving to their to-do list. And the idea of remaining in a familiar, comfortable home can seem even more compelling when there are children who might have to change schools or leave behind friends.

But many financial advisors and divorce attorneys caution against keeping your old home after a divorce, calling it one of the biggest mistakes you can make during the process.

“I’ve had so many clients say I wish I had listened to you. I shouldn’t have kept the house, I ended up in bankruptcy or foreclosure,” says Tampa, Fla., divorce attorney Joryn Jenkins, founder of Open Palm Law. “People don’t have the same income stream they had when married and they have to lower their standard of living to adjust to this.”

So if you want to remain living in the home you once shared with your ex-spouse, you need to carefully review your budget and weigh whether you can individually afford the mortgage and continue meeting your other financial obligations, such as car loan payments, utility bills, insurance payments, and savings goals, like funding your retirement plan, warns West Chester, Ohio-financial planner Monica Dwyer.

Below are five strategies you can try if you’re determined to keep hold of the marital home.

Refinance the loan

To retain ownership of the home solo, you’ll typically need to first buy out your ex-spouse, says Jenkins.

If you have $50,000 in equity in your current home and you’ve agreed to a 50-50 split of its value, you’ll need to come up with $25,000 to buy out your former spouse, Jenkins says. In return, your ex-spouse should remove their name from the property title, typically using a quitclaim deed, which is a legal document used to transfer ownership of property, so you become the only owner of the home.

If you don’t have the cash, you might need to give up other assets in the divorce negotiations equal to the home’s equity, such as your investment account, 401(k) or IRA, says Schiffer.

And just because your divorce agreement says you’ll own the home and make the mortgage payments doesn’t change the actual terms of the loan, Schiffer adds. Your ex-partner’s name will remain on the mortgage, unless your lender agrees to remove their name, you are able to pay off the outstanding balance or, more realistically, you’re able to refinance it in your name only.

Most judges will require you to refinance so that the ex-spouse is free from that debt and able to secure their own home mortgage, if they chose, says Jenkins.

But qualifying as a single can be challenging as lenders will examine your individual earnings, credit history, and savings to see if they believe you’re capable of repaying the loan. For many divorcees, losing that second income stream (and perhaps a former partner’s solid credit score) can lead to lenders rejecting a loan application.

You can ask a friend or family member to act as co-signer, if you’re struggling to qualify, but know it is a big favor as lenders can then come after them for payments if you fall down on the bills. Alimony and child support payments can also be counted as income when qualifying for a refinance, if your divorcee agreement states that you’ll be receiving such payments for the next three years or more and your former spouse has made such payments on time for at least the past six months.

If you are approved, the good news is mortgage rates are near historic lows so you likely won’t end up paying more on the home thanks to your divorce.

Recast the mortgage

If refinancing is not possible, but you expect to receive a cash windfall, maybe from a tax refund, an inheritance, or alimony from the ex’s future bonuses, you can ask the mortgage lender to apply that sum to your principal payment and then recast the mortgage.

This means the lender will reamortize the loan to reflect the large, lump-sum payment you’ve made.

“It will keep the term the same but lower the ongoing monthly required payment,” says Portland, Ore., financial planner Rob Greenman. “Usually this is a much lower cost way of freeing up monthly cash flow compared to refinancing.”

And a lower monthly payment may be all you need to successfully afford to turn your marital home into your single home.

Continue to co-own the home

Unable to refinance or recast the mortgage? Handle monthly payments together as you did before. This will, of course, require a high degree of trust in your former spouse, but for some couples it can be the right move in the short-term if they are unable to find a buyer or if they prefer to keep their children in the same home until, say, after high-school graduation.

Since both your names will remain on the home and on the mortgage, you’ll both be liable for making payments. Should your ex-spouse stop contributing their share, you could be on the hook for the full bill, and, if you can’t pay, that could lead to more debt, foreclosure, bankruptcy or poor credit.

In your divorce agreement, be sure to set a clear timeline for when you will sell the house together and who will handle mortgage payments, insurance costs, and upkeep in the interim.

Raid retirement savings

While not a desirable solution, pulling from savings can help you keep hold of the home. By obtaining a court ordered qualified domestic relations order or QDRO, you can gain access to a portion of your ex-spouse’s employee retirement plan assets, like a 401(k), says Charlotte, N.C. financial planner Geoffrey H. Owen.

Such funds are not subject to the 10% early withdrawal penalty for people under age 59.5, meaning you’ll save more on taxes by using this money to secure your home than you would by tapping other accounts you may have. Alternatively, if you have Roth IRA savings, you could pull an amount equal to what you’ve contributed tax and penalty free, again making it a smarter way to meet your mortgage payment needs.

Raise some additional income

If you’re really determined to keep the home, but cannot pull from savings or refinance, it might be worth brainstorming ways you can earn income from it to help cover the mortgage and upkeep costs.

Renting out the whole home while you’re on vacation or just a bedroom or two when in town could make you hundreds a night. Airbnb hosts, for instance, make, on average $924 a month, according to research conducted by lender Earnest.

But bear in mind, if you really can’t afford the place on your salary alone, you should see it as a sign to step away from the home.

“If you can’t refinance in your own name, keeping the home isn’t a wise decision,” says Dwyer. “It is better to restructure your life in a way that makes sense in the long run, rather than pillage your other financial accounts.”

More from Money:

30-Year Mortgage Rates Are Back Near Record Lows — For Some Borrowers

Here's Exactly What Homeowners Insurance Covers — and What It Doesn't

Here's How to Make a Perfect Resume — and a Free Template You Can Use