For a primary residence, there is no deadline to buy another home, because there is no requirement to buy one at all. Federal law lets you exclude up to $250,000 of gain if you’re single, or $500,000 if you’re married filing jointly, without ever purchasing a replacement property.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The idea that you have to reinvest the money in another house comes from a rule Congress repealed in 1997. A purchase deadline does still exist, but only for investment property sold through a 1031 exchange: 45 days to identify a replacement and 180 days to close. If you’re selling the home you live in, that clock has nothing to do with you.
Primary Residence: No Replacement Home Needed
Before 1997, the tax code did force homeowners to buy a replacement home of equal or greater value to defer capital gains. Congress eliminated that requirement when it created the current exclusion under Section 121. You can now sell your home, keep the gain up to the exclusion limit, and rent an apartment, move in with family, or travel indefinitely without owing federal capital gains tax on the excluded portion.
Single filers can exclude up to $250,000 of gain. Married couples filing jointly can exclude up to $500,000, provided at least one spouse meets the ownership requirement, both spouses meet the use requirement, and neither spouse claimed the exclusion on another home sale within the past two years.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Anything above these limits is taxable.
How You Qualify for the Home Sale Exclusion
You qualify for the full exclusion if you pass two tests during the five-year period ending on the date of sale. You must have owned the home for at least two of those five years (the ownership test) and lived in it as your primary residence for at least two of those five years (the use test). The two years don’t need to be consecutive, and the ownership and use periods don’t need to overlap.2Internal Revenue Service. Topic No. 701, Sale of Your Home You just need a cumulative total of 730 days for each test within that five-year window.3Internal Revenue Service. Publication 523 (2025), Selling Your Home
You also cannot have claimed the exclusion on a different home sale within the two years before the current sale.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence That prevents you from stringing several excluded sales together in quick succession.
Partial Exclusions and Special Situations
If you sell before meeting the two-year ownership or use requirement, you may still qualify for a partial exclusion when the sale is driven by a job change, a health problem, a divorce, or another circumstance beyond your control. The reduced amount is proportional. Divide the time you actually owned and lived in the home by two years, then multiply by the full exclusion. A single filer who lived in the home for 12 months before a qualifying job relocation could exclude up to $125,000 instead of the full $250,000.
Divorce triggers a few specific protections. If you received the home from a spouse or former spouse in a transaction related to divorce, you can count the time they owned it toward your own ownership period.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence For the use test, if your former spouse lives in the home under a divorce decree or written separation agreement, the IRS treats that as your use of the home as a principal residence.
A surviving spouse who sells within two years of their spouse’s death can claim the full $500,000 exclusion as an unmarried individual, as long as the joint ownership and use requirements were satisfied immediately before the death.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence After that two-year window closes, the limit drops to $250,000.
Members of the uniformed services, the Foreign Service, and the intelligence community can suspend the five-year lookback period for up to 10 years while on qualified official extended duty. You qualify for this suspension if you’re stationed at least 50 miles from your home, or living in government housing under orders, for more than 90 days or an indefinite period.2Internal Revenue Service. Topic No. 701, Sale of Your Home A service member deployed for eight years can still sell and claim the full exclusion, because the five-year clock was paused during deployment.
When You Owe Tax Anyway
The exclusion only matters if your gain exceeds it, so calculating your actual profit carefully can save real money. Your gain isn’t the sale price minus what you originally paid. It’s the sale price, minus selling expenses, minus your adjusted basis.
Selling expenses that reduce your gain include real estate agent commissions, advertising costs, legal fees, and any loan charges you paid that were normally the buyer’s responsibility. Your adjusted basis starts with your original purchase price (including many closing costs like title insurance, transfer taxes, and recording fees) and grows with every qualifying improvement over the years. A new bathroom, a replaced roof, central air conditioning, a deck, landscaping, or a kitchen remodel all add to your basis. Routine maintenance and repairs generally don’t count, though repair work done as part of a larger remodeling project can.3Internal Revenue Service. Publication 523 (2025), Selling Your Home Keep records. Homeowners who held property for decades in appreciating markets are the ones most likely to exceed the exclusion, and documentation of improvements is what keeps the tax bill down.
Any profit above the $250,000 or $500,000 exclusion is subject to long-term capital gains tax if you owned the home for more than a year. Federal long-term capital gains rates for 2026 are 0%, 15%, or 20%, depending on taxable income. For single filers, the 15% rate kicks in above $49,450 of taxable income and the 20% rate above $545,500. For joint filers, those thresholds are $98,900 and $613,700.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses Short-term gains on property held a year or less are taxed at ordinary income rates.
High-income sellers face an additional 3.8% net investment income tax. The excluded portion of your home sale gain isn’t subject to it, but any gain above the exclusion counts as net investment income if your modified adjusted gross income exceeds $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately).5Internal Revenue Service. Questions and Answers on the Net Investment Income Tax The tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold.6Internal Revenue Service. Topic No. 559, Net Investment Income Tax These thresholds are not adjusted for inflation, so more sellers cross them each year.
State tax matters too. Most states tax capital gains as ordinary income, with rates running from roughly 0% to over 13% depending on the state and your income. A handful of states impose no state income tax on capital gains. If you’re selling a home with a large gain in a high-tax state, the combined federal and state rate on the amount above the exclusion can approach 35% or more for top earners.
Investment Property: The 45-Day and 180-Day Rules
Everything above applies to your personal residence. Investment property works differently, and this is where the “buy another one” deadlines actually live. There is no Section 121 exclusion for selling a rental, commercial building, or vacant land held for investment. The only way to defer capital gains on investment real estate is a like-kind exchange under Section 1031, and it requires you to buy replacement property within rigid timeframes.7Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment
A 1031 exchange defers both capital gains tax and depreciation recapture by rolling your investment from one property into another “like-kind” property. The exchange is only available for real property used in a business or held for investment. You cannot use it for your personal home, a vacation property used primarily for personal enjoyment, or property you’re actively developing and selling as inventory.
The 45-Day Identification Deadline
Starting the day after you close on the sale of your relinquished property, you have exactly 45 calendar days to identify potential replacement properties in writing. The written identification must reach your Qualified Intermediary before midnight on day 45.7Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment Miss it by a day and the entire exchange fails; the gain becomes immediately taxable. These are calendar days, with no extensions for weekends or holidays.
You can identify replacement properties under one of three rules:
- Three-property rule: identify up to three properties, regardless of value.
- 200-percent rule: identify any number of properties, provided their combined fair market value doesn’t exceed 200% of the value of the property you sold.
- 95-percent rule: identify any number of properties at any value, but you must actually acquire at least 95% of the total value identified.
Most investors use the three-property rule because it’s straightforward and doesn’t require value calculations. The 95-percent rule is a fallback when the other two are exceeded, and it’s unforgiving. Identify $2 million in properties, and you have to close on at least $1.9 million worth.8eCFR. 26 CFR 1.1031(k)-1 – Treatment of Deferred Exchanges
The 180-Day Closing Deadline
You must receive the replacement property and close within 180 calendar days of selling the relinquished property. This clock runs concurrently with the 45-day identification period, not on top of it. The 180-day window also cannot be extended for weekends or holidays.7Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment
One trap catches investors who sell late in the year. If your tax return is due before the 180 days expire, the exchange period ends on the return due date unless you file an extension. Sell in October 2026 and the 180-day window stretches into April 2027, colliding with the April 15 filing deadline. Filing an extension costs nothing and preserves the full 180 days.
Using a 1031 Exchange Correctly
To defer all of the gain, the replacement property must be worth at least as much as the net sale price of what you sold, and you must reinvest all the equity. Any shortfall is “boot” and triggers tax. Cash boot is any sale proceeds you take out instead of reinvesting. Debt reduction boot appears when your new mortgage is smaller than your old one, even if you never touched cash: a $400,000 mortgage replaced by a $300,000 mortgage produces $100,000 of taxable debt relief. Receiving anything other than qualifying real estate is also boot. The exchange itself doesn’t fail because of boot; you just owe tax on the portion you didn’t fully reinvest.
You must use a Qualified Intermediary to hold the sale proceeds and facilitate the exchange. This isn’t optional. If you touch the money at any point, the IRS treats it as constructive receipt and the exchange is disqualified. The QI takes possession of the funds at closing, holds them during the identification period, and uses them to purchase the replacement property on your behalf. The exchange agreement between you and the QI must be signed before the closing of the relinquished property. QI fees for a standard delayed exchange typically run $600 to $1,200.
After the exchange closes, report the transaction on IRS Form 8824, filed with your federal tax return for the year of the sale.9Internal Revenue Service. Instructions for Form 8824 (2025) The form documents the properties, exchange dates, and calculation of any taxable boot.
If you exchange with a related party, which includes family members, controlled corporations, and other entities with overlapping ownership, both sides must hold the exchanged property for at least two years. If either party disposes of the property within that window, the exchange is retroactively disqualified and the deferred gain becomes immediately taxable.7Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment Exceptions exist for dispositions caused by death or involuntary conversion.
Moving Into a 1031 Property Later
Some investors try to combine both tax benefits: use a 1031 exchange to acquire a property, move into it, then sell it and claim the primary residence exclusion. The tax code allows this but imposes a mandatory five-year waiting period. If you acquire property through a 1031 exchange, you cannot claim the Section 121 exclusion on its sale until at least five years after the acquisition date.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Even after five years, you still must meet the standard two-out-of-five-year ownership and use tests, and nonqualified use rules apply. The years the property spent as a rental before you moved in reduce the portion of gain eligible for the exclusion. Own a 1031-acquired property for seven years, rent it for the first four, live in it for the last three, and about four-sevenths of the gain would be allocated to nonqualified use and fall outside the exclusion. It’s a long game, not a quick loophole.