Skip to main content
All Articles
Financial Guide
6 min read August 25, 2026
Verified August 2026

Foreclosure and Cancelled Debt: How to Calculate Your Exact Tax Bill Before the IRS Does

Most homeowners who lose a property to foreclosure discover a second financial hit months later: a surprise tax bill on cancelled debt. The IRS treats forgiven mortgage balances as ordinary income, and the math is unforgiving. Knowing the numbers before you file determines whether you owe thousands or nothing at all.

Foreclosure and Cancelled Debt: How to Calculate Your Exact Tax Bill Before the IRS Does

Key Takeaways

  • The IRS taxes cancelled mortgage debt as ordinary income under IRC Section 61, meaning a $90,000 deficiency can generate a $19,800 federal tax bill at the 22% bracket.
  • Failing to report a Form 1099-C triggers automatic IRS matching notices and late-payment penalties of 0.5% per month on the unpaid balance.
  • Run two separate calculations for every foreclosure: the cancellation of debt income and the capital gain or loss on the deemed sale of the property.
  • Tool: Model your foreclosure tax liability with the CalcMoney Income Tax Calculator →

File With a Name You Trust

H&R Block pairs expert help with software that finds every deduction, backed by a Max Refund Guarantee.

Interactive Calculator
Full screen
Loading Calculator
calcmoney.io/calculatorsOpen full screen

A Foreclosure Creates Two Separate Taxable Events

A foreclosure produces two distinct federal tax exposures, not one. First, the IRS treats the foreclosure as a deemed sale of the property, which can generate a capital gain or loss. Second, if the lender cancels any remaining loan balance after the sale proceeds fall short, the IRS treats that forgiven amount as ordinary income.

Conflating these two calculations is the most expensive mistake a foreclosed homeowner makes. They operate under different rules, different tax rates, and different exclusion tests. You must run both.

The Deemed Sale Calculation

The IRS calculates the gain or loss on the foreclosure sale using the property's "amount realized." For a recourse loan, that figure equals the property's fair market value at the time of foreclosure. For a non-recourse loan, it equals the full outstanding loan balance.

The formula: Gain or Loss = Amount Realized - Adjusted Basis

Adjusted basis starts at your original purchase price and incorporates capital improvements, depreciation taken (for rental properties), and certain closing costs. A homeowner who bought a property for $320,000, added $25,000 in qualifying improvements, and has an adjusted basis of $345,000 compares that against the amount realized.

The Cancellation of Debt Income Calculation

When a lender forgives the remaining balance after a foreclosure sale, that amount is cancelled debt income (COD income). The lender reports it on IRS Form 1099-C. The IRS adds that amount to your gross income for the tax year the cancellation occurs.

The formula: COD Income = Outstanding Loan Balance - Amount Realized by the Lender

This income stacks on top of your wages and other ordinary income. It is taxed at your marginal federal rate, not the preferential capital gains rate.

Worked Example 1: Recourse Mortgage Foreclosure

A homeowner in Phoenix carries a $410,000 recourse mortgage. The bank forecloses and sells the home for $310,000. The homeowner's adjusted basis is $340,000.

Step 1: The Deemed Sale Amount realized equals the fair market value at foreclosure: $310,000. Gain or Loss = $310,000 - $340,000 = ($30,000 loss)

A personal-use residence loss is not deductible. It disappears. But the calculation still matters because it establishes what income remains for Step 2.

Step 2: COD Income The lender is owed $410,000. The sale produced $310,000. COD Income = $410,000 - $310,000 = $100,000

This homeowner receives a Form 1099-C for $100,000 and must report it as ordinary income unless an exclusion applies. At a 24% marginal federal rate, that is a $24,000 federal tax liability from a home they no longer own.

Worked Example 2: Non-Recourse Mortgage Foreclosure

A homeowner in Texas carries a $375,000 non-recourse mortgage on a property with a current fair market value of $290,000. The adjusted basis is $310,000.

Step 1: The Deemed Sale For a non-recourse loan, the amount realized equals the full outstanding loan balance: $375,000. Gain or Loss = $375,000 - $310,000 = $65,000 gain

If this is a primary residence and the homeowner qualifies under IRC Section 121 (owned and lived in the home for at least 2 of the last 5 years), the first $250,000 of gain ($500,000 for married filing jointly) is excluded. This gain is fully excluded. No tax owed on the deemed sale.

Step 2: COD Income For a non-recourse loan, there is no COD income. The entire outstanding balance was already included in the amount realized. COD Income = $0

The non-recourse structure produces zero federal tax liability in this scenario. The loan type alone determines whether the homeowner faces a five-figure tax bill or nothing.

Three Exclusions That Can Eliminate the COD Income

COD income is not automatically taxable. Three exclusions wipe out the liability for many foreclosed homeowners.

Insolvency Exclusion (IRC Section 108(a)(1)(B)): If your total liabilities exceeded your total assets immediately before the cancellation, you exclude COD income up to the amount of that insolvency. A homeowner with $450,000 in total liabilities and $380,000 in total assets was insolvent by $70,000. That homeowner excludes the first $70,000 of COD income. Any amount above $70,000 remains taxable. File IRS Form 982 to claim this exclusion.

Qualified Principal Residence Indebtedness (QPRI) Exclusion: This exclusion, originally created by the Mortgage Forgiveness Debt Relief Act of 2007, has been extended multiple times by Congress. When active, it excludes up to $750,000 ($375,000 married filing separately) of cancelled debt on a primary residence. Confirm the current status for the applicable tax year before filing.

Bankruptcy Exclusion (IRC Section 108(a)(1)(A)): Debt cancelled in a Title 11 bankruptcy proceeding is fully excluded from gross income. The exclusion is unlimited.

The Basis Reduction Rule After an Exclusion

Claiming an exclusion under IRC Section 108 is not free. The IRS requires you to reduce certain tax attributes by the excluded amount. Attribute reduction is applied in a specific order: net operating losses, general business credits, minimum tax credits, capital loss carryovers, and then the basis of property.

A homeowner who excludes $80,000 of COD income under the insolvency exclusion and holds other real estate must reduce the basis of that property by $80,000. This creates a larger taxable gain when the other property eventually sells. The exclusion defers tax, not eliminates it.

What to Do Before You File

Pull the Form 1099-C the lender issues. Verify the cancellation amount and the date of identifiable event. Cross-reference those figures against your own loan payoff statements and closing disclosures from the foreclosure.

Determine your loan type (recourse vs. non-recourse) before performing any calculation. Your state law governs this. California, for example, prohibits deficiency judgments on purchase money loans for residential properties, effectively making many California mortgages non-recourse.

Calculate your insolvency ratio as of the day before the cancellation date on the 1099-C, not your current financial position. Use the CalcMoney Income Tax Calculator to model the income impact once you have confirmed the taxable COD amount.

Model Your Numbers Before the IRS Models Them for You

The IRS receives a copy of every Form 1099-C the moment your lender files it. If you file without accounting for the cancelled debt, the IRS Automated Underreporter program flags the discrepancy and issues a CP2000 notice. That notice arrives with interest charges and accuracy penalties.

Running the numbers before you file costs nothing. Ignoring them costs 20% of the understated tax as an accuracy-related penalty under IRC Section 6662, plus interest compounding from the original due date.

Use the CalcMoney Income Tax Calculator to input your total income including the COD amount, apply your filing status, and calculate the marginal rate at which the additional income hits. Then test the insolvency exclusion scenarios to determine how much of the COD income you can legally shelter. The difference between an informed filing and an uninformed one can exceed $20,000 in a single tax year.

You Might Also Like

Results are estimates for informational purposes only. Consult a licensed financial professional before making financial decisions.

Featured Partner
FIDELITY

Put These Numbers to Work

Open a Fidelity brokerage account. $0 commissions, no account minimums, fractional shares available.

Run the Numbers

Affiliated. We may earn a commission.


One money insight per week.

Calculator deep-dives, rate alerts, and financial analysis written for real decisions. Unsubscribe anytime.

1 email/week. No spam. Unsubscribe in one click.

Free Tools

Run the actual numbers

Stop estimating. Plug in your numbers and get a precise answer in seconds. Free, no signup required.

Open Free Calculators