Monthly bills summed on a notepad beside a calculator

Situations · Second liens

Exchanging a Property Carrying a Second Mortgage or HELOC

Every lien paid off at closing, first mortgage, second or HELOC, counts as debt relief. Replace the total with new debt or added cash, or the shortfall is taxed.

By Breakwater Exchange · Reviewed by our 1031 advisory team · Last reviewed

The short answer

You can exchange the property; the second lien changes the arithmetic, not the eligibility. The regulations treat every liability the buyer takes the property subject to, including a second mortgage or HELOC paid off at closing, as money you received, so the debt you must replace is the sum of all liens, not just the first mortgage. Offset that total with new financing on the replacement or with your own cash, or the shortfall is taxable boot. What the line paid for does not change the exchange math, but it does decide whether the interest you paid on it was ever deductible.

At a glance

Liens paid at closingTreated as money you received, whatever their lien position
Debt to replaceFirst mortgage plus every second lien and HELOC balance paid off
What offsets debt reliefNew or assumed debt on the replacement, or cash you add
What never offsets cashExtra borrowing does not cancel cash you keep
Interest on a personal-use drawAllocated by how the money was spent, not by what secures it
Unsecured or other-property debtNot part of the sale; paying it from proceeds is cash boot
Return reportingForm 8824 lines 15 through 20 follow the netting in Reg. section 1.1031(d)-2

Every recorded lien on the property you sell is debt relief, and they add together

The rule is in Reg. section 1.1031(d)-2: the amount of any liability to which the property you give up is subject "is to be treated as money received by the taxpayer upon the exchange." The regulation does not rank liens. A second mortgage, a home equity line and a first mortgage are all liabilities the property is subject to, so at closing they are summed.

In a deferred exchange the title company pays each lien from the buyer's funds before anything reaches the qualified intermediary. That payoff is liability relief, not cash in your hands, which is why a HELOC recorded against the relinquished property can be cleared without breaking the exchange; paying off a HELOC or other debts with exchange funds covers the rulings behind that point.

The practical consequence is the size of the hole you must fill on the replacement side. Owners who plan around the first mortgage alone routinely under-borrow by the amount of the line, and the shortfall shows up as gain on Form 8824.

You fill the hole with new debt or added cash, but borrowing more never cancels cash you keep

Reg. section 1.1031(b)-1(c) lets debt you take on offset debt you are relieved of. Example 2 of Reg. section 1.1031(d)-2 adds the second half of the rule: cash you pay offsets liabilities you are relieved of, but "consideration received in the form of cash or other property is not offset by consideration given in the form of an assumption of liabilities."

So there are two ways to cover the combined lien total: a loan on the replacement at least as large, or fresh cash added at the replacement closing. Publication 544 states the same order: the money you are treated as receiving from debt relief can be decreased, but not below zero, by liabilities you assume and cash you pay.

The rule runs one way. If you pull cash out at closing and then borrow more on the replacement, the cash is still taxed, as more debt cannot offset cash taken out explains.

A HELOC spent on your own life never produced a rental deduction, and the exchange does not fix that

Interest is allocated by tracing the loan proceeds. Temp. Reg. section 1.163-8T(c)(1) says debt is allocated "in accordance with the use of the debt proceeds" and that the allocation "is not affected by the use of an interest in any property to secure the repayment." A line secured by your rental but spent on a car, tuition or your own home is personal debt for interest purposes.

For the exchange that distinction does not matter: the balance is still a lien on the property and still counts as liability relief when it is paid. The rule that matters is which side of the closing statement it sits on, not what it bought.

It matters going forward. The new loan you take on the replacement is spent buying a rental, so under the same tracing rule its interest is allocated to that rental activity. Ask your CPA how the old line's interest was reported, because a Schedule E deduction for interest on a personal-use draw is an error to fix, not a basis item to carry forward.

Worked example: a first mortgage and a HELOC on a $900,000 sale

These are hypothetical round numbers. An owner sells a rental for $900,000 with $50,000 of commissions and closing costs. The property carries a $350,000 first mortgage and a $100,000 HELOC drawn years ago for personal use. The title company pays both liens, and $400,000 goes to the qualified intermediary.

Debt relief is $450,000. To defer all of the gain the owner needs a replacement costing at least $850,000 (the net sale price), all $400,000 of exchange cash in it, and $450,000 of new debt or added cash. A $900,000 replacement bought with the $400,000 plus a $500,000 loan clears every test.

Change one input: the owner buys a $750,000 replacement with the $400,000 and a $350,000 loan, matching only the first mortgage. Liabilities relieved of $450,000 less $350,000 assumed leaves $100,000 of net debt relief, which is recognized gain to the extent of the total gain. Adding $100,000 of personal cash at that closing would have offset it. Run your own numbers with your CPA.

  • Liens paid at closing: $350,000 + $100,000 = $450,000 of liability relief.
  • Full deferral: replacement of $850,000 or more, $400,000 reinvested, $450,000 of new debt or added cash.
  • Under-borrowing: $450,000 relieved − $350,000 new debt = $100,000 recognized, unless offset by cash you add.

Settle the second lien's paperwork early, and decide where the replacement debt will come from

Order payoff statements for every lien as soon as the sale is under contract, and ask the HELOC lender to freeze or close the line at payoff so the figure cannot move. Debts secured by a different property, or unsecured balances, are not part of this sale; paying them from proceeds is cash boot, and the intermediary's agreement restricts disbursements under Reg. section 1.1031(k)-1(g)(6) in any case.

If you do not want a new loan as large as both old liens, the alternative is cash. Some owners are moving toward less leverage on purpose; deleveraging with a 1031 sets out what that costs in recognized gain.

A Delaware statutory trust interest can carry the debt side for you: the trust's loan is allocated to each investor's share, as whether a DST loan counts as replacement debt explains. See traditional DST exchange solutions for how that fits a combined first-and-second-lien total.

Related questions

Does it matter that my HELOC was used for personal expenses?

Not for the exchange. The balance is a lien on the property you are selling, so its payoff is liability relief that you replace like any other debt. It matters only for whether the interest you paid on it was deductible.

Can I just replace the first mortgage and add nothing for the HELOC?

Only if you accept tax on the difference. Net debt relief equal to the HELOC payoff is treated as money received and is recognized to the extent of your gain, unless you add that much cash or borrow that much more on the replacement.

Can the qualified intermediary pay off a HELOC on my house from the sale proceeds?

No. A lien on a different property is not a liability of the property you are selling, so using proceeds for it is cash you received. Pay it from other funds, or borrow against the replacement after the exchange is complete.

Where does the second lien show up on Form 8824?

In the liabilities netting on lines 15 through 20, which the instructions say follow Reg. section 1.1031(d)-2. Only net debt relief that is not offset by debt assumed or cash paid appears as other property received.

Can I take a new HELOC on the replacement right after closing?

Borrowing against the replacement after the exchange is complete does not change the exchange itself, but time it with your CPA. Pulling cash out after a 1031 covers the timing questions.

Sources

Checked against these publications on September 30, 2026. Rules and figures change; confirm the current version with your CPA or attorney before you act. This page is general information, not tax or legal advice.

  1. 26 CFR 1.1031(d)-2, Treatment of assumption of liabilities (Cornell LII)
  2. 26 CFR 1.1031(b)-1, Receipt of other property or money in tax-free exchange (Cornell LII)
  3. 26 CFR 1.1031(k)-1, Treatment of deferred exchanges (Cornell LII)
  4. 26 CFR 1.163-8T, Allocation of interest expense among expenditures (Cornell LII)
  5. IRS Publication 544, Sales and Other Dispositions of Assets
  6. IRS Instructions for Form 8824 (2025), lines 15 through 20
  7. IRS Chief Counsel Advice 201325011, QI pay-down of lines of credit

Size the replacement debt before you list

Send us the payoff figures for every lien and the expected sale price, and we will show what replacement debt or cash a fully deferred exchange would need.

Free 1031 proposal

Access Investment Offerings Other Brokers Can’t Provide

Breakwater Exchange’s expert guidance helps you maximize returns while minimizing tax exposure, so you can invest with clarity and confidence.

years of experience
20+
in DST transactions
$1B+
states licensed
50
vetted national sponsors
8

Tell us about your exchange

Share the basics and an advisor will reach out with next steps.

Are you an accredited investor?

Generally, net worth over $1 million excluding your primary residence, or income over $200,000 ($300,000 with a spouse) in each of the last two years.

No obligation. A Breakwater Exchange advisor reviews every request personally.

Get My Free ProposalFree ProposalBook a Free ConsultationFree Consultation