Like-kind/1031 exchange.
If you sold a home that you acquired in a like-kind exchange, then the following test applies.
You can’t claim the exclusion if:
A main home isn’t available for exchange because the exchange must be between like-kind real property held for productive use in a trade or business or for investment. Also, real property held primarily for sale isn’t eligible for deferral of gain under section 1031. For an exchange of rental property that was later converted to personal use as a main home, there is a 5-year holding period required under section 121(d)(10). A separate 2-year holding period is required for exchanges between related persons under section 1031(f). See Pub. 544.
If you convert your main home to a rental property (or use a portion of the living area for productive use in a trade or business as in Revenue Procedure 2005-14, examples 3-6), the exchange rules under section 1031 and exclusion of income rules under section 121 may both apply.
If the requirements of both sections 1031 and 121 are met, the section 121 exclusion is applied first to realized gain; section 1031 then applies, including any gain attributable to depreciation deductions. Any cash received in exchange for the rental property is taken into account only to the extent the cash exceeds the section 121 excluded gain on the rental property given up in the exchange. The period before the exchange that is after the last date the property was used as a main home isn’t considered nonqualified use for purposes of the proration rules of section 121. To figure basis of the property received in the exchange (replacement property), any gain excluded under section 121 is added to your basis of your replacement property, similar to the treatment of recognized gain. You can’t convert the replacement property to a main home immediately after the exchange per section 1031(a)(1), which requires that replacement property be held either for investment or for productive use in a trade or business. For more information about like-kind exchanges, see Pub. 544.
For additional information about the intersection of sections 121 and 1031, see Revenue Procedure 2005-14, 2005-7 I.R.B. 528, available at IRS.gov/irb/2005-07_IRB#RP-2005-14.
Note, however, that any period after 2008 during which the property isn’t used as a principal residence is, with certain exceptions, considered nonqualified use of that property for which gain allocable to such period may not be excluded, in accordance with section 121(b)(5). This includes property that is separate from the main property and not a part of the living area of the main home that isn’t used as a principal residence for a period after 2008. See section 121(b)(5)(C). See also Revenue Procedure 2005-14 for examples that illustrate how to allocate basis and gain realized in an exchange that is also eligible for section 121 exclusion, as well as details of depreciation recapture. See Form 8824 and its instructions for more details. For additional information, see Property Used Partly for Business or Rental and Business or Rental Use of Home, later.