# Combine 121 and 1031 - how much capital gain is non taxable?

Section 121 allows \$500k of cap-gain to be non taxable (in the right circumstances) Section 1031 allows the deferral of capital gain taxes (in the right circumstances), and they can be combined. But I'm confused on how the amounts are combined. Here's an example, all for a couple filing jointly:

``````Year 1     purchase a primary residence for \$1m and move in as primary residence
Years 2-7  renovate, spending \$600k
Year 8     move out, and begin renting it out
Year 10    sell house for \$3m
incur \$200k in selling fees
use 1031 exchange to buy a new rental property for \$Xm

Ignore depreciation for simplicity (I know, IRL you don't have that choice)

``````

If I understand correctly, if a 1031 were not used there would be \$700k of taxable capital gain [0.7 = (3 - (1 + 0.6 + 0.2)) - 0.5]. But the 1031 allow for the deferral of gain.

Question Is there any value of the new rental property (X) that causes no gain to be taxable in year 10? If so, what? And if not, what value(s) of X minimize the taxable gain.

My naive guess would be \$2.5m (sale price of old property minus allowance), but I doubt it's that simple.

Bonus question does the existence/size of a mortgage on either the old or the new property affect the math?

thanks

tom

• For the bonus question: how big would the mortgage be. If you funded the \$600K renovation then paying it off at closing would eat into your cash for the repurchase. Commented Nov 17, 2019 at 12:53