How to Avoid Capital Gains Tax on the Sale of a Home
Selling a home at a profit does not automatically mean you will owe federal capital gains tax. The federal home sale exclusion can shelter up to 250,000 dollars of gain for many single taxpayers and up to 500,000 dollars for many married couples filing jointly. The key is to calculate the gain correctly and meet the ownership, use, and timing rules.
A knowledgeable tax advisor can model a sale before you sign anything, and the IRS sale of your home rules in Topic 701 lay out exactly how the tests work as of September 15, 2026.
Use the main home sale exclusion
To claim the full exclusion, you generally must have owned the home for at least two years and used it as your main home for at least two years during the five year period ending on the sale date. The ownership and use periods do not have to be the same two years. Keep these core rules in mind.
- The maximum is 250,000 dollars for an eligible single taxpayer.
- The maximum is 500,000 dollars for an eligible married couple filing jointly.
- For a joint return, either spouse can satisfy the ownership test.
- For a joint return, both spouses generally must satisfy the use test.
- Neither spouse can have used the exclusion on another sale in the prior two years.
Imagine you and your spouse bought and lived in your main home for five years, then sell it and calculate a 430,000 dollar gain. If you meet the joint return requirements, the entire 430,000 dollar gain can generally be excluded because it falls within the 500,000 dollar maximum. The IRS Publication 523 guidance details each test, and a tax advisor can confirm you qualify before you list.
Calculate gain from the right starting point
Gain is generally your amount realized from the sale minus your adjusted basis, so the sales price is not the same thing as taxable gain. Building an accurate basis is where many sellers save the most, and the steps below keep the math defensible.
- Start with what you paid for the home as your original basis.
- Add improvements that add value, prolong useful life, or adapt the home to a new use.
- Include items such as an addition, a new roof, a kitchen renovation, or permanent landscaping.
- Leave out ordinary repairs and maintenance, which generally do not raise basis.
- Subtract selling expenses from the amount realized and keep every closing statement and invoice.
A higher documented basis means a smaller gain, so save permits, contractor receipts, and proof of payment. The Publication 523 basis and gain worksheets are a strong framework, and before you sell you should review potential write-offs that may apply to the transaction.
Do not miss a partial exclusion
Selling before two years does not always mean you lose the exclusion entirely. You may qualify for a reduced exclusion when the sale results from a change in place of employment, a health reason, or certain unforeseen circumstances. The amount is generally prorated based on how long you met the ownership and use tests, so a shorter stay can still shelter a meaningful share of your gain. The facts matter, which is why you should read the IRS partial exclusion rules in Publication 523 before assuming a move will or will not qualify, and confirm the proration with a tax advisor.
Know what can make part of the gain taxable
The exclusion is generous, but it has real limits. A portion of your gain may become taxable in the following situations.
- Your gain exceeds the 250,000 dollar or 500,000 dollar maximum that applies to you.
- You fail the ownership, use, or two year lookback rule and do not qualify for a partial exclusion.
- You claimed depreciation for business or rental use after May 6, 1997, since that depreciation related gain generally cannot be excluded.
- You used the home as a rental or had a home office, so special allocation and nonqualified use rules may apply.
- The property is not your main home, such as a second home or investment property.
You also cannot deduct a loss on the sale of a personal residence. Owners who use part of a home for business sometimes layer in strategies like the Augusta rule for S corporation owners, so map the interaction with our tax advisory services before you sell.
Timing and records matter
For a planned sale, gather your paperwork before listing the home so you can substantiate basis and gain without scrambling.
- Your purchase closing disclosure or settlement statement.
- Records for every capital improvement you made.
- Records of prior home office or rental use and any depreciation.
- The final closing disclosure and commission records from the sale.
- Dates showing your ownership and main home use.
This file makes it far easier to calculate gain and decide whether the transaction must be reported. If you receive Form 1099-S, reporting may be required even when all the gain is excludable, so review the IRS Form 1099-S guidance and let a tax advisor confirm the reporting requirement.
How to plan before the sale closes
First, determine whether the property has been your main home for the required period. Next, build a basis file from the purchase closing statement, improvement invoices, permits, contractor receipts, and sale costs, since a higher documented basis reduces gain while missing records make a valid exclusion harder to support.
Then, if you are moving for work, health, or an unforeseen reason before meeting the two year tests, evaluate a partial exclusion before closing rather than assuming a home office or a rental period erases the whole benefit. Finally, coordinate the sale with your other income for the year, because a taxable remainder can affect the net investment income tax, your estimated payments, and your state return. Our tax advisory services help homeowners make those decisions while there is still time to act.
The bottom line on a home sale
The most reliable way to avoid or reduce capital gains tax on a main home sale is to qualify for the home sale exclusion, calculate adjusted basis carefully, and preserve your documentation. Rental use, a home office, divorce, an inherited home, or a recent prior sale can all make the analysis more complicated. Keep your records for as long as they may be needed to support the calculation, and before your next major move, explore your available tax write-offs with a tax advisor.
Let BorisMTax plan your home sale with you
At BorisMTax, we’re experts at tax strategies that turn a home sale into a planned event rather than a filing season surprise. We build your basis file, test your eligibility for the full or partial exclusion, handle depreciation and rental use, and coordinate the sale with the rest of your return. To keep as much of your gain as the law allows, talk with a dedicated tax advisor and schedule your free tax strategy call today.
Frequently asked questions
Q: Do I have to buy another home to avoid capital gains tax?
A: No. The old rollover rule is no longer how the main home exclusion works. Eligibility depends on the ownership, use, and timing tests rather than on buying a replacement residence. Review the IRS sale of your home rules or ask a tax advisor to confirm your facts.
Q: Can I use the exclusion more than once?
A: Yes, but generally not more than once in a two year period. Special exceptions can apply, so check the IRS eligibility rules in Publication 523 and confirm the timing with our tax advisory services before you sell a second home.
Q: Does a married couple need to file jointly for the full exclusion?
A: Generally yes. A couple seeking the 500,000 dollar maximum must file a joint return and satisfy the joint return rules, and filing separately can substantially reduce the available exclusion. A tax advisor can compare both filings, using the IRS Publication 523 tests.
Q: Do I owe tax if I rented the home or claimed depreciation?
A: Often part of it. Depreciation claimed after May 6, 1997 generally cannot be excluded and is taxed even when the rest of your gain qualifies. Special rules also apply to rental and nonqualified use, so review the IRS reporting guidance and plan the sale with our tax advisory services.
