26Title 26The US tax code, read & explained ES

26 U.S.C. § 1031

§ 1031. Exchange of real property held for productive use or investment

1,135 words · amended 13 times · cited by 17 other sections

Compare on Cornell LII Official XML (House)

Explainer

1031 exchanges: swapping real estate without paying tax yet

Sell investment or business real estate and buy another, and the gain can be deferred — if you identify the replacement within 45 days and close within 180.

In plain English

Normally, selling a property at a profit means paying tax now. Section 1031 lets you postpone that tax if you reinvest in another property of "like kind". The gain isn't forgiven. It carries into the new property through a lower , and you pay when you eventually sell without exchanging. If you hold the property until death, your heirs usually get a fresh basis and the deferred gain disappears.

Since 2018, 1031 applies only to real property held for investment or for use in a business. Equipment, vehicles, art and crypto no longer qualify. "Like kind" is broad for real estate: a rental condo can be exchanged for farmland, a warehouse or a building lot.

Who it touches

Landlords, real estate investors and businesses that own their buildings. It doesn't apply to your own home (§ 121 covers that), to property bought to flip, or to property outside the US exchanged for US property.

The rules

Rule Detail
Identify the replacement within 45 days of selling, in writing
Close on the replacement within 180 days of selling, or by your tax return due date (including extensions) if that comes first. Filing an extension keeps the full 180 days
Who holds the money a qualified intermediary. If you touch the sale proceeds, the exchange fails
To defer all the gain buy property of equal or greater value and reinvest all the cash
Reported on Form 8824

Cash or debt relief you receive and don't reinvest is called "boot" and is taxed.

Worked example

Leila bought a rental duplex for $400,000 and sells it for $700,000. Her gain is $300,000. Ignoring depreciation for simplicity, that could cost roughly $45,000–$60,000 in federal tax.

  • Within 45 days, she identifies a small apartment building priced at $850,000
  • She closes within 180 days through a qualified intermediary, reinvesting all $700,000 and borrowing the rest
  • Tax due now: $0. The new building's basis is $850,000 − $300,000 = $550,000

Watch out for

  • The deadlines are strict and aren't extended for weekends.
  • Depreciation recapture and state taxes can still apply in some cases, and a few states track the deferred gain if you later move away.
  • Related-party exchanges, with family members or your own companies, have extra two-year holding rules.

Draft explainer. Figures checked against IRS Rev. Proc. 2025-32 and the current text on November 5, 2026. Not yet reviewed by a licensed tax professional.

Sources

History

Part of the code since 1954. Last changed December 22, 2017 by the Tax Cuts and Jobs Act (2017).

Every change, newest first (14)
  1. December 22, 2017Tax Cuts and Jobs Act (2017)
  2. June 18, 2008Public Law 110-246
  3. May 22, 2008Public Law 110-234
  4. December 21, 2005Gulf Opportunity Zone Act of 2005
  5. June 25, 1999Public Law 106-36
  6. August 5, 1997Taxpayer Relief Act of 1997
  7. November 5, 1990Omnibus Budget Reconciliation Act of 1990
  8. December 19, 1989Omnibus Budget Reconciliation Act of 1989
  9. October 22, 1986Tax Reform Act of 1986
  10. July 18, 1984Deficit Reduction Act of 1984
  11. December 30, 1969Tax Reform Act of 1969
  12. September 22, 1959Public Law 86-346
  13. September 2, 1958Public Law 85-866
  14. August 16, 1954Internal Revenue Code of 1954 (original text)

The law as written

Current through Public Law 119-102. Amendment notes omitted.

(a) Nonrecognition of gain or loss from exchanges solely in kind
(1) In general

No gain or loss shall be recognized on the exchange of real property held for productive use in a trade or business or for investment if such real property is exchanged solely for real property of like kind which is to be held either for productive use in a trade or business or for investment.

(2) Exception for real property held for sale

This subsection shall not apply to any exchange of real property held primarily for sale.

(3) Requirement that property be identified and that exchange be completed not more than 180 days after transfer of exchanged property

For purposes of this subsection, any property received by the taxpayer shall be treated as property which is not like-kind property if—

(A)

such property is not identified as property to be received in the exchange on or before the day which is 45 days after the date on which the taxpayer transfers the property relinquished in the exchange, or

(B)

such property is received after the earlier of—

(i)

the day which is 180 days after the date on which the taxpayer transfers the property relinquished in the exchange, or

(ii)

the due date (determined with regard to extension) for the transferor’s return of the tax imposed by this chapter for the taxable year in which the transfer of the relinquished property occurs.

(b) Gain from exchanges not solely in kind

If an exchange would be within the provisions of subsection (a), of section 1035(a), of section 1036(a), or of section 1037(a), if it were not for the fact that the property received in exchange consists not only of property permitted by such provisions to be received without the recognition of gain, but also of other property or money, then the gain, if any, to the recipient shall be recognized, but in an amount not in excess of the sum of such money and the fair market value of such other property.

(c) Loss from exchanges not solely in kind

If an exchange would be within the provisions of subsection (a), of section 1035(a), of section 1036(a), or of section 1037(a), if it were not for the fact that the property received in exchange consists not only of property permitted by such provisions to be received without the recognition of gain or loss, but also of other property or money, then no loss from the exchange shall be recognized.

(d) Basis

If property was acquired on an exchange described in this section, section 1035(a), section 1036(a), or section 1037(a), then the basis shall be the same as that of the property exchanged, decreased in the amount of any money received by the taxpayer and increased in the amount of gain or decreased in the amount of loss to the taxpayer that was recognized on such exchange. If the property so acquired consisted in part of the type of property permitted by this section, section 1035(a), section 1036(a), or section 1037(a), to be received without the recognition of gain or loss, and in part of other property, the basis provided in this subsection shall be allocated between the properties (other than money) received, and for the purpose of the allocation there shall be assigned to such other property an amount equivalent to its fair market value at the date of the exchange. For purposes of this section, section 1035(a), and section 1036(a), where as part of the consideration to the taxpayer another party to the exchange assumed (as determined under section 357(d)) a liability of the taxpayer, such assumption shall be considered as money received by the taxpayer on the exchange.

(e) Application to certain partnerships

For purposes of this section, an interest in a partnership which has in effect a valid election under section 761(a) to be excluded from the application of all of subchapter K shall be treated as an interest in each of the assets of such partnership and not as an interest in a partnership.

(f) Special rules for exchanges between related persons
(1) In general

If—

(A)

a taxpayer exchanges property with a related person,

(B)

there is nonrecognition of gain or loss to the taxpayer under this section with respect to the exchange of such property (determined without regard to this subsection), and

(C)

before the date 2 years after the date of the last transfer which was part of such exchange—

(i)

the related person disposes of such property, or

(ii)

the taxpayer disposes of the property received in the exchange from the related person which was of like kind to the property transferred by the taxpayer,

there shall be no nonrecognition of gain or loss under this section to the taxpayer with respect to such exchange; except that any gain or loss recognized by the taxpayer by reason of this subsection shall be taken into account as of the date on which the disposition referred to in subparagraph (C) occurs.

(2) Certain dispositions not taken into account

For purposes of paragraph (1)(C), there shall not be taken into account any disposition—

(A)

after the earlier of the death of the taxpayer or the death of the related person,

(B)

in a compulsory or involuntary conversion (within the meaning of section 1033) if the exchange occurred before the threat or imminence of such conversion, or

(C)

with respect to which it is established to the satisfaction of the Secretary that neither the exchange nor such disposition had as one of its principal purposes the avoidance of Federal income tax.

(3) Related person

For purposes of this subsection, the term “related person” means any person bearing a relationship to the taxpayer described in section 267(b) or 707(b)(1).

(4) Treatment of certain transactions

This section shall not apply to any exchange which is part of a transaction (or series of transactions) structured to avoid the purposes of this subsection.

(g) Special rule where substantial diminution of risk
(1) In general

If paragraph (2) applies to any property for any period, the running of the period set forth in subsection (f)(1)(C) with respect to such property shall be suspended during such period.

(2) Property to which subsection applies

This paragraph shall apply to any property for any period during which the holder’s risk of loss with respect to the property is substantially diminished by—

(A)

the holding of a put with respect to such property,

(B)

the holding by another person of a right to acquire such property, or

(C)

a short sale or any other transaction.

(h) Special rules for foreign real property

Real property located in the United States and real property located outside the United States are not property of a like kind.