The problem with refinancing right before
Pull cash out of the property you're about to sell, and the IRS can view it as taking sale proceeds early — step-transaction logic that converts your "loan" into taxable boot. A refinance done on the eve of listing, with no independent business reason, is the classic bad fact pattern. A refinance done a year or two earlier, in the ordinary course of managing the property, is generally fine. In between is gray — and gray is where audits live.
Refinancing after: the standard play
Once your exchange is complete and you hold the replacement property, refinancing it is an ordinary financing event. There's no statutory waiting period; conservative practice is to avoid having the refinance pre-arranged as part of the exchange — letting some time pass and documenting the loan as a separate decision. This is precisely how swap-till-you-drop investors extract cash for decades without ever triggering the deferred gain: exchange, season, refinance, repeat.
One more wrinkle: debt replacement
Remember that during the exchange itself, your new debt (plus any fresh cash) must at least match the debt you paid off, or the gap becomes mortgage boot — the boot calculator checks this. Post-exchange refinancing doesn't disturb that math; it happens after the exchange is already scored.
Check your debt-replacement math →Make sure the exchange itself is clean before planning the refinance