Can I take out a loan for repairs on investment property before selling in a 1031 exchange?

Trying to figure out if taking a loan for repairs on investment property before selling in a 1031 exchange messes up the exchange itself. I have a duplex I've held for about six years. The roof needs serious work before I can get a decent price, so I'm thinking about a small rehab loan to cover it. The concern is whether the loan proceeds or the repair costs change how I calculate my boot, my adjusted basis, or the exchange itself. I've been reading through the Form 8824 instructions and I understand the basic like-kind exchange mechanics but I can't find anything specific about financing repairs on the relinquished property in the months before closing. Does the loan affect what counts as boot or change the amount realized?

37 comments

I went through almost this exact situation two years before I closed my exchange. The repair loan itself doesn't disqualify the exchange — what matters for 1031 purposes is how the proceeds flow at closing. If the loan is paid off from closing proceeds before they reach the qualified intermediary, that payoff is liability relief, which counts as boot unless it's offset by debt you take on or cash you add on the replacement side. Boot comes into play when you receive cash or non-like-kind property from the exchange, or when you're relieved of more debt than you take on. The roof improvement does increase your adjusted basis in the relinquished property, though, which affects your gain calculation on Form 8824.

Ben S.

Author

That's helpful. So the loan payoff at closing counts as debt relief I need to offset on the replacement side, and the roof cost adds to my basis? I need to make sure I'm tracking those repair costs carefully then.

Yes, except the payoff is debt relief you need to offset, not just a smaller net. Keep every invoice and lender document. The basis adjustment flows into the amount realized minus adjusted basis calculation on Form 8824 Line 19 and surrounding lines.

The thing to watch is what happens to any loan proceeds you don't spend on repairs. If you pulled out more than the actual repair costs and kept the leftover cash, that cash is not part of the exchange — it's just money you received. Only the proceeds that go through the QI as part of the exchange structure are protected. I'd be very precise about documenting exactly what the loan covered and what hit your basis versus what you spent on deductible maintenance items.

Ben S.

Author

The loan is sized specifically for the roof so there shouldn't be leftover proceeds, but that's a good thing to watch.

I had a similar question before my last exchange and I uploaded my closing disclosure and repair loan documents to taxr.ai — Taxr pulled out the loan payoff line, the net proceeds, and flagged which repair costs were capital improvements versus deductible repairs for me. Saved me a lot of confusion sorting through what adjusted my basis and what didn't. The capital improvement piece matters a lot for Form 8824 because it changes your adjusted basis in the relinquished property, which changes your realized gain.

Ben S.

Author

Did it also help figure out the boot calculation? That's the part I'm most nervous about.

Yes, it laid out the boot piece clearly — walked me through what counted as mortgage boot on the replacement side versus what I was relieving on the relinquished side. The net mortgage relief piece trips a lot of people up.

Mortgage boot is worth spelling out here. When you're relieved of the loan on the relinquished property at closing, that mortgage relief is treated as boot received unless it's offset by new debt you take on for the replacement property or by additional cash you put into the replacement. So if your repair loan gets paid off from closing proceeds, the net debt relief is what matters, not the gross payoff amount. Form 8824 Part III handles this — liabilities assumed and relieved on both sides are netted, and any net relief is included on Line 15.

Ben S.

Author

The debt-matching piece is what I had overlooked. So I need to make sure the replacement property debt is at least equal to what I'm leaving behind including the repair loan?

Right. If total debt on replacement is less than total debt relieved on relinquished, that shortfall is boot. You can cover it with extra cash into the deal instead of more debt, but you can't just ignore it.

Timing matters too. The repairs need to be done and costs incurred before closing on the relinquished property if you want them to increase your adjusted basis in that property. Improvements you paid for and completed before the sale date go into basis; anything you're still paying on after closing doesn't adjust the relinquished property's basis — it might be relevant to the replacement property discussion instead.

This is true but there's also the improvement exchange structure where you use the QI to hold funds and do improvements on the replacement property. That's a different and more complex setup than what's being described here.

Yes, that's a different animal entirely. For the relinquished property side, pre-close completion is what determines basis.

I handled a similar situation last year. The lender on my repair loan required a first lien position, which created a complication because my existing mortgage lender had to subordinate. That was a whole separate negotiation that took longer than the actual repairs. If you haven't locked in the loan yet, check the lien position requirements early — it can delay your timeline and push back when your 45-day identification window starts if closing gets pushed.

Don't forget that any depreciation you've taken on the duplex over six years is subject to recapture at the time of sale, and a 1031 exchange defers that recapture too — it carries over to the replacement property's basis rather than triggering in the year of exchange. The depreciation recapture would otherwise be taxed at the Section 1250 unrecaptured rate. Form 8824 defers the whole gain including recapture, but your starting basis in the replacement property will reflect all that deferred gain and deferred recapture.

Ben S.

Author

I hadn't fully thought through the recapture piece carrying forward. So my replacement property basis is lower than what I paid for it because of the deferred gain?

Exactly. Your basis in the replacement is essentially what you paid minus the deferred gain. That's by design — the tax follows the investment until you eventually sell outside a 1031.

Before my exchange closed I pasted my repair loan agreement and my draft closing statement into Taxr and asked it to map every dollar to the right line on Form 8824. It flagged that my loan payoff was showing up in a way that would double-count it in the boot calculation — my preparer had the number in two places. Caught that before filing. If you have complex closing statements it's worth doing that kind of line-by-line check before your preparer finalizes 8824.

Ben S.

Author

That's a real concern — I could see how the same number could appear in multiple places on the closing statement and get picked up twice. Good catch.

Something worth confirming with your qualified intermediary: the QI agreement needs to be in place before you close on the relinquished property. You can't retrofit a 1031 after the fact. If the repair loan delayed your sale date at all and you haven't set up the QI yet, do that first — before the closing date is set in stone.

Ben S.

Author

QI is already lined up, that part I did right from the start.

I'd push back slightly on the idea that the repair costs always add to your adjusted basis. Capital improvements do, but routine repairs and maintenance — things like painting, fixing a broken fixture, replacing a faucet — are currently deductible operating expenses on Schedule E, not basis adjustments. Only costs that add value, extend the useful life, or adapt the property to a new use get capitalized. So if part of your roof job is patching versus full replacement, there could be a split treatment.

Good clarification. A full roof replacement is almost always a capital improvement. But mixed repair and maintenance bills from the same contractor can get complicated — worth having the invoices itemized.

Yes, itemized invoices are key. Lump-sum contractor bills are hard to defend in an audit.

Has your QI confirmed they can handle the loan payoff coordination at closing? Some QIs are set up only to receive the net proceeds after all liens are cleared by the title company. Others will get involved in the payoff waterfall. Knowing your QI's process changes how the closing statement gets structured.

Ben S.

Author

I haven't asked them specifically about that. I'll bring it up in our next call before we set the closing date.

The 45-day identification and 180-day completion windows start from the closing of the relinquished property regardless of when the repair loan closes or gets paid off. I've seen people assume the clock starts when the QI receives funds — it doesn't. Day one is the date title transfers on the relinquished side.

For the basis calculation on Form 8824, the adjusted basis of the relinquished property goes on Line 18. That figure should reflect your original purchase price plus all prior capital improvements — including the roof if it's completed before closing — minus all depreciation you've actually taken or were allowed to take over the holding period. If you underreported depreciation in earlier years you're still treated as having taken it.

Ben S.

Author

The "allowed or allowable" piece is something I always forget. Even if I didn't claim it I'm still considered to have taken it for basis purposes?

Yes. If you should have been depreciating and didn't, that affects your basis as if you had. It's one of the more punishing rules in rental property accounting. Publication 527 has the detail and you'd want a CPA to look at your prior Schedule E filings if there's any gap.

I'd strongly suggest looping in a CPA who does 1031 work specifically before you close — not after. The interaction between the repair loan payoff, mortgage boot, basis adjustments, and the 8824 calculations is exactly the situation where a number in the wrong place costs you. An enrolled agent with exchange experience also works. The IRS instructions for Form 8824 are detailed but they assume a clean fact pattern; yours has a few moving parts.

Ben S.

Author

Agreed. I have a CPA I've worked with before but I'm going to make sure she has done exchange returns specifically, not just general real estate.

One thing the thread hasn't touched on: if the replacement property you identify is also going to need work, consider whether an improvement exchange makes sense. The QI holds the exchange funds and pays for improvements on the replacement property during the exchange period, and the improved property is what gets transferred to you. It's more complex and has strict timing requirements, but it lets you use exchange dollars to build equity rather than putting your own cash in. Worth asking your QI about if the numbers are large enough.

Yes, but the replacement property has to be substantially improved and received within the 180-day window. If the construction timeline is tight it can be very hard to execute cleanly.

True. It's not for every deal. But for a larger exchange where the replacement needs significant capital work it can be worth structuring correctly from day one rather than finding out later you left exchange funds on the table.

If this is your first 1031 I'd read through the About Form 8824 page on irs.gov before your closing meeting so you understand the vocabulary your QI and CPA will use. The form itself tells you a lot about what documentation you need to have ready — particularly around liabilities assumed and given up on both sides of the exchange.