Capital Gains Tax on Real Estate: How to Defer It With a 1031 Exchange
Sell an investment property for more than you paid and the IRS wants a share of the profit. That share is the capital gains tax on real estate, and for most investors it is larger than they expect. Between federal capital gains, state income tax, the 3.8% net investment income tax, and depreciation recapture, a healthy sale can hand a big chunk of your equity to the government.
The good news is that real estate investors have a legal way to keep that money working. A 1031 exchange lets you reinvest the full proceeds into another property and defer the tax. This guide breaks down what you actually owe when you sell, and how an exchange defers it.
What capital gains tax on real estate is
A capital gain is the profit on a sale. You calculate it by subtracting your adjusted basis from the sale price. Your basis starts as what you paid for the property, plus the cost of improvements, minus the depreciation you have claimed over the years.
How the gain is taxed depends on how long you owned the property. Hold it longer than a year and the profit is a long-term capital gain, taxed at 0%, 15%, or 20% at the federal level depending on your income. Sell within a year and the gain is short-term, taxed as ordinary income at your regular rate.
Two more layers often catch sellers off guard. Many states tax the gain on top of the federal bill, and the rate varies widely by state. High earners may also owe the 3.8% net investment income tax. Add it up and the combined rate on a large gain can climb well past 30%.
Depreciation recapture, the tax most investors forget
Every year you own a rental, you get to deduct depreciation, which lowers your taxable income. That deduction is useful while you hold the property, but it also lowers your basis. When you sell, the IRS asks for some of that benefit back through depreciation recapture, taxed at a federal rate of up to 25%.
Here is why it stings. An investor who bought a rental for $300,000 and claimed $60,000 of depreciation over the years now has an adjusted basis of $240,000. Even if the property only sold for what they paid, the $60,000 of recapture is still taxable. Recapture applies whether or not the property appreciated, which is why so many sellers are surprised by the final number.
How much will you actually owe?
Picture an investor who bought a rental for $300,000, claimed $50,000 in depreciation, and sold for $500,000. The gain over the original price is $200,000, plus $50,000 of depreciation to recapture. Between federal capital gains, recapture, possible state tax, and the net investment income tax, the total bill can easily reach the high five figures.
Your numbers will differ based on income, state, and how long you held the property. To estimate your own exposure before you sell, run the figures through our 1031 exchange calculators, then confirm the result with your tax advisor.
How a 1031 exchange defers the tax
A 1031 exchange, named after Section 1031 of the tax code, lets you sell one investment property and buy another without paying tax on the gain at the time of sale. Instead of cashing out, you roll your equity into the next property and the tax is deferred. A qualified intermediary holds the sale proceeds so you never take possession of the cash, which is a requirement for the exchange to work.
To defer the entire tax, two things need to happen. You buy a replacement property of equal or greater value, and you replace the debt you paid off on the property you sold. If you sold a property with a $200,000 mortgage, you generally need $200,000 of new debt or the same amount of fresh cash brought to the closing. Anything you hold back, whether cash or reduced debt, is called boot and is taxable.
Two deadlines govern the process. You have 45 days from the sale to identify your replacement property in writing, and 180 days to close on it. These dates are firm, with very limited exceptions, so planning ahead matters.
One point worth being clear about: a 1031 exchange defers tax, it does not erase it. Your basis carries forward into the new property. You can keep exchanging for as long as you keep investing, and if you hold the final property until death, your heirs may receive a stepped-up basis that can wipe out the deferred gain. That outcome depends on current law and your estate plan, so talk with your attorney.
What you can and cannot defer
A full exchange defers all of the tax. A partial exchange defers some of it. If you pull cash out of the sale or buy a cheaper property, the difference is boot and you pay tax on that portion while deferring the rest. Some investors do this on purpose when they want cash in hand and accept the tax on that slice.
Boot comes in two common forms. Cash boot is money you keep instead of reinvesting. Mortgage boot happens when your new loan is smaller than the one you paid off, because reducing your debt counts as a benefit to you. You can offset mortgage boot by adding cash to the purchase.
Other ways investors manage the tax
A 1031 exchange is the most common tool, but it is not the only one. Installment sales spread the gain and the tax across several years. Opportunity zone funds offer a different deferral path with their own rules and timelines. Holding until death can pass property to heirs with a stepped-up basis. Each of these works differently and fits a different goal, so weigh them with your tax advisor before you sell.
Risks and considerations
An exchange is powerful, but it comes with real constraints. The 45-day and 180-day deadlines do not flex for a slow market, so rushing to buy can push investors into a property that does not fit. You cannot touch the sale proceeds yourself, which is why a qualified intermediary is required. And deferral is not forgiveness, so plan for the day the tax comes due unless you intend to hold for life.
Consult your tax advisor for guidance specific to your situation. The right move depends on your income, your state, your timeline, and your long-term plan.
Defer the tax and keep your equity working
Capital gains tax, depreciation recapture, and state tax can take a serious bite out of a sale. A 1031 exchange lets you defer that tax and reinvest the full amount, which is how many investors trade up and build wealth over time. The rules are strict, but with the right team the process is straightforward.
WealthBuilder 1031 is a nationwide qualified intermediary with a flat $1,000 fee for standard exchanges and no surprises. We are attorney-owned and have guided investors through exchanges since 2009. Ready to defer your taxes? Call 888-508-1901 or visit WealthBuilder1031.com to get started.

