How Long Do You Have to Reinvest Capital Gains: 45, 60, and 180 Days

How long you have to reinvest capital gains depends entirely on what you sold and which deferral rule you are using. The windows in federal tax law run from 60 days for qualified small-business stock, to 180 days for like-kind real estate exchanges and Qualified Opportunity Fund investments, to two, three, or four years after an involuntary loss. For ordinary stock sales and most home sales, there is no reinvestment deadline because there is no reinvestment-based deferral at all.

No Deferral for Ordinary Stock Sales or a Home Sale

A common belief is that quickly buying new shares with the proceeds of a stock sale will avoid the tax. It will not. When you sell stocks, bonds, mutual funds, or ETFs at a profit, the gain is taxable in the year of the sale whether you reinvest the same day or hold the cash for months. The IRS treats the sale and any later purchase as two separate transactions.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses

Selling your main home works differently, but not through reinvestment. You can exclude up to $250,000 of gain from income, or up to $500,000 if you file jointly, provided you owned and lived in the home for at least two of the five years before the sale. You do not need to buy another home to claim the exclusion, and buying one does not shelter any gain above the exclusion limit.2Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The exclusion is available once every two years.

The rest of this article covers the situations where a reinvestment deadline actually exists.

180 Days to Invest in a Qualified Opportunity Fund

Capital gains from almost any source, including stocks, real estate, and business interests, can be deferred by rolling them into a Qualified Opportunity Fund. You have 180 days from the date you realized the gain to invest in a fund in exchange for an equity interest.3Internal Revenue Service. Invest in a Qualified Opportunity Fund

For a direct sale, the 180-day clock starts on the sale date. If the gain flows to you through a partnership, S corporation, or trust on a Schedule K-1, you can choose one of three start dates: the last day of the entity’s tax year, the date the entity’s own 180-day period began, or the due date of the entity’s tax return without extensions.4Internal Revenue Service. Opportunity Zones Frequently Asked Questions

Gains deferred under the original Opportunity Zone program come due on December 31, 2026, or earlier if you sell or exchange your fund investment before that date. The deferred gain shows up on your 2026 tax return, filed in 2027.3Internal Revenue Service. Invest in a Qualified Opportunity Fund A permanent version of the program became law on July 4, 2025, keeping the same 180-day reinvestment window and adding a 10% basis reduction for investments held at least five years.5U.S. Department of Housing and Urban Development. Opportunity Zones Investors

45 and 180 Days for a Like-Kind Real Estate Exchange

Real estate investors can defer gain by swapping one investment or business property for another under Section 1031. This applies to real property only, not stocks, personal residences, or other assets. Two deadlines run from the day you sell the original property, and they run at the same time.6Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment

  • 45 days to identify. You must identify potential replacement properties in writing within 45 days of the sale. The identification has to be specific enough to distinguish the property, such as by street address, and must be delivered to a party involved in the exchange.
  • 180 days to close. You must close on the replacement property within 180 days of the original sale, or by the due date of your tax return for that year, whichever comes first. Filing an extension can preserve the full 180 days if your return would otherwise be due sooner.

The 45-day period is part of the 180-day total, not added on top. And you cannot touch the proceeds during the process. A qualified intermediary holds the funds from the sale and transfers them directly to the seller of the replacement property. If you take the money yourself at any point, the IRS treats the whole transaction as a taxable sale.

If you receive any cash or non-like-kind property as part of the trade, that portion (called “boot”) is taxable even if the rest qualifies. To fully defer the gain, reinvest all of the proceeds and carry at least as much debt on the new property as you had on the old.

60 Days to Roll Over Qualified Small Business Stock

If you sell qualified small business stock and want to defer the gain, Section 1045 gives you 60 days from the sale date to buy replacement stock in another qualifying small business. This is the shortest reinvestment window in the tax code.7Office of the Law Revision Counsel. 26 USC 1045 – Rollover of Gain From Qualified Small Business Stock to Another Qualified Small Business Stock

Several conditions apply. You must have held the original stock for more than six months before selling. The replacement stock must be in a domestic C corporation whose gross assets did not exceed $75 million when the stock was issued.8Office of the Law Revision Counsel. 26 USC 1202 – Partial Exclusion for Gain From Certain Small Business Stock Only the portion of the gain you actually reinvest is deferred; anything you keep as cash is taxed at the applicable capital gains rate. The deferred gain reduces your basis in the replacement stock, so it comes back into the calculation when you eventually sell.

Two, Three, or Four Years After an Involuntary Loss

When property is destroyed, stolen, or taken by the government through condemnation, you are not required to pay tax on the gain if you reinvest the insurance or condemnation proceeds into similar replacement property within a set window. These windows are longer than for voluntary sales because you did not choose the transaction.9Office of the Law Revision Counsel. 26 USC 1033 – Involuntary Conversions

  • Two years after the close of the first tax year in which you realized any part of the gain. This is the general rule for most property. If a fire destroys rental property in March 2026 and you receive insurance proceeds that year, the replacement deadline is December 31, 2028.
  • Three years if the loss involved business or investment real estate taken through condemnation or the threat of condemnation.
  • Four years if your main home or its contents were destroyed in a federally declared disaster.10Office of the Law Revision Counsel. 26 U.S. Code 1033 – Involuntary Conversions

Each window begins on the date you lost or disposed of the property, or the earliest date of a condemnation threat, and ends the specified number of years after the close of the tax year in which you first realized the gain. If you cannot find suitable replacement property in time, you can apply to the IRS for more time before the period expires; the statute allows extensions on a case-by-case basis.10Office of the Law Revision Counsel. 26 U.S. Code 1033 – Involuntary Conversions

Disaster-Area Extensions

When the IRS grants relief for a federally declared disaster, the reinvestment deadlines above can be postponed. The 45- and 180-day windows for like-kind exchanges, the involuntary conversion periods, and other time-sensitive tax actions all fall under this relief, and the IRS typically pushes affected deadlines to a single future date announced in the disaster notice.

Taxpayers affected by severe storms in Washington state in late 2025 received an extension of various tax deadlines to May 1, 2026, covering time-sensitive actions that would otherwise have fallen during the disaster period. Similar relief for affected Texas taxpayers pushed deadlines to February 2, 2026.11Internal Revenue Service. IRS Announces Tax Relief for Taxpayers Impacted by Severe Storms in Washington If your area has been declared a disaster zone and you have a reinvestment deadline approaching, check the IRS disaster relief page for your location before relying on the original date.

Forms You Need to File

Meeting the deadline is only part of the requirement. Missing the paperwork can undo an otherwise valid deferral.

  • Like-kind exchange. File Form 8824 with your return for the year of the original transfer. Related-party exchanges also require Form 8824 for each of the two following years.12IRS.gov. 2025 Instructions for Form 8824 – Like-Kind Exchanges
  • Qualified Opportunity Fund. Report the deferred gain on Form 8949 for the year you would otherwise have recognized it, and attach Form 8997 to your return every year you hold the investment.13Internal Revenue Service. Form 8997 – Initial and Annual Statement of Qualified Opportunity Fund Investments
  • Small business stock rollover. Elect the rollover on your return for the year of the sale and report the transaction on Schedule D and Form 8949.
  • Involuntary conversion. Report the gain, the amount reinvested, and the replacement property on your return for the year you received the proceeds.

For deferrals that span more than one tax year, particularly like-kind exchanges and Opportunity Zone investments, a tax professional familiar with these rules can help keep the filings on track through every year the deferral remains open.