If you’re a homeowner who’s divorcing, what to do with the family home can be one of the biggest and most emotional decisions you’re likely to make during the process. If you have children, it may be particularly important for the parent who’ll have the kids most of the time to remain in the home to minimize the changes required of the kids. Staying put can mean they’re able to remain in their schools, stay close with their friends and participate in their extracurricular groups.

If you and your spouse own your home together and you want to remain in it, you’ll likely need to buy out their share of the home’s equity. If this is your goal, the first thing you need to do is determine the buyout amount. Then you can determine whether you can afford a buyout.

If the two of you can agree on the home’s value, you’re one step ahead. If you can’t, you’ll need to call in a professional appraiser. If you can’t agree on an appraiser or the appraisal, you may have to deal with dueling appraisers and perhaps a final decision by a judge.

Once you’ve agreed upon the buyout amount, you must determine whether you can qualify for a mortgage based on your own income and assets. Even if you qualify, it’s essential to decide whether you want to spend a significant portion of your monthly income on mortgage payments. Remember that if you become the sole owner of the home, you’ll also be responsible for property taxes, insurance, maintenance and other expenses.

If keeping the home is a priority, you may be able to negotiate a lower buyout amount with your spouse in exchange for less alimony or letting them keep other assets as you divide up property. Some couples agree to a gradual buyout. However, that involves both spouses staying on the mortgage. Do you want to remain financially tied to your spouse after your divorce? If they’ve agreed to help with the mortgage payments, you’ll have to trust that they’ll do that, since your good credit depends on it.

If you want to pursue a buyout of your home, it’s wise to consult real estate and financial professionals as well as your family law attorney. They can all offer valuable guidance as you determine what’s best for you and your children.