Get your taxes done using TurboTax

There is no exception to the capital gains tax for a second home, regardless of why you sell.

 

Certain closing costs can be included in the cost basis, these are listed beginning on page 8 of IRS publication 523.

 

There is no provision to defer tax on capital gains by rolling the gains over into any other property, unless this is commercial property and you do an appropriate 1031 exchange, which must be arranged in advance, and you must exchange like commercial property for like.