1031 Exchange Rules: How to Defer Capital Gains Tax in Real Estate
Learn the strict IRS rules, timelines, and calculations behind a 1031 exchange to defer thousands in capital gains taxes when selling investment properties.

For real estate investors, the **1031 Exchange** (named after Section 1031 of the U.S. Internal Revenue Code) is arguably the most powerful wealth-building tool in existence. It allows you to sell an investment property and defer paying capital gains taxes—as long as you reinvest the proceeds into a new "like-kind" property.
By continuously deferring taxes, investors can keep 100% of their equity working for them, snowballing a small duplex into a massive commercial portfolio over a lifetime.
What is a 1031 Exchange?
When you sell an investment property for a profit, the IRS normally requires you to pay Capital Gains Tax, Depreciation Recapture Tax, and potentially Net Investment Income Tax (NIIT). Depending on your state, these taxes can easily wipe out 20% to 35% of your profit.
A 1031 exchange allows you to roll that money into a new property. You aren't avoiding the tax forever—you are simply deferring it until you sell the new property without doing another exchange. (Many investors use the strategy "swap 'til you drop," eventually passing the properties to heirs with a stepped-up cost basis, effectively eliminating the deferred tax).
The Strict Rules and Timelines
The IRS does not make it easy. If you violate any of the strict rules and deadlines, your exchange fails, and you will owe the tax immediately.
1. **Like-Kind Property:** Both the relinquished property (the one you sell) and the replacement property (the one you buy) must be held for investment or business purposes. (e.g., You can trade a rental house for an apartment building, or raw land for a strip mall, but you *cannot* trade for a primary residence). 2. **The 45-Day Identification Rule:** From the day you close on the sale of your property, you have exactly 45 days to identify potential replacement properties in writing. 3. **The 180-Day Closing Rule:** You must close on the replacement property within 180 days of the sale of your original property. (The 45 days are *included* in the 180 days, they are not added together). 4. **Equal or Greater Value:** To defer *all* taxes, the new property must be of equal or greater value than the old one, and you must reinvest all of the equity. 5. **Qualified Intermediary (QI):** You cannot touch the money. The funds from the sale must go directly to a third-party Qualified Intermediary, who then uses them to buy the new property.
How to Calculate Your Potential Tax Savings
To understand the value of a 1031 exchange, you have to know what you would pay without one. Here is how the IRS calculates your tax burden:
1. Calculate Adjusted Basis **Adjusted Basis = Original Purchase Price + Capital Improvements - Depreciation** Your basis is what you essentially "paid" for the property in the eyes of the IRS, adjusted for improvements and depreciation taken over the years.
2. Calculate Realized Gain **Realized Gain = Sale Price - Selling Expenses - Adjusted Basis** This is your true taxable profit.
3. Calculate the Taxes - **Depreciation Recapture (25%):** The IRS taxes you on the depreciation you claimed while owning the property. - **Federal Capital Gains (0%, 15%, or 20%):** Based on your income bracket. - **State Taxes:** Varies wildly by state (e.g., California is over 13%, Texas is 0%). - **NIIT (3.8%):** Applied to high-income earners.
Step-by-Step Case Study
Let's assume you are selling a rental property in a state with a 5% state income tax. - **Sale Price:** $750,000 - **Selling Expenses (Commissions, closing costs):** $45,000 - **Original Purchase Price:** $400,000 - **Capital Improvements:** $50,000 - **Depreciation Claimed:** $80,000
**1. Adjusted Basis** $400,000 (Purchase) + $50,000 (Improvements) - $80,000 (Depreciation) = **$370,000**
**2. Realized Gain** $750,000 (Sale Price) - $45,000 (Expenses) - $370,000 (Adjusted Basis) = **$335,000 Total Gain**
**3. The Tax Bill (Without a 1031)** - Depreciation Recapture ($80,000 @ 25%) = $20,000 - Fed Capital Gains ($255,000 @ 15%) = $38,250 - State Tax ($335,000 @ 5%) = $16,750 - **Total Tax = $75,000**
If you do a 1031 Exchange, you get to take that **$75,000** and use it as a down payment on your next property instead of giving it to the government!
Interactive Tool Call-Out
Don't want to calculate depreciation recapture and capital gains manually? Use our free 1031 Exchange Calculator to instantly see exactly how much tax you will owe if you sell, and how much equity you can save by doing an exchange.
Common Pitfalls and "Boot"
The biggest mistake investors make is receiving "Boot." Boot is any value received in an exchange that is *not* like-kind property, and it is fully taxable.
There are two common types of boot: - **Cash Boot:** If you sell a property for $500k, and buy a new one for $450k, the $50k in cash you keep is "boot" and will be taxed. - **Mortgage Boot:** If you pay off a $300k mortgage on the old property, but only take out a $200k mortgage on the new one, the $100k difference in debt relief is considered taxable income by the IRS.
FAQs
Can I do a 1031 exchange into a REIT (Real Estate Investment Trust)? No. Shares in a REIT are considered securities, not real estate. However, you *can* exchange into a Delaware Statutory Trust (DST), which offers passive, fractional ownership similar to a REIT but qualifies for 1031 treatment.
Does a fix-and-flip property qualify for a 1031? No. Properties purchased with the primary intent to resell (flipping) are considered "inventory" by the IRS, not investment properties, and are subject to ordinary income tax.
How much does a Qualified Intermediary (QI) cost? Most QI firms charge between $800 and $1,500 for a standard exchange, which is a tiny fraction of the tax savings you will realize.
Try the calculator
Estimate capital gains taxes deferred through a 1031 like-kind exchange. See tax savings, boot amounts, and minimum reinvestment requirements instantly.