Ending your marriage can be costly in many ways — socially, emotionally and financially. If you are facing divorce, the future may suddenly seem full of uncertainty, and you need answers. Some of your biggest questions likely have to do with your home.

Your house is likely your most valuable asset, especially in light of California’s rising home prices. Whether you want to remain in the home, keep it as a rental or sell it, what courts decide about the house can have a huge impact on your future. Courts consider many factors when dividing property. Here are two factors that may affect who gets the home in your divorce.

Title

If both your names are on the title, identifying you as co-owners, you may have an easier time claiming half ownership. That should entitle you to buy your spouse out of his or her half if you want to remain in the home. If you prefer to leave, your spouse should buy you out of your half.

Purchase details

Even if your name is not on the deed, a court may view you as an owner. California is a community property state, so courts are likely to consider the home marital property if you  purchased it during the marriage.

If your spouse owned the house prior to marriage, a judge may deem it separate property. However, you may still have partial ownership. This is especially likely if you and your spouse used marital funds to pay the mortgage. You may also claim part ownership if you invested money earned during the marriage to add to the value of the home.

Property division can be complex, but you may not have to lose your home. Educate yourself and protect your financial interests.