You cannot avoid capital gains tax entirely, but you can reduce it or delay it through specific strategies
Capital gains tax is owed on the profit you make when you sell property for more than you paid for it. The tax applies whether the property is your home, rental real estate, or land. However, the law contains several mechanisms that let you pay less tax or push the tax to a later year — and one major exclusion that eliminates the tax altogether on primary residences under certain conditions.
The strategies available to you depend on what kind of property you own, how long you have owned it, and whether you meet specific requirements set by the IRS. Some require planning before you sell; others are available to you automatically when you file your return. Understanding which ones explore to your situation is the difference between paying full tax on your gain and paying significantly less.
Key Takeaways
- If you own a primary residence and meet the ownership and use tests, you can exclude up to $250,000 of gain from tax (or $500,000 if married filing jointly) — this is automatic when you file, not something you explore for separately.
- Long-term capital gains (on property held more than one year) are taxed at lower rates than short-term gains, so timing your sale can reduce your tax bill substantially.
- You can defer capital gains tax by using a 1031 exchange to reinvest the proceeds into another investment property, though the rules are strict and timing is tight.
- Installment sales, charitable donations of appreciated property, and step-up basis at death are other mechanisms that reduce or eliminate capital gains tax, each with specific requirements.
- Your income level determines which capital gains tax rate applies to you, so managing other income in the year of sale can lower your effective tax rate.
The primary residence exclusion: up to $250,000 tax-free (or $500,000 if married)
If the property you are selling is your main home, you may not owe any capital gains tax at all. The IRS allows you to exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly. This exclusion is not a deduction you claim — it is automatic when you report the sale on your tax return.
To use this exclusion, you must meet two tests. First, you must have owned the home for at least two of the five years before the sale. Second, you must have lived in it as your primary residence for at least two of those same five years. The two years do not have to be consecutive, and they do not have to be the most recent two years, but they must fall within the five-year window.
If you are married filing jointly, both spouses must meet the ownership and use tests separately — you cannot combine one spouse's two years with the other's. If you are divorced or widowed, special rules may allow you to still use the $500,000 exclusion in the year of sale or shortly after.
This exclusion applies 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.
Long-term versus short-term capital gains rates
The tax rate on your capital gain depends on how long you owned the property. If you held it for more than one year, it is a long-term capital gain. If you held it for one year or less, it is a short-term capital gain.
Short-term gains are taxed as ordinary income, using the same tax brackets as your wages or salary. For 2024, those brackets range from 10% to 37% depending on your total income. Long-term gains are taxed at preferential rates: 0%, 15%, or 20%, depending on your income level. For most people, long-term rates are substantially lower.
This means that waiting to sell property until you have owned it for more than one year can cut your tax bill significantly. If you are in the 37% ordinary income bracket and your gain would be taxed at 20% as a long-term gain instead, you save 17 percentage points on every dollar of profit. On a $100,000 gain, that is $17,000 in tax savings.
Your income in the year of sale also matters. Long-term gains are stacked on top of your other income, so if you can shift income to a lower-income year or spread the sale proceeds over multiple years, you may drop into a lower capital gains bracket.
1031 exchanges: deferring tax by reinvesting in another property
A 1031 exchange (named after the section of the tax code) allows you to sell investment property and reinvest the proceeds into another investment property without paying capital gains tax on the sale. The tax is deferred, not eliminated — you will owe it when you eventually sell the replacement property, unless you do another 1031 exchange at that time.
The rules are strict. You have 45 days from the sale of the first property to identify the replacement property in writing. You have 180 days from the sale to close on the replacement property. The replacement property must be of equal or greater value, and it must be held for investment or business use — you cannot exchange into a primary residence. You must use a may have access to intermediary to hold the funds; you cannot touch the money yourself, or the exchange fails and you owe tax when ready.
A 1031 exchange is useful if you own rental property or land and want to move your investment into a different property without triggering a large tax bill. It is not available for primary residences, and it does not reduce tax — it only postpones it. The replacement property also "steps into the shoes" of the original property for depreciation purposes, so you continue depreciating from where the prior owner left off.
Installment sales: spreading the gain over multiple years
If you sell property and the buyer pays you over time rather than all at once, you have an installment sale. You can report the gain proportionally as you receive each payment, rather than reporting all of it in the year of sale. This spreads your taxable gain across multiple years, which may keep you in a lower tax bracket each year.
For example, if you sell property for $500,000 with a $100,000 gain, and the buyer pays you $100,000 per year over five years, you report $20,000 of gain each year instead of $100,000 in year one. If your income is lower in years two through five, your capital gains rate may be lower in those years, reducing your total tax.
Installment sales require you to report interest income as well as the gain, and there are rules about the minimum interest rate you must charge. You must also file Form 6252 with your tax return each year you receive a payment. This strategy works best when you have a buyer willing to pay over time and when you expect your income to be lower in future years.
Charitable donations of appreciated property
If you donate appreciated property to a may have access to charity, you avoid capital gains tax on the appreciation entirely. You also receive a charitable deduction for the fair market value of the property at the time of donation.
This works because when you donate property, you are not selling it — no sale means no capital gain. The charity receives the property at its current value and can sell it without owing tax (charities are tax-exempt). You get the deduction on your tax return, which reduces your taxable income.
This strategy is most valuable when you have a large gain on property you no longer need and you itemize deductions on your tax return. If you take the standard deduction, the charitable deduction may not save you any tax. You must donate to a may have access to organization (the IRS website has a searchable list), and you must obtain a may have access to appraisal if the property is worth more than $5,000.
Step-up basis at death
When you inherit property, its tax basis is "stepped up" to its fair market value on the date of death. This means if your parent bought a home for $200,000 and it is worth $500,000 when they die, your basis is $500,000, not $200,000. If you sell it when ready, you owe no capital gains tax.
This is not a strategy you can use yourself — it benefits your heirs. But it is relevant if you are considering whether to sell property now or hold it until death. Holding until death eliminates capital gains tax for your heirs, though it may trigger federal estate tax if your total estate is large enough. The federal estate tax exemption is substantial (over $13 million per person in 2024, though this amount changes yearly), so for most people, step-up basis is a significant advantage of holding appreciated property until death.
Managing your income in the year of sale
Capital gains are stacked on top of your other income for tax purposes. This means the tax rate you pay on your gain depends on your total income for the year. If you can reduce your other income in the year you sell property, you may keep more of your gain in the lower capital gains brackets.
For example, if you are self-employed, you might defer invoicing clients until the following year. If you have investment income, you might harvest losses to offset gains. If you are retired and can choose when to take distributions from retirement accounts, you might delay them until the year after the sale. These moves do not reduce the gain itself, but they reduce the tax rate applied to it.
This strategy requires planning and is most effective when you know in advance that you will sell property. It is less useful if the sale is unexpected or if your other income is fixed (like wages from an employer).
Frequently Asked Questions
Can I use the primary residence exclusion if I rent out part of my home?
Yes, as long as you live in the home as your primary residence. The IRS does not disqualify you for renting out a room or a separate unit. However, if you claimed depreciation deductions on the rental portion, you must recapture that depreciation when you sell — meaning you will owe tax on the depreciation you deducted, even if you use the exclusion on the rest of the gain.
What if I sell property at a loss?
Capital losses on personal property like your primary residence cannot be deducted. Losses on investment property or land can be deducted against capital gains, and up to $3,000 of excess losses can be deducted against ordinary income each year. Unused losses carry forward to future years indefinitely.
Do I have to report the sale if my gain is under the exclusion amount?
You must report the sale on Form 8949 and Schedule D, even if your gain is fully excluded by the primary residence exclusion. The IRS needs to see the calculation to verify you meet the ownership and use tests. Failure to report can trigger an audit.
Can I do a 1031 exchange on my primary residence?
No. A 1031 exchange is only for investment or business property. If you sell your primary residence, you use the primary residence exclusion instead. These are separate rules for different types of property.
What if I inherited property and then sold it — do I owe capital gains tax?
Only on the gain after you inherited it. Your basis is stepped up to the fair market value on the date of death, so any gain between the original purchase and the death date is not taxed. You owe tax only on appreciation after you inherited it, and only if you held it for more than one year (making it long-term gain).