Income to the IRS
The Internal Revenue Service considers debt forgiven in a mortgage foreclosure to be income. If your mortgage was for $100. for example, and $15, was still unpaid at the end of the foreclosure process, the IRS treats the remaining balance as the equivalent of the creditor sending you a $15, check to cover the proceeds and close the account. As such, you record that as part of your gross income. You then have to pay taxes on it based on the amount determined by your tax bracket, unless you can prove to the IRS that you fall into one of the groups exempt from this requirement.
Older Forgiven Debt
If your foreclosure occurred in a prior tax year and you're filing late or amending an old return, you may not have to worry about forgiven balances. The Mortgage Forgiveness Debt Relief Act of 2007 allowed most taxpayers to avoid declaring the amount of cancelled debt as income on their taxes. However, that expired after the 2013 calendar year. Unless Congress elects to renew or reinstate the program, those who lost their property after 2013 will have to rely on a different approach if they hope to avoid
Bankruptcy and Insolvency
Cancelled mortgage debt isn’t taxable if it was resolved due to bankruptcy. If your debt was cancelled as the result of bankruptcy, you don't include that amount in your gross income for the year. You also aren't taxed on the forgiven debt if you can demonstrate that you were financially insolvent at the time of foreclosure -- but only by the amount of your personal deficit. For example, if you can show that you had $80, in assets and $90, in liabilities at the time you had $20, in mortgage funds forgiven as the result of the foreclosure, you'd have to count $10, of that settlement as gross income and pay taxes on it.
Selling at a Profit
A foreclosure doesn't always result in a loss. Foreclosures are treated like an ordinary sale for tax purposes, so if the proceeds net you more than you owe on the mortgage, that profit becomes subject to taxation as a taxable gain. If the home is your principal residence, however, and you've lived there for at least two of the past five years preceding the foreclosure, exclusions likely will limit some of all of that amount from taxation.