Skip to content
Silver Lining Foreclosure Solutions

Homeowner guide

Tax Questions When Facing Foreclosure

Updated November 21, 2026

Short stacks of coins on a white tabletop, for the tax side of a foreclosure.
Immediate answer

A California foreclosure is treated as a sale for tax purposes. Gain, canceled debt, the $250,000/$500,000 home-sale exclusion and state withholding, explained.

On this page
  1. Why the IRS Treats a Foreclosure as a Sale
  2. Excluding the Gain on a Main Home
  3. When the Lender Cancels Part of the Debt
  4. Short Sales and Deeds in Lieu
  5. Points Owners Often Overlook
  6. Records and Sources That Answer These Questions
  7. Frequently asked questions
  8. Sources

A foreclosure can have tax consequences. The IRS treats a foreclosure as a sale of the home, so it can produce taxable gain, and any loan balance the lender forgives can count as canceled-debt income. Exclusions can reduce or remove both, depending on how long the owner lived there, the loan type and the owner's finances.

A homeowner in California who has missed mortgage payments, or who now holds a notice of default or a notice of trustee's sale, is already carrying a great deal: the payments, the letters from the servicer, the question of whether the house can be kept. Tax questions tend to arrive on top of all that, often as a form in the mail the following year. This guide explains how a foreclosure, a short sale or a deed in lieu is treated for tax purposes, what the federal exclusion of gain on a main home covers, what canceled debt means, and how California's real estate withholding and change-in-ownership filing fit in.

Options that keep the home come first. Reinstatement (paying the missed amounts to bring the loan current), a loan modification and forbearance after a hardship all leave the owner in the house, and a HUD-approved housing counselor can explain them at no charge to the homeowner. The tax questions below arise mainly when the property leaves the owner's hands, or when a lender forgives part of a balance.

Why the IRS Treats a Foreclosure as a Sale

A foreclosure is the process a lender uses to sell a property that secures a loan after the borrower stops paying. In California, most home loans are secured by a deed of trust, a recorded document that lets a trustee sell the home at a trustee's sale if the loan goes into default. IRS Publication 4681 explains the tax side plainly: when property is foreclosed upon and sold, "you are treated as having sold the property and you may recognize taxable gain."

That single sentence opens two separate questions:

  • Gain or loss on the property. This compares what the owner is treated as receiving with the owner's adjusted basis, which Publication 4681 describes as "usually your cost" in the property.
  • Canceled-debt income. This arises if the lender forgives some of the remaining balance.

Publication 4681 says whether canceled-debt income also arises "depends in part on whether you are personally liable for the debt and in part on whether the outstanding loan balance is more than the fair market value (FMV) of the property." A recourse loan is one the borrower is personally liable for; a nonrecourse loan is one where the lender can look only to the property. For recourse debt above the property's value, Publication 4681 says the gain or loss "is measured by the difference between the FMV of the property at the time of the disposition and your adjusted basis." The figure used as the amount realized, meaning what the owner is treated as receiving, is figured differently for nonrecourse debt, and Publication 4681 walks through both.

California law bears on personal liability. Under Code of Civil Procedure section 580b, except as its subdivision (c) provides, no deficiency is owed or collected on a deed of trust on a dwelling for not more than four families, given to a lender to secure a loan used to pay all or part of the purchase price, and occupied entirely or in part by the purchaser. A deficiency is the shortfall between the debt and what the sale brings in. The section extends to refinances of such a loan executed on or after January 1, 2013, except for new principal advanced that was not applied to the purchase-money loan or to the refinance's fees and costs.

In short, a foreclosure notice does not end the tax question. It starts it, and the type of loan shapes the answer.

Excluding the Gain on a Main Home

Federal law lets an owner leave some gain on a main home out of income. Under 26 U.S.C. § 121(a), gross income does not include gain from a sale if, during the 5-year period ending on the date of the sale, the owner owned and used the property as a principal residence, meaning the home the owner actually lives in as a main home, for periods adding up to 2 years or more. Since a foreclosure is treated as a sale, the date of the foreclosure sale is the date the tests run back from.

The IRS's Topic no. 701, Sale of your home states the amounts: an owner "may qualify to exclude up to $250,000 of that gain from your income, or up to $500,000 of that gain if you file a joint return with your spouse." For joint filers, the topic page says either spouse must meet the ownership test while both must meet the use test. The two tests can be met during different 2-year periods, as long as both fall within the 5-year period ending on the sale date. Generally, the exclusion is not available if the owner excluded gain from another home sale during the two years before.

An owner who falls short of the 2-year tests is not always shut out. Under 26 U.S.C. § 121(c), a reduced exclusion can apply when a sale happens because of a change in place of employment, health, or, to the extent regulations provide, unforeseen circumstances. IRS Publication 523, Selling Your Home sets out the events that qualify and the worksheets for figuring the reduced amount. Publication 523 also notes that gain equal to depreciation claimed for renting the home cannot be excluded.

This exclusion applies to gain only. It does not reach canceled-debt income, which is a separate calculation under Publication 4681.

Whether the exclusion wipes out the gain depends on how long the owner lived in the home, how title was held, and what the numbers show. A CPA, an enrolled agent or a tax attorney reviews those facts.

When the Lender Cancels Part of the Debt

Cancellation of debt means a lender agrees that a borrower no longer owes some or all of a balance. When that happens after a foreclosure or a short sale, the forgiven amount can count as income under federal law. Lenders report foreclosures and canceled debts on Form 1099-A and Form 1099-C; Publication 4681 states that for foreclosures in 2025, "these forms should be sent to you by February 2, 2026."

Publication 4681 also says that "sometimes a canceled debt may be excluded from your income," and that an owner who excludes it "may be required to reduce your 'tax attributes,'" which are items such as carryovers and basis that affect later returns. The exclusions it discusses include one for insolvency, a financial condition Publication 4681 defines and shows how to measure against the canceled amount, and one for canceled qualified principal residence indebtedness, meaning debt used to buy, build or improve a main home.

Publication 4681's own example shows how refinancing matters. An owner who took cash out of a refinance for credit cards and a car later had $115,000 canceled in a short sale. Under the ordering rule, only $5,000 could be excluded as qualified principal residence indebtedness, because $110,000 of the debt was not that kind of debt. Whether the qualified principal residence exclusion is available for a given tax year is a question for the current edition of Publication 4681 and a tax professional.

California's income tax is a separate question from the federal one. Whether California treats a canceled mortgage balance the same way in a given year is addressed by the Franchise Tax Board, the state agency that administers California income tax. The FTB's tax-year guidance and the instructions for the California personal income tax return are where the state answer is found, and a tax professional can check them for the year in question.

A Form 1099-C does not by itself mean tax is owed. It means the amount needs to be reviewed against the available exclusions.

Short Sales and Deeds in Lieu

A short sale is a sale to an outside buyer in which the lender agrees to accept less than the full loan balance. A deed in lieu of foreclosure is a transfer of the property directly to the lender in place of a trustee's sale. Each one hands the property over, so each raises the same two questions as a foreclosure: gain or loss, and any canceled debt. Publication 4681's example of a $620,000 short sale with $115,000 canceled shows both at work.

California adds a withholding rule. Under Rev. & Tax. Code section 18662, subdivision (e), when an individual seller disposes of California real property, the transferee generally must withhold 3 1/3 percent of the sales price, or, if the seller elects, an amount the seller certifies in writing under penalty of perjury. The statute lists conditions, including these:

  • Price threshold. No withholding is required unless the sales price exceeds $100,000.
  • Notice from escrow. A transferee other than an intermediary or accommodator need not withhold unless the real estate escrow person has given written notice of the requirement.
  • Foreclosure and deed in lieu. No withholding is required when the transferee acquired the property at a sale under a power of sale in a deed of trust, under a decree of foreclosure, or by a deed in lieu of foreclosure.
  • Seller certifications. No withholding is required where the transferee relies in good faith on the seller's written certificate, including one that the property is the seller's principal residence within the meaning of 26 U.S.C. § 121, or that the sale will produce a net loss or a gain not required to be recognized for California tax purposes.

The Franchise Tax Board's Real estate withholding page calls withholding "a prepayment of income tax," says Form 593, Real Estate Withholding Statement, is filed with the FTB after every real estate transaction, and says an exemption is filed by submitting Form 593 to the escrow agent before closing. A short sale, unlike a trustee's sale, is not covered by the foreclosure exemption, so the certificates matter there.

A second filing follows the property. Under Rev. & Tax. Code section 480, the transferee files a signed change in ownership statement in the county where the property is located. If the deed is recorded, it is filed with the recorder at the time of recording; if the deed is not recorded, or is recorded without the statement, it is filed with the assessor no later than 90 days from the date the change in ownership occurs. This is a property-tax filing for the county assessor, not an income-tax return.

The tax questions follow the transaction, not its label. Comparing paths means looking at net proceeds after loan payoffs, costs and tax effects, alongside whether a keep-home option is still open.

Points Owners Often Overlook

  • No cash does not mean no tax. The treated-as-sold rule applies whether or not the owner received any money.
  • A short sale has no foreclosure exemption from withholding. The written seller certificates are what can remove it.
  • The county filing still exists. It is the transferee's duty, but it follows a deed in lieu too.
  • Refinance history carries through. Cash taken out can affect both the deficiency protection and how much canceled debt qualifies for exclusion.
  • Timing matters. The tax picture is most useful before the trustee's sale, while choices remain.

Each of these turns on the loan, the property, how title is held and the owner's financial position. A CPA, an enrolled agent or a tax attorney who knows California law is the person who applies the rules to those facts.

Records and Sources That Answer These Questions

A handful of records answers most of these questions. The original loan documents and any refinance papers show whether the loan was recourse and whether new money was advanced. The closing statement from the purchase and receipts for improvements establish basis. The dates the home was bought and last lived in as a main home tell whether the 2-of-5-year tests are met. Any Form 1099-A, 1099-C or 1099-S from the lender or escrow belongs in the same folder.

The official sources are IRS Publication 4681 for canceled debt and foreclosures, IRS Publication 523 and Topic no. 701 for the home-sale exclusion, and the Franchise Tax Board's real estate withholding page for Form 593. The county assessor's office answers property-tax and change-in-ownership questions. A CPA, an enrolled agent or a tax attorney reviews the income-tax side, and an attorney handles any dispute about the loan or the foreclosure itself.

The loan documents and the purchase records are the natural starting point, because whether the loan is recourse or nonrecourse, and what the original basis was, shapes every tax question that follows.

Free to ask

Tell us a little about your situation

Share a few details. You decide what happens next.

What the form asks

  1. Your directionKeep my home, explore selling, or not sure yet.
  2. Your situationMissed payments, a notice, property taxes, liens or something else.
  3. How to reach youYour name, email and phone, and how you'd like to be reached.
Explore my options

Free to ask · You decide

Not sure which path fits?

Share a few details and we'll help you understand options to keep or sell — on your timeline.

Explore my options Call (888) 274-9351

Free to ask

Tell us about your situation

Share a few details. You decide what happens next.

Privacy PolicyTerms of Use

Testimonials

I didn't want promises that a cash buyer could magically stop foreclosure. I wanted real numbers and deadlines.

P.C., Vista, CA

Talk to a HUD-approved counselor

Independent housing counseling is generally free or low-cost. We encourage it no matter which path you choose.

Search HUD's counselor directory ↗

Frequently asked questions

Does a foreclosure mean I owe income tax?

Not necessarily. A foreclosure can create taxable gain, canceled-debt income, both or neither. An owner whose home lost value may show a loss rather than a gain, and a loss on a main home is not the same as income. The loan type, the owner's basis and the exclusions decide the result, which a tax professional figures from the documents.

What is cancellation-of-debt income and does it apply to my foreclosure?

It is a forgiven loan balance counted as income. In California, whether it arises can turn on personal liability, which Code of Civil Procedure section 580b's purchase-money rules help decide. An exclusion can remove it, though excluding it may affect future returns.

Can I exclude the gain on my home from income tax if it goes to foreclosure?

Often, if the ownership and use tests are met by the foreclosure sale date. Topic no. 701 adds a point owners miss: a Form 1099-S triggers a duty to report the sale even when the gain is fully excludable, using Schedule D and Form 8949.

Does California tax canceled mortgage debt the same way the federal government does?

Not automatically. California's income tax is figured under California law, so an exclusion on the federal return does not settle the state return. The Franchise Tax Board's guidance for the tax year in question, read with a CPA, enrolled agent or tax attorney, gives the state answer.

What is California real estate withholding and does it apply when a home is foreclosed?

It is a prepayment of the seller's California income tax taken from the sales price. A lender or buyer acquiring the home at a trustee's sale or by deed in lieu is not required to withhold under Rev. & Tax. Code section 18662. Any amount withheld in a short sale is a prepayment the seller claims on a California return.

Does a short sale have the same tax consequences as a foreclosure?

It raises the same two questions, but the paperwork differs. A short sale closes through escrow, so Form 593 and any withholding certificates come into play, and the owner has more say over timing than at a trustee's sale. The lender's written short-sale approval shows how much of the balance it is canceling.