You’ve spent years with your family in your house. Now that you and your spouse plan on divorcing, you worry about what will happen to the family home. While you don’t want to move your children, dividing the value of the house can be complicated.

When it comes to your divorce, you have three main options. The factors of your divorce will determine which route is best for you.

One spouse keeps the home

Depending on how many assets you have, you may be able to keep your house. You can do this in a couple of different ways.

The first is to give your spouse marital assets equal to their share of the home’s value. If you have other property like real estate or investment accounts, you can give those up. That way, you each get an equal split, and you don’t have to sell the house.

However, this may cause you to lose out on assets that you need as you shift to a one-income household.

Buying out your spouse

The other way you can keep the home is to buy out your spouse. You pay your spouse cash for the value of their share. You can even roll this buyout into a refinance.

With this route, you want to make sure you can afford the mortgage payment on your own.

Both spouses keep the home

If you both agree that you don’t want your children to move, you may wish to remain co-owners. One spouse will move out while the other stays. You can put in your divorce agreement who is responsible for the house payments or how you will share them.

For this route, you must be able to get along with your ex enough to share finances.

Sell the home

For many couples, this is the only option they have. Selling the home is a fair way to find the exact value of the house. It also lets each spouse collect their share of the equity.

If your home is the largest asset you have, splitting it in two can be difficult. And if you raised your children there, you don’t want to make them move.

The choice you make for your home will depend on your ability to pay for the house or work together to keep it.