So who gets the house when you divorce in California community property and the house? The short answer is that it depends on when you bought it and how you paid for it.

California is a community property state. That means most things you and your spouse acquire during the marriage belong equally to both of you. The family home is usually the biggest asset in that pool. If you bought the house after you got married, and you used money earned during the marriage, the house is community property. Each of you owns half.
But there is a catch. If one of you owned the house before the wedding, or if you received it as a gift or inheritance during the marriage, that part is separate property. The tricky part comes when you mix separate money with community money. For example, you might have owned the house before marriage but used marital income to make mortgage payments. Or your spouse might have put money from an inheritance into a down payment. In those cases the house becomes a mix of separate and community property, and the math can get complicated.
The date of separation matters a lot. In California, the marriage ends legally on the date of separation, not the date the divorce is final. Any income you earn or debt you take on after that date is your separate property. So if you move out of the house on June first, and your spouse keeps living there and making mortgage payments with post-separation income, those payments might be their separate contribution. The house itself is still community property, but the repayment of the mortgage gets traced.
Then there is the deed. The deed says who owns the house on paper. If both names are on the deed, both of you have ownership rights. But the deed does not control the division of equity in a divorce. The family court can order a sale or a buyout regardless of whose name is on the deed. If only one name is on the deed, the other spouse may still have a community property interest in the house if community funds were used to buy or improve it.
The mortgage is a separate question. The lender does not care about your divorce. Both of you remain liable for the loan if both signed the promissory note. You cannot just remove a spouse from the mortgage without refinancing. That means the spouse who keeps the house usually has to qualify for a new loan on their own income.
So what are your options? You can sell the house and split the net proceeds. You can have one spouse buy out the other's share of the equity. Or you can keep the house jointly for a set period, often until the kids grow up, and sell it later. Each option has tax consequences and practical problems.
A local family law attorney can explain the rules for your specific situation. A certified public accountant can help with the tax side. And a HUD-approved housing counselor in Sacramento County can walk you through the mortgage options. Do not try to figure out the equity split on your own without professional advice.
More notes on this topic are at California community property and the house.