When you sell your home shortly before or after filing a Chapter 7 bankruptcy, you can only be sure that you'll be able to protect the proceeds if your state provides a specific exemption (law) that allows you to do so—or if you use the proceeds to purchase another property eligible for a homestead exemption. Otherwise, you'll want to wait to sell the house until after your bankruptcy closes.
In a Chapter 7 case, in exchange for forgiveness of your debt, you have to be willing to give up property (it will get sold for the benefit of your creditors). You won't be left destitute, however. You're allowed to protect assets you'll need for your fresh financial start, such as a modest car, clothing, household furnishings, and, in most states, some equity in your home. In fact, many people can keep everything that they own. Even so, individuals who have a significant amount of home equity can run into problems protecting it all. (Another solution might be to consider filing for Chapter 13 bankruptcy.)
Ultimately, your state decides the type and value of the property you can keep, or "exempt." You'll find out what property is exempt by reviewing your state's exemption statutes. Property that isn't protected is called "nonexempt property." The court appoints a bankruptcy trustee to sell any nonexempt property and to distribute the proceeds to your creditors.
(Learn more by reading Bankruptcy Exemptions: An Overview.)
If you sell your home just before or just after filing a Chapter 7 bankruptcy case, you must first be sure that an exemption protects the equity. Almost every system includes a homestead exemption (the applicable type), but the limits vary widely. Some states allow you to protect only $10,000 or less. In another, you can protect upwards of $500,000.
Many exemptions also safeguard the proceeds from a sale. Ordinarily, this protection extends for a limited period to give you a chance to reinvest the proceeds into another home purchase. The time can be as brief as six months or as long as two years.
Also, you might live in a state wherein the courts have concluded that the Chapter 7 trustee cannot collect the sales proceeds even if the state law exemption period has expired. But, if you're relying on this type of law (called "case law") it's important to make certain that your interpretation is correct. If you have significant equity to protect, you'll want to meet with a local bankruptcy attorney familiar with the practices of your court. Any consultation fee will be minimal compared to what you could stand to lose and well worth the accompanying peace of mind.
You can learn more about how exemptions protect your home at The Homestead Exemption in Bankruptcy.
Virtually all courts agree that the bankruptcy trustee cannot take the proceeds if you sell the house after the bankruptcy case closes. Of course, to keep the house in bankruptcy, you'll need to be able to exempt the equity.
If you're lucky enough to reside in a state that allows you to exempt your entire homestead, you might realize enough money from the sale to purchase a new house outright with no financing. However, most debtors won't be so lucky. The amount of money you're holding might be enough for a down payment on a new home, but that won't help much if the bankruptcy damages your credit and you're not able to get a mortgage.
It usually takes two years after your bankruptcy discharge before you can qualify for an FHA mortgage (if you can demonstrate that you suffered a qualifying hardship) and even longer for conventional mortgages. Because lending guidelines can change, it's a good idea to meet with a mortgage specialist to discuss your particular case.
Each state's exemption laws vary significantly, and courts have come to different conclusions when they apply exemption laws to proceeds. If you have sold a house and you plan to file for bankruptcy, or if you intend to sell soon, a qualified consumer bankruptcy attorney can tell you how a bankruptcy court will likely treat the sales proceeds in your jurisdiction.