Most likely not, unless you rented it out for the majority of the time you owned it, is what most tax experts say.
If you bought it, however, as an investment property, with the sole purpose to make a capital gain on it, perhaps you can.
A 1031 allows you to sell an investment property, and buy another one, without having to pay any capital gains tax, at least right now. Once you stop buying new properties, however, you’ll pay a capital gains tax. Hopefully, you’ll be old then, and be in a lower tax bracket. Also, hopefully, you’ll have accumulated so much wealth that the tax bite won’t hurt as much.
1031 exchanges are a great idea. However, as everyone points out, they can be difficult to manage. A tax advisor and 1031 exchange intermediary should be the first people you contact, if you want to do one.
More information: Does a Vacation Home Qualify For a 1031 Exchange? –
By Lew Sichelman, Real Estate Journal