Can You Sell a Property and Reinvest Without Capital Gains?

You can sell a property and reinvest the money without paying capital gains tax, but only through specific federal provisions with strict rules. If it’s an investment or business property, a Section 1031 like-kind exchange lets you defer the entire gain by rolling the proceeds into another qualifying property. If it’s the home you live in, Section 121 lets you permanently exclude up to $250,000 of gain as a single filer or $500,000 as a married couple filing jointly. Other tools, including installment sales and Qualified Opportunity Funds, can spread or partially shelter the tax when neither of the main options fits.

What You’d Otherwise Owe on the Sale

Before choosing a strategy, it helps to see what’s actually on the table. When you sell for more than your adjusted basis (roughly, purchase price plus improvements minus depreciation), the difference is a capital gain. Property held longer than a year is taxed at long-term federal rates of 0%, 15%, or 20%, depending on your taxable income and filing status.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses

Investment property carries two extra layers. Depreciation recapture taxes the portion of your gain tied to prior depreciation deductions at up to 25%, on top of the regular capital gains rate on the rest.2Internal Revenue Service. Property (Basis, Sale of Home, Etc.) 5 Then the 3.8% Net Investment Income Tax kicks in when modified adjusted gross income exceeds $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately). Those thresholds are set by statute and don’t adjust for inflation.3Internal Revenue Service. Questions and Answers on the Net Investment Income Tax Stack the three and the effective federal rate on an investment property sale can run well above 30%. That’s the number you’re comparing against.

Investment Property: The 1031 Like-Kind Exchange

Section 1031 is the main way to sell investment or business real estate and reinvest without recognizing the gain. You sell one property, buy another of “like kind,” and the tax on the gain is deferred rather than paid.4Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

“Like-kind” is broader than it sounds. It describes how the property is used, not what type of building it is. You can trade an apartment building for raw land, a warehouse for a rental house, or a retail strip for a farm. Both the property you sell and the property you buy must be held for investment or used in a trade or business, and both must be real estate located in the United States. A foreign property doesn’t qualify, and neither do stocks, bonds, or partnership interests.4Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

Two categories quietly fall out. Your primary residence isn’t eligible (Section 121 handles that). And a property you flipped for quick resale is treated as inventory rather than an investment, so it won’t qualify either. The statute doesn’t specify a minimum holding period, but selling weeks after buying raises obvious questions about intent. Related-party exchanges (with family or entities you control) come with an explicit rule: both parties must hold their respective properties for at least two years after the exchange, or the deferred gain becomes immediately taxable.4Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

Vacation Homes

A vacation home can qualify, but only under IRS Revenue Procedure 2008-16. In each of the two 12-month periods before the exchange, the property must be rented at fair market rates for at least 14 days, and your personal use can’t exceed the greater of 14 days or 10% of days rented. The replacement property has to meet the same test for the two 12-month periods after. Miss either window and the property is treated as personal use, which kills the exchange.5Internal Revenue Service. Rev. Proc. 2008-16

The Timeline You Have to Hit

Most 1031 exchanges are “deferred”: you sell first, then buy. Two deadlines govern that gap, and both are firm.

Within 45 days of transferring the relinquished property, you must identify potential replacement properties in writing and deliver the identification to your intermediary.6Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 Three identification rules apply:

  • You can identify up to three replacement properties regardless of value.
  • You can identify more than three, but their combined fair market value can’t exceed 200% of what you sold.
  • If you break both limits, the exchange still works only if you actually acquire at least 95% of the total value of all properties identified.

Within 180 days of the original transfer, you must close on the replacement property, or by the due date of your tax return for the year of the sale, whichever comes first.6Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 That second condition trips people up. Sell in October, file in April without an extension, and April becomes the actual deadline. Filing an extension is standard when an exchange straddles two tax years. The IRS grants no other extensions except for federally declared disasters.

The Qualified Intermediary

You cannot touch the sale proceeds. A Qualified Intermediary must hold the funds between closings, receiving the cash at the sale, holding it in escrow, and sending it directly to the seller of the replacement property.6Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 If any of the proceeds pass through your hands, even briefly, the exchange fails. The exchange agreement with the intermediary has to be in place before you close on the sale of the relinquished property.

The intermediary holds your entire equity during the exchange, so their financial stability matters. The IRS has warned about intermediaries who have gone bankrupt or failed to meet obligations, leaving the taxpayer with a failed exchange and an unexpected tax bill.6Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 You report the completed exchange on IRS Form 8824.7Internal Revenue Service. Instructions for Form 8824

Boot: When Part of the Deal Is Still Taxable

If you receive anything in the exchange that isn’t like-kind real property, the IRS calls it “boot,” and it triggers immediate tax up to the amount received. Boot usually shows up in two forms: cash you pull out at closing, and mortgage debt relief when the loan on your new property is smaller than the loan on the old one.4Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

Pocket $50,000 from the transaction and you owe capital gains tax on $50,000; the rest still defers. If your old loan was $400,000 and the new one is $300,000, the $100,000 reduction is treated as taxable mortgage boot. You can offset mortgage boot by putting additional cash into the closing so your combined new loan and cash contribution match or exceed the old debt.

The Cost of “Deferral”

A 1031 exchange doesn’t erase capital gains tax. It moves the liability to the next property through a lower basis. Sell a rental with a $300,000 adjusted basis for $800,000 (a $500,000 gain deferred), buy a replacement for $1,000,000, and your basis in the new property is $500,000, not $1,000,000. When you eventually sell without another exchange, the taxable gain is measured from that lower number.4Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

The lower basis also shrinks annual depreciation. Depreciation is calculated on the adjusted basis, so a $500,000 depreciable basis produces roughly half the yearly write-off of a $1,000,000 one.8Internal Revenue Service. Instructions for Form 4562 That trade-off is worth modeling before committing.

Your Home: The Section 121 Exclusion

If you’re selling the house you live in, Section 121 does something stronger than deferral: it permanently excludes gain from your tax return. Single filers can exclude up to $250,000; married couples filing jointly can exclude up to $500,000.9Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Nothing here requires you to reinvest the proceeds. You can put the money into another home, into stocks, or into a checking account, and the exclusion still applies.

The Two-of-Five Rule

To claim the full exclusion, you must have owned the home and used it as your principal residence for at least two of the five years ending on the sale date. The two years don’t need to be consecutive, and short absences like a vacation count as use. You can only claim the exclusion once every two years.9Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

Selling Earlier Than Two Years

A partial exclusion is available if you sell before hitting two years because of a job move, health issue, or certain unforeseeable events. A qualifying work move is one where the new job is at least 50 miles farther from the home than the old workplace. Health moves cover relocation for diagnosis or treatment of you or a family member. Unforeseeable events include natural disasters, divorce, death, and involuntary job loss.10Internal Revenue Service. Publication 523 (2025), Selling Your Home

The partial exclusion is prorated. Live in the home 12 of the required 24 months and a single filer can exclude $125,000 rather than $250,000.

Home Office Depreciation

If you claimed depreciation on part of the home (typically a home office), the portion of your gain equal to those post-May 1997 depreciation deductions is not excludable and is taxed at up to 25%. The rest of the gain can still be excluded. When the business space was inside the home rather than a separate structure, you don’t have to split the sale into two transactions or allocate the gain between business and personal use.11Internal Revenue Service. Sales, Trades, Exchanges 3

Moving Between Rental and Personal Use

Some owners want to combine the two tools: 1031 into a rental, then convert it to a personal residence and eventually claim the Section 121 exclusion. The tax code allows this, with a catch. If you acquired the property through a 1031 exchange, you can’t use the Section 121 exclusion on it for five years after acquisition. You still also have to meet the two-of-five-year ownership and use tests, so the earliest realistic sale with the exclusion is roughly five years out.9Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

Going the other direction (converting a primary residence into a rental and then doing a 1031) is possible, but any gain allocated to periods of non-qualified use after 2008 is ineligible for the Section 121 exclusion. The allocation is based on the ratio of non-qualified-use time to total ownership time. Periods after your last use of the property as your home don’t count against you, so the penalty falls hardest when rental use came before personal use rather than after.9Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

When Neither Fits: Spreading or Sheltering the Gain

Installment Sales

An installment sale reduces the year-over-year impact of a large gain. Instead of taking the full price at closing, you receive payments over multiple years and pay tax on the profit portion of each payment as it comes in.12Internal Revenue Service. Publication 537 (2025), Installment Sales This helps when a single-year gain would push you into the 20% capital gains bracket or trigger the NIIT. You report the sale on Form 6252 in the year of sale and again each year a payment arrives.13Internal Revenue Service. About Form 6252, Installment Sale Income

Installment sales can’t be used for sales at a loss. And when outstanding installment obligations exceed $5 million at the end of a tax year, Section 453A imposes interest on the deferred tax liability tied to the portion above $5 million, floating with the federal underpayment rate.14Office of the Law Revision Counsel. 26 USC 453A – Special Rules for Nondealers There’s also credit risk: you’re effectively financing the buyer, and a default means foreclosing to recover the property.

Qualified Opportunity Funds

The Qualified Opportunity Zone program lets investors defer capital gains from any asset by reinvesting the gain in a Qualified Opportunity Fund within 180 days.15Internal Revenue Service. Invest in a Qualified Opportunity Fund But the deferral has a hard end date: all deferred gains must be recognized no later than December 31, 2026, regardless of when the investment was made.16Internal Revenue Service. Opportunity Zones Frequently Asked Questions For someone investing now, that leaves essentially no deferral runway.

The basis step-ups that once reduced the deferred gain (10% for five-year holds, 15% for seven-year holds) required investment by December 2021 and December 2019 respectively and are no longer reachable. What remains fully intact is the ten-year rule: hold the QOF investment for at least ten years and any appreciation on that investment, separate from the original deferred gain, is permanently tax-free.15Internal Revenue Service. Invest in a Qualified Opportunity Fund For a new investor, that appreciation exclusion is the reason to consider a QOF, not the deferral.

Holding Until Death Ends the Story

The long-run play behind stacking 1031 exchanges is that deferred gain can be wiped out entirely at death. Under Section 1014, heirs receive the property with a basis equal to fair market value on the date of death, erasing every dollar of deferred gain accumulated across every prior exchange.17Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent The heirs could sell the next day and owe little or no capital gains tax. The trade-off is that you never touch that equity during your lifetime without either borrowing against it or triggering the tax you’ve been deferring.