Are There Tax Consequences When an Investment Property Is Foreclosed?

Updated July 9, 2026 6 min read

Foreclosure on an investment property feels, understandably, like a financial loss from start to finish. The tax code, however, treats it as a sale, which means it’s entirely possible to walk away from a foreclosed property and still owe tax on a gain.

The short answer

For tax purposes, a foreclosure is generally treated as a deemed sale of the property, with the sale price considered to be either the amount of debt canceled or the property’s fair market value, depending on whether the loan was recourse or non-recourse. This deemed sale can produce a taxable capital gain or a deductible loss, calculated the same general way a regular sale would be, and it’s a separate calculation from any cancellation-of-debt income that might also apply.

Why a foreclosure can create a gain at all

It seems counterintuitive that losing a property to foreclosure could generate taxable income, but the mechanics make more sense once the deemed-sale framing is clear. If the property’s outstanding loan balance is higher than what was originally paid for it, plus any tax basis adjustments, the deemed sale amount used in the calculation can exceed the seller’s basis in the property, producing a gain even though no cash actually changed hands. This is especially common with older properties that have appreciated over years of ownership, or properties where significant depreciation has been claimed, since depreciation reduces basis and can turn what feels like a loss into a taxable gain.

Recourse versus non-recourse debt

Whether a loan is recourse (the lender can pursue the borrower personally for any shortfall) or non-recourse (the lender’s only remedy is the property itself) generally determines how the deemed sale price is calculated:

This distinction is a major reason two foreclosures involving similar properties and similar loan balances can result in very different tax outcomes.

How this differs from a short sale

Foreclosure is a lender-initiated process, whereas a short sale involves the borrower proactively negotiating a sale below the loan balance with lender approval. Both can produce similar categories of tax consequences, a capital gain or loss plus potential cancellation-of-debt income, but the timing, documentation, and the borrower’s level of control over the outcome differ substantially, which is why they’re generally worth thinking through as related but distinct scenarios.

What can offset or complicate the outcome

The bottom line

A foreclosure on an investment property is treated by the tax code as a sale, not simply a loss, which means it can generate a taxable gain even when the owner receives no proceeds and loses the property entirely. Because the rules around recourse versus non-recourse debt, basis calculations, and cancellation-of-debt exceptions are set by the government and can change, and because they interact in ways that depend heavily on individual loan terms, this is an area where reviewing the specific loan documents and current rules matters more than relying on general assumptions.