IRS Section 108 lets you exclude canceled debt from your taxable income in a handful of specific situations: debt discharged in bankruptcy, debt forgiven while you were insolvent, certain qualified farm debt, and qualified real property business debt. A separate exclusion for mortgage debt on a primary home applied for years but has now largely expired. Every exclusion except bankruptcy is capped, and most require you to give up an equal amount of future tax benefits in exchange.
Why Canceled Debt Is Taxed at All
Section 61 of the Internal Revenue Code defines gross income broadly and lists discharge of indebtedness as a specific category.1Office of the Law Revision Counsel. 26 USC 61 Gross Income Defined When a creditor forgives what you owe, the IRS treats that forgiven balance as money you effectively received, and it’s taxed as ordinary income.
Common triggers: a lender forgives a mortgage deficiency after foreclosure or short sale, a bank reduces principal in a loan modification, or a credit card issuer settles a $10,000 balance for $3,000 and writes off the $7,000 difference. Any creditor canceling $600 or more must file Form 1099-C with the IRS and send you a copy.2Internal Revenue Service. About Form 1099-C, Cancellation of Debt You still owe tax on the canceled amount even if the form never reaches you, unless a Section 108 exclusion or another provision keeps it out of income.
Bankruptcy Discharge: The Broadest Exclusion
If a Title 11 bankruptcy court orders or approves the discharge of your debt, the entire canceled amount is excluded from income with no dollar cap.3Office of the Law Revision Counsel. 26 USC 108 Income From Discharge of Indebtedness This applies to Chapter 7, 11, and 13 cases. It’s the only Section 108 exclusion with no ceiling.
Two rules govern its use. You must be a debtor under the jurisdiction of the bankruptcy court when the discharge happens; debt forgiven outside the formal case doesn’t qualify. And the bankruptcy exclusion takes priority over every other Section 108 category. If you’re in bankruptcy, you use this exclusion rather than claiming insolvency or anything else.
The Insolvency Exclusion
If you’re not in bankruptcy but your total liabilities exceed the fair market value of everything you own, you’re insolvent under Section 108. You can exclude COD income up to the amount by which you were insolvent immediately before the debt was canceled.3Office of the Law Revision Counsel. 26 USC 108 Income From Discharge of Indebtedness The exclusion is capped at your insolvency amount, not the full canceled debt.
Say a creditor forgives $100,000, and just before that moment your liabilities exceeded your assets by $60,000. You exclude $60,000 and pay tax on the remaining $40,000. If your insolvency had equaled or exceeded $100,000, the whole cancellation would be excluded.
Getting the Insolvency Calculation Right
This is where most insolvency claims fall apart. The IRS makes you count every asset at fair market value, including items you might think shouldn’t count. Retirement accounts, pension interests, and property that creditors legally can’t reach all count as assets for this test.4Internal Revenue Service. Publication 4681 (2025), Canceled Debts, Foreclosures, Repossessions, and Abandonments A 401(k) that’s protected from creditors in bankruptcy still counts here.
On the liability side, include the full amount of any debt you’re personally liable for (recourse debt). For nonrecourse debt, where the lender’s only remedy is the collateral, include the debt only up to the collateral’s fair market value, plus any forgiven amount that exceeds that value.4Internal Revenue Service. Publication 4681 (2025), Canceled Debts, Foreclosures, Repossessions, and Abandonments Real property usually needs a formal appraisal. Document everything, because the IRS can and does challenge insolvency calculations.
Qualified Principal Residence Indebtedness (Now Largely Expired)
For years, one of the most-used exclusions covered homeowners whose mortgage debt was forgiven in a foreclosure, short sale, or modification. You could exclude up to $2 million of forgiven acquisition debt on your primary home ($1 million if married filing separately). Only debt used to buy, build, or substantially improve the home qualified; cash-out refinance proceeds used for other purposes did not.
This exclusion has expired for most borrowers. The statute now covers only debt discharged before January 1, 2026, or debt discharged under a written arrangement entered into before that date.3Office of the Law Revision Counsel. 26 USC 108 Income From Discharge of Indebtedness If a lender forgives mortgage debt in 2026 with no pre-2026 written agreement, this exclusion is off the table. Legislation to make it permanent has been introduced but not enacted.
Homeowners without this exclusion aren’t out of options. The insolvency exclusion still applies if total debts exceeded total assets right before the forgiveness, and that’s a realistic claim for many borrowers coming out of foreclosure. It just requires the fuller documentation described above.
Qualified Real Property Business Indebtedness
Commercial real estate owners can elect to exclude COD income on qualified real property business indebtedness (QRPBI). The debt must have been taken on in connection with real property used in a trade or business and secured by that property. C corporations can’t use it, and residential rental property held by an individual generally doesn’t qualify unless it rises to a trade or business.3Office of the Law Revision Counsel. 26 USC 108 Income From Discharge of Indebtedness
Two caps apply. You can’t exclude more than the outstanding loan balance minus the property’s fair market value (after accounting for other debt secured by the same property). And the total exclusion can’t exceed the aggregate adjusted basis of your depreciable real property, reduced by current-year depreciation and any other basis reductions Section 108 requires.5eCFR. 26 CFR 1.108-6 – Limitations on the Exclusion of Income From the Discharge of Qualified Real Property Business Indebtedness Attribute reduction here is limited: you reduce only the basis of depreciable real property rather than running the full attribute list.
Qualified Farm Indebtedness
Farmers get their own exclusion with three requirements:3Office of the Law Revision Counsel. 26 USC 108 Income From Discharge of Indebtedness
- The debt was incurred directly in connection with operating a farming business.
- At least 50% of your gross receipts over the three preceding tax years came from farming.
- The debt was canceled by a qualified person: a bank, credit union, or any federal, state, or local government agency.
The exclusion is capped at the sum of your adjusted tax attributes plus the adjusted basis of qualified property (assets used in a trade or business or held for income production) as of the start of the following tax year. If you also qualify for the insolvency exclusion, insolvency is applied first, and the farm debt exclusion picks up whatever COD income remains, up to its own cap.
Student Loan Forgiveness
Student loans sit somewhat apart. Under the American Rescue Plan Act, all federal student loan forgiveness was temporarily excluded from taxable income, but that provision expired on December 31, 2025. Balances forgiven under income-driven repayment plans in 2026 and beyond are generally taxable as COD income.6Taxpayer Advocate Service. What to Know About Student Loan Forgiveness and Your Taxes
Several forgiveness categories remain permanently tax-free under separate code provisions:
- Public Service Loan Forgiveness after 120 qualifying payments while working for a government or nonprofit employer.
- Teacher Loan Forgiveness of up to $17,500 for qualifying teachers in low-income schools.
- Loans discharged because the borrower died or became totally and permanently disabled.
If your loans are forgiven in 2026 under an income-driven plan and no permanent exclusion fits, the Section 108 insolvency exclusion may still apply. If total debts exceeded total assets at the moment before forgiveness, you can exclude the canceled amount up to your insolvency by filing Form 982.6Taxpayer Advocate Service. What to Know About Student Loan Forgiveness and Your Taxes For borrowers who spent decades in income-driven repayment without building assets, insolvency at discharge is more common than people expect.
Situations That Never Produce COD Income
Not every canceled debt needs a Section 108 exclusion, because some forgiven debts don’t count as income to begin with.
Debt Forgiven as a Gift or Bequest
When someone forgives a debt as a genuine gift, or a will relieves you of a loan obligation, the canceled amount isn’t taxable.4Internal Revenue Service. Publication 4681 (2025), Canceled Debts, Foreclosures, Repossessions, and Abandonments A parent forgiving a child’s loan out of generosity qualifies. A commercial creditor writing off a business debt and labeling it a gift does not. The IRS looks at the intent and relationship of the parties.
Debt That Would Have Been Deductible
Section 108(e)(2) says that if paying the debt would have given you a tax deduction, canceling it produces no income.3Office of the Law Revision Counsel. 26 USC 108 Income From Discharge of Indebtedness A business owes $5,000 to a vendor for deductible supplies, the vendor accepts $3,000, and the forgiven $2,000 would have been a deductible expense if paid. No taxable income results. The rule stops the tax code from taxing you on money you would have deducted anyway.
Seller Purchase-Price Reductions
When a seller reduces the amount you owe on a purchase, Section 108(e)(5) treats the reduction as an adjustment to the purchase price rather than canceled debt. This applies when the debt arose from the original purchase, the reduction happens outside bankruptcy, and you’re solvent at the time.3Office of the Law Revision Counsel. 26 USC 108 Income From Discharge of Indebtedness Instead of reporting income, you reduce the tax basis of the property you bought. It shows up most in real estate deals where a developer cuts the remaining balance owed by a buyer.
The Cost: Reducing Your Tax Attributes
The bankruptcy, insolvency, and farm exclusions aren’t a permanent free pass. They’re closer to a deferral. In exchange for excluding COD income now, you have to reduce your tax attributes: items that would otherwise cut your future taxes. The statute sets a mandatory order, and you apply the excluded amount in this sequence:7eCFR. 26 CFR 1.108-7 – Reduction of Attributes
- Net operating losses (NOLs), reduced dollar for dollar, starting with the current year’s loss and then any carryovers.
- General business credits, reduced at 33⅓ cents per dollar of excluded income (credits offset tax directly, so the ratio adjusts for that).
- Minimum tax credits, also at the 33⅓ cents rate.
- Capital loss carryovers, dollar for dollar.
- Basis of property, both depreciable and non-depreciable, held at the start of the next tax year, dollar for dollar.
- Passive activity loss and credit carryovers, dollar for dollar.
- Foreign tax credit carryovers, at the 33⅓ cents rate.
For individuals without many of the earlier attributes, the basis reduction is usually the one that bites. When a property’s basis drops, you recognize more gain when you sell it, and depreciable property yields smaller depreciation deductions right away. The tax you avoided now surfaces later.
Electing to Reduce Depreciable Basis First
The statute gives you one strategic lever. You can elect to reduce the basis of depreciable property before touching any other attribute. This makes sense when you have valuable NOLs you expect to use soon against high-bracket income, and you’d rather give up depreciation deductions than the loss carryovers. Make the election on Form 982 filed with your return for the discharge year.8Internal Revenue Service. Instructions for Form 982 Once made, it’s generally irrevocable.
Attribute reduction under the QRPBI exclusion works differently: you reduce only the basis of your depreciable real property, not the full list. The principal residence exclusion, when it was still broadly available, only required reducing the basis of the home itself.
How to Claim the Exclusion
Claiming any Section 108 exclusion means filing Form 982, Reduction of Tax Attributes Due to Discharge of Indebtedness, with your federal return for the year of discharge.8Internal Revenue Service. Instructions for Form 982 Part I identifies which exclusion applies; Part II records the attribute reductions. The COD income from the 1099-C shows up on your Form 1040, and the Form 982 creates the offsetting exclusion.
For an insolvency claim, keep detailed records of every asset and liability valued as of the moment before the discharge. Publication 4681 includes an insolvency worksheet that walks through the math. You don’t file it, but complete it and hold on to it, because if the IRS pushes back, that’s your documentation.4Internal Revenue Service. Publication 4681 (2025), Canceled Debts, Foreclosures, Repossessions, and Abandonments
When the 1099-C Is Wrong
Sometimes you’ll get a 1099-C for a debt you don’t owe or in an amount that’s off. Ask the creditor to correct it. If they won’t, report the amount shown and attach a written explanation to your return stating why the figure is wrong.9Taxpayer Advocate Service. I Have a Cancellation of Debt or Form 1099-C You can also receive a 1099-C while the creditor is still actively trying to collect, which doesn’t necessarily mean the debt was truly canceled. Verify with the creditor before treating anything as COD income.
One more boundary. Not every state follows the federal Section 108 exclusions. Some conform fully, some selectively, and some have their own rules. Check your state’s treatment before assuming a federal exclusion carries through to your state return.