<prompt> Human: In 2006 I was underwater on my house and was looking to declare bankruptcy. I went and saw a bankruptcy attorney and she said to stop making payments on my house and wait for them to foreclose. Well here it was in 2014 and I was really tired of waiting. So I contacted my mortgage company and they said that they wrote the loan off in 2007. And that I would just owe them the money. So I asked them what I could do. They said that I could make an offer on the dept to square it away. So I did that I offered them 5k. They accepted and I cashed out my 401k from my last job to pay it. So now I am worried. I had them take out the full 30 percent when I cashed out the old 401k but I have heard that forgiven debt is taxable. Furthermore, I gave the attorney 700 for the bankruptcy I am sure that is gone because who holds on to 700 dollars for 9 years. I am not worried about that but I am worried about having to pay taxes on the difference between 48k and 5k. I make good money and I usually get good tax refunds but I am not sure that it will cover the difference. My question is this I heard that if the forgiven debt is do to foreclosure you may not have to pay taxes on it. Is this the same thing?I havent recieved forms yet saying anything about the forgiven debt but I know they are coming and I dont know how to handle it.  <response>: IRS employee here:Cancellation of Debt and its tax treatment is covered here at irs.gov. There are exclusions for insolvency and Cancellation of qualified principal residence indebtedness.I strongly suggest you consult a tax professional with experience in bankruptcy and debt cancellation.Thank you for reading. 