What actually reduces capital gains tax on property sales
You cannot avoid capital gains tax entirely on a property sale unless the gain itself is zero or you meet a specific exemption. The most common legal reduction is the primary residence exclusion: if you owned and lived in the home as your main residence for at least two of the five years before sale, you can exclude up to $250,000 of gain (or $500,000 if married filing jointly). This is not a deferral — the gain simply does not count as taxable income.
Beyond that exemption, you reduce the tax by increasing your cost basis — the amount you paid for the property plus documented improvements. The higher your basis, the smaller your taxable gain. You can also time the sale to spread gains across tax years, use losses to offset gains, or donate the property to charity instead of selling it. None of these eliminate the tax, but they lower what you owe.
If you do not meet the primary residence exemption, you still have options, but they require planning before or at the time of sale. Waiting to sell, making capital improvements, or restructuring how you hold the property can all reduce your tax bill — though some strategies have trade-offs or work only in specific situations.
Key Takeaways
- The primary residence exclusion lets you exclude up to $250,000 of gain ($500,000 if married) if you lived in the home two of the last five years — this is the most common way to pay zero tax on a home sale.
- Increasing your cost basis by documenting all improvements, repairs, and closing costs you paid reduces your taxable gain dollar-for-dollar.
- If you do not may have access to for the primary residence exemption, you can defer tax by using a 1031 exchange to roll proceeds into another investment property, though the gain is not erased.
- Donating the property to a may have access to charity avoids capital gains tax entirely, though you must give up ownership and may receive a charitable deduction instead.
- Losses on other investments can offset capital gains from property sales, reducing your overall tax liability in that year.
The primary residence exemption and who qualifies
This exemption is the reason most homeowners pay little or no capital gains tax. You must have owned the property and used it as your primary residence (the place you lived most of the year) for at least two of the five years immediately before the sale. The two years do not have to be consecutive, and you can have lived elsewhere during the other three years.
If you meet this test, you exclude $250,000 of gain if you file single, or $500,000 if you file married filing jointly. If your gain is less than the exclusion, you owe no federal capital gains tax on the sale. If your gain exceeds the exclusion, you pay tax only on the amount above it.
You can use this exemption only once every two years. If you sold another home and used the exclusion within the past two years, you cannot use it again on this sale — though there are narrow exceptions for job changes, health issues, or unforeseen circumstances. The IRS publishes specific rules for these exceptions; consult a tax professional if your situation changed unexpectedly.
Increasing your cost basis through documented improvements
Your cost basis starts with what you paid for the property plus closing costs (title insurance, recording fees, some transfer taxes). Every capital improvement you made — a new roof, kitchen remodel, addition, new HVAC system, or permanent landscaping — adds to your basis. Repairs and maintenance do not count; only improvements that add value, prolong the property's life, or adapt it to new use may have access to.
Keep receipts and invoices for every improvement. When you sell, provide these documents to your tax preparer or accountant. If you paid $300,000 for the home and made $50,000 in documented improvements, your basis is $350,000. If you sell for $500,000, your gain is $150,000, not $200,000. That $50,000 reduction in gain saves you roughly $7,500 to $15,000 in federal tax, depending on your bracket.
Many homeowners lose this deduction because they do not track improvements or cannot find receipts years later. Start a file when you buy the property and add every invoice for work done. If you are selling soon and have old receipts, gather them now — even partial documentation is better than none.
1031 exchanges: deferring tax by reinvesting proceeds
A 1031 exchange (named after the tax code section) lets you sell an investment property and roll the proceeds into another investment property without paying capital gains tax at that time. The tax is deferred, not erased — you will owe it when you eventually sell the second property, unless you do another 1031 exchange then.
This strategy works only for investment or business property, not your primary residence. You must identify a replacement property within 45 days of the sale and close on it within 180 days. The replacement property must be of equal or greater value; if it is worth less, you owe tax on the difference. You cannot touch the sale proceeds yourself — a may have access to intermediary must hold the money and transfer it directly to the new property purchase.
1031 exchanges are complex and have strict timing and documentation rules. Missing a deadline or using the wrong intermediary can disqualify the exchange and trigger immediate tax. Work with a tax professional and a may have access to intermediary before you list the property if you think this route makes sense for you.
Charitable donation as an alternative to sale
If you donate the property to a may have access to charity instead of selling it, you avoid capital gains tax entirely. You also receive a charitable deduction on your tax return for the fair market value of the property (or sometimes the appraised value, depending on the charity and your situation). This works best if the property has appreciated significantly and you no longer need the income from a sale.
The charity must be a may have access to organization — typically a 501(c)(3) nonprofit. Some land trusts, schools, and religious organizations accept property donations. The process is slower than a sale; the charity will appraise the property, and you will need a may have access to appraisal for your tax return. You also lose the ability to sell the property later if your circumstances change.
This option makes sense if you have substantial appreciated property, want to support a cause, and do not need the cash. Consult a tax professional and the charity before committing; some organizations have restrictions on what property they accept.
Using capital losses to offset gains
If you have losses on other investments — stocks, bonds, or other property you sold at a loss — you can use those losses to offset capital gains from your property sale. If you sold a rental property for a $100,000 gain and have $30,000 in investment losses, your net capital gain is $70,000, and you pay tax only on that amount.
Capital losses that exceed your gains in a given year can also offset up to $3,000 of ordinary income (wages, salary, interest). Any losses beyond that carry forward to future years. This is a straightforward tax reduction if you have losses available, but it requires that you actually have other investments with losses — you cannot create losses artificially.
Review your investment portfolio before you sell property. If you have underperforming stocks or other assets, selling them at a loss in the same year as your property sale can reduce your overall tax bill. Work with your tax preparer to coordinate the timing.
Timing the sale across tax years
If your gain is large, selling in one year versus another can spread the tax across two years and potentially lower your overall rate. If you are near the end of a year and expect a large gain, delaying the closing to January might move the gain into a year when your other income is lower, putting you in a lower tax bracket.
This works only if you have control over the timing and if your income varies year to year. If you are retiring, for example, you might sell in the year you retire (when income is lower) rather than the year before. If you are selling a business or investment property alongside the home sale, timing both closings in different years can reduce the impact.
This strategy requires coordination with your accountant and is most useful when your income fluctuates. If your income is stable, the benefit is small. Discuss timing with a tax professional before you list the property.
Frequently Asked Questions
Do I have to live in the home for the full five years before I sell?
No. You must have lived in it as your primary residence for at least two of the five years before the sale. You can have lived elsewhere during the other three years. If you moved out three years ago but owned it the whole time, you still may have access to.
What counts as a capital improvement versus a repair?
A capital improvement adds value, extends the property's life, or adapts it to new use — a new roof, kitchen remodel, addition, or HVAC system. A repair fixes existing damage — patching a roof, repainting, or fixing a broken window. Only improvements increase your basis. Keep receipts for both, but only improvements reduce your taxable gain.
Can I use the primary residence exemption if I inherited the property?
No. You must have owned the property yourself. If you inherited it, you get a "stepped-up basis" — your cost basis is the property's value on the date of death, not what the original owner paid. This can eliminate or reduce capital gains tax, but it is a different rule than the primary residence exemption.
What if I rented out part of my home while I lived there?
If you rented out part of the home (a room, an apartment, or a separate unit), you may not may have access to for the full exemption. The IRS requires that the entire property be your primary residence. Consult a tax professional; the rules depend on how much of the property was rented and for how long.
Is a 1031 exchange worth it if I am going to sell the second property soon anyway?
Only if you plan to hold the second property long enough to benefit from the deferral. If you buy a replacement property and sell it a year later, you have simply delayed the tax bill without reducing it. A 1031 exchange makes sense if you want to reinvest in real estate long-term or if delaying the tax helps your cash flow.