Legal Ways To Reduce or Defer Capital Gains Tax When You Sell Property
You cannot avoid capital gains tax entirely, but you can reduce it or delay paying it through specific rules the IRS allows
When you sell property for more than you paid for it, the profit is a capital gain and is taxable. You cannot make this tax disappear, but the IRS has built-in exceptions and timing strategies that let you pay less or postpone the bill. The most common is the primary residence exclusion, which lets you exclude up to $250,000 of gain if you are single or $500,000 if you are married filing jointly — but only if you meet specific ownership and use tests. Beyond that, you can use 1031 exchanges to swap one investment property for another without triggering tax when ready, or you can time the sale to fall in a lower-income year. You can also donate appreciated property to charity and avoid the tax while getting a deduction. The strategy that works depends on what kind of property you own, how long you have held it, and what you plan to do next.
Key Takeaways
- The primary residence exclusion lets you exclude $250,000 (single) or $500,000 (married) of gain on a home sale if you owned and lived in it for at least two of the last five years.
- A 1031 exchange defers capital gains tax by letting you reinvest the sale proceeds into another investment property of equal or greater value within strict timelines.
- Donating appreciated property to a may have access to charity avoids the capital gains tax and gives you a charitable deduction for the full fair market value.
- Holding property for more than one year before selling qualifies you for long-term capital gains rates, which are lower than short-term rates and ordinary income tax rates.
- Timing a sale in a year when your other income is lower can reduce the tax bracket your gains fall into and lower the total tax owed.
The primary residence exclusion: $250,000 or $500,000 tax-free
If you are selling a home you live in, you can exclude capital gains from tax under Section 121 of the Internal Revenue Code. The exclusion is $250,000 if you file as single, or $500,000 if you are married filing jointly. This applies only to the gain on the sale — the difference between what you paid (your basis, including improvements) and what you sold it for.
To use this exclusion, you must have owned the home and lived in it as your primary residence for at least two of the five years before the sale. The two years do not have to be consecutive, and you do not have to own it for the full five years — you just need to have lived there for two of them. If you are married filing jointly, only one spouse needs to meet the ownership test, but both must meet the use test.
You can use this exclusion once every two years. If you sold another home and used the exclusion within the past two years, you cannot use it again until two years have passed. If you did not live in the home for the full two years — for example, you rented it out for part of the time — you may still may have access to, but the exclusion will be reduced based on the percentage of time you did not use it as your primary residence.
1031 exchanges: Deferring tax by reinvesting in another property
A 1031 exchange, named after Section 1031 of the tax code, lets you sell an investment property and reinvest the proceeds into another investment property without paying capital gains tax at the time of sale. The tax is deferred, not erased — you will owe it when you eventually sell the replacement property, unless you do another 1031 exchange then.
The rules are strict. You have 45 calendar days from the sale of the first property to identify the replacement property in writing. You then have 180 calendar days from the sale to close on the replacement property. The replacement property must be of equal or greater value than the property you sold. If you sell a property for $500,000 and want to do a 1031 exchange, you must reinvest at least $500,000. If you pocket any of the sale proceeds, that amount is taxable when ready.
You cannot do a 1031 exchange with a primary residence. This works only for investment properties — rental homes, commercial buildings, land held for investment, or other business property. You must use a may have access to intermediary to hold the sale proceeds; you cannot touch the money yourself or the exchange fails and the full gain becomes taxable.
Long-term versus short-term capital gains rates
How long you hold a property before selling affects the tax rate on your gain. If you sell within one year of buying, the gain is short-term capital gain and is taxed as ordinary income — at your regular income tax rate, which can be as high as 37 percent at the federal level.
If you hold the property for more than one year, the gain is long-term capital gain and is taxed at lower rates: 0 percent, 15 percent, or 20 percent at the federal level, depending on your total income for the year. Most people fall into the 15 percent bracket. These rates are significantly lower than ordinary income rates, so holding a property longer before selling can save substantial tax.
State and local taxes also explore to capital gains in most states, and some states tax short-term and long-term gains at the same rate. The federal long-term rate is only part of your total bill.
Donating appreciated property to charity
If you own property that has increased in value and you want to support a charity, you can donate the property directly instead of selling it. You avoid the capital gains tax on the appreciation entirely, and you get a charitable deduction for the fair market value of the property at the time of donation.
This works best when the property has appreciated significantly. For example, if you bought land for $50,000 and it is now worth $200,000, donating it to a may have access to charity means you owe no capital gains tax on the $150,000 gain, and you can deduct $200,000 on your tax return (subject to limits based on your adjusted gross income). The charity must be a may have access to organization — the IRS website has a tool to check whether a specific charity qualifies.
You cannot donate to a charity and then buy the property back or retain control of it. The donation must be complete and irrevocable. If you want to continue using the property, this strategy does not work.
Timing the sale to a lower-income year
Capital gains are added to your other income for the year to determine your tax bracket. If you have a year when your other income is unusually low — you took unpaid leave, retired, or had a business loss — selling property that year may result in a lower tax rate on the gain.
For example, if you normally earn $150,000 per year and fall into the 24 percent tax bracket, a $100,000 long-term capital gain would be taxed at 15 percent. But if you have a year when you earn only $50,000, the same $100,000 gain might push you into a higher bracket partway through, but the first portion of the gain could be taxed at 0 percent or 15 percent instead of 20 percent. The math depends on the specific tax brackets for that year and your filing status.
This strategy requires planning ahead. You cannot control when a property sells, but if you have flexibility in timing, consulting a tax professional can show you whether waiting for a lower-income year saves money.
Stepped-up basis at death
If you own property when you die, your heirs receive a stepped-up basis. This means the property's value is reset to its fair market value on the date of death. If your heirs sell it shortly after, they owe capital gains tax only on any appreciation that occurs after your death, not on the gain that accumulated while you owned it.
This is not a strategy you can use yourself — it benefits your heirs. But it is relevant if you are deciding whether to sell property now or hold it. If you hold appreciated property until death, the capital gains tax on the accumulated gain is avoided entirely. The trade-off is that you do not get to use the money during your lifetime, and your heirs may face estate tax if your total estate is large enough.
Installment sales and other timing strategies
An installment sale lets you spread the gain over multiple years by having the buyer pay you in installments rather than a lump sum. You report the gain proportionally as you receive payments, which can keep you in a lower tax bracket each year instead of pushing all the gain into one high-income year.
For example, if you sell property for $500,000 with a $100,000 gain and the buyer pays you $100,000 per year for five years, you report $20,000 of gain each year instead of $100,000 in year one. This works only if the buyer is paying you directly; it does not work if you are financing through a bank.
You must report the sale on Form 6252 and follow specific rules about interest rates and documentation. A tax professional can advise whether this approach fits your situation.
Frequently Asked Questions
Can I use the primary residence exclusion if I rent out part of my home?
You can still use the exclusion, but it is reduced based on the percentage of time the home was not your primary residence. If you rented out one room for two years out of the five-year period, the exclusion is reduced proportionally. The calculation is complex and depends on how the IRS views the rental portion.
What happens if I do a 1031 exchange and the replacement property is worth less than the one I sold?
If the replacement property is worth less, you have received cash back (called "boot"), and that cash is taxable as capital gain in the year of the exchange. The rest of the gain is deferred. You must reinvest at least the full sale price to defer all the gain.
Do I have to pay capital gains tax on inherited property?
No, not on the appreciation that occurred before you inherited it. Your basis is stepped up to the fair market value on the date of death, so you owe tax only on gains that occur after you inherit it. If you sell it when ready, you typically owe little or no capital gains tax.
Can I use a 1031 exchange to buy a primary residence?
No. A 1031 exchange works only for investment property. If you sell an investment property and want to buy a home to live in, you cannot use a 1031 exchange to defer the tax.
What if I sell property at a loss?
Capital losses can offset capital gains. If you sell one property at a $50,000 gain and another at a $30,000 loss, you report a net gain of $20,000. If losses exceed gains, you can deduct up to $3,000 of the excess loss against ordinary income in that year, and carry forward unused losses to future years.
This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.