The unfortunate truth is that most people filing bankruptcy are well under this $21,625 number due to depressed home values and/or multiple refinancings of their home. Many people filing bankruptcy have refinanced their homes over and over in order to lower their monthly payments, which prevents them from accumulating any home equity. I have had clients who have been in their houses for 40 years or more yet have no home equity because of reasons like these.
When should you worry about losing your house in bankruptcy? Pretty much only when you put a very large payment on the house or have been paying on it for a long time. Furthermore, if you've got a good bankruptcy attorney then what happens in court shouldn't be a surprise: I analyze all of my clients' assets carefully to make sure they aren't going to lose anything. If I think there is a potential issue I warn you of it, tell you what I think will happen, and have you sign a disclaimer that shows you understand the risks involved. Sometimes in borderline cases it is necessary to hire an appraiser ahead of time to find out just how much your house is worth so we don't have to worry about any dispute over its true value.
In the rare case when your house is an issue, you have a couple options. You can let the house go, attempt to negotiate a payment plan with the bankruptcy trustee (easier said than done), or give up on filing bankruptcy. You also might be able to do a Chapter 13 bankruptcy, a 3-to-5-year payment plan that lets you keep all your property and results in a full elimination of most debts. However, many people who might like to do a Chapter 13 bankruptcy are unable to afford the monthly payments or do not qualify for other reasons. Your attorney should work closely with you to ensure you know all your options and find the one best for you.