When you can’t pay off your debt, you may settle with the creditor for less than you owe. This can take a few forms, including short sales, foreclosures, or just agreeing with a credit card company to pay less than you owe if they stop chasing you for the balance.

No matter the form it takes, if you have cancellation of debt for less than the amount you owe, the amount of the canceled debt is considered income and may be taxable. I say “may” because there are exceptions and exclusions to this rule.

Here’s what you need to know. The lender or business owed the debt will sometimes issue Form 1099-C, Cancellation of Debt, to you for the forgiven amount. The IRS also gets a copy of Form 1099-C. The IRS will expect to see that amount reported on your tax return.

But what if you qualify for an exclusion or an exception? Even if you eligible for an exception or exclusion, you may still receive a form 1099-C. This is because the creditor doesn’t know whether you might have an exception or an exclusion: their responsibility is simply to report the details, including the amount of cancellation of debt and the date of cancellation. However, if the person who is issuing the form 1099-C has reason to know that the discharge of debt would not be reportable (such as, for example, a qualifying bankruptcy), then the form 1099-C shouldn’t be issued.

The most common exclusions include bankruptcy, insolvency, and qualified principal residence indebtedness.

If your debt was canceled as part of a Title 11 bankruptcy (includes Chapters 7, 11, and 13), it’s not includible in your income. To report the exclusion, attach https://www.irs.gov/pub/irs-pdf/f982.pdf" rel="nofollow noopener noreferrer" data-ga-track="ExternalLink:https://www.irs.gov/pub/irs-pdf/f982.pdf" aria-label="Form 982" style="box-sizing: border-box; color: rgb(0, 56, 145); cursor: pointer; background-color: transparent; text-decoration: none;">Form 982, Reduction of Tax Attributes Due to Discharge of Indebtedness (and Section 1082 Basis Adjustment), (downloads as a PDF) to your tax return and check the box at Part I, line 1a of the form. Enter the amount of canceled debt as a result of the bankruptcy case on line 2. You may also have to fill out part II of the form.

If you were insolvent just before your debt was canceled, you can exclude the debt from income. To read more click here