Who Gets the House in a Divorce If Both Names Are on the Mortgage?

Both names on a mortgage means both spouses share legal responsibility for the debt, but that alone doesn't determine who keeps the house.
How the decision typically gets made
Whether one spouse keeps the house, it's sold, or the couple continues co-owning it temporarily is usually decided as part of the broader divorce settlement, often through negotiation between the spouses' attorneys or, if unresolved, a family court judge's ruling.
Community property versus equitable distribution
In community property states, a home acquired during the marriage is generally split 50/50 in value, regardless of whose name appears on the mortgage. In equitable distribution states, the split is based on what a court considers fair, which can factor in each spouse's income, contributions, and circumstances, and doesn't guarantee an even 50/50 division.
What happens to the mortgage itself
Even after a divorce settlement determines who keeps the house, both spouses typically remain legally responsible for the original mortgage until it's refinanced into one name or paid off entirely, meaning a spouse who "gave up" the house on paper can still be on the hook if the remaining spouse misses payments, unless a refinance formally removes their name.
Setting a deadline for the refinance in the settlement
Because of this ongoing liability risk, many divorce settlements specify a firm deadline, often 60-90 days, by which the spouse keeping the home must complete a refinance to remove the other spouse's name, with specific consequences, such as a forced sale, if that deadline isn't met.

