How a 1031 exchange defers tax
Under Section 1031 of the US tax code, gain from selling investment real estate can be deferred if you reinvest in like-kind property through a qualified intermediary. Realized gain = sale price − selling costs − adjusted basis, where adjusted basis = original basis + capital improvements − depreciation taken.
Boot
To defer all gain you generally must buy replacement property of equal or greater value and reinvest all net equity. Cash boot is net proceeds you don't reinvest; mortgage boot is debt relief not offset by new debt or added cash. Boot is taxable up to the amount of your gain. The estimate taxes gain first as depreciation recapture, then at your capital gains rate, plus state tax (this calculator ignores the 3.8% net investment income tax and other details).
Deadlines
You have 45 calendar days from the sale to identify replacement properties and 180 calendar days (or your tax return due date, if earlier) to close.
This is an educational estimate — always work with a qualified intermediary and tax advisor.