What actually reduces capital gains tax on real estate sales
You cannot avoid capital gains tax entirely on a real estate sale, but you can reduce what you owe through specific strategies that the IRS recognizes. The most common is the primary residence exclusion: if you owned and lived in a house as your main home for at least two of the five years before you sold it, you can exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly. This is the only strategy most homeowners need.
Beyond that, you can defer taxes (push them into the future) rather than eliminate them. A 1031 exchange lets you reinvest the proceeds into another investment property and postpone the tax bill indefinitely, as long as you keep buying investment real estate. You can also spread the tax across multiple years by taking an installment sale, where the buyer pays you over time instead of all at once. Each of these has strict rules about timing and what property qualifies.
Strategies that do not work: you cannot avoid capital gains tax by donating the property to charity, by holding it until death (though your heirs get a tax break), or by renting it out after you sell. The tax is based on when you sell, not what you do with the money afterward.
Key Takeaways
- The primary residence exclusion lets you skip tax on up to $250,000 (single) or $500,000 (married) of profit if you lived in the house for two of the last five years before selling.
- A 1031 exchange defers your tax bill by requiring you to reinvest the sale proceeds into another investment property within strict timelines.
- An installment sale spreads your taxable gain across multiple years as the buyer pays you, which can lower your tax bracket each year.
- Holding property until death does not erase the tax, but your heirs inherit it at a stepped-up basis that can eliminate most or all of the gain.
- Rental income and depreciation recapture are taxed separately and at higher rates than long-term capital gains, so converting a rental back to a primary residence does not save you money.
The primary residence exclusion and who qualifies
This is the simplest and most valuable tool for most people. If you are selling a house you lived in, you likely may have access to. The rule is straightforward: you must have owned the property and used it as your primary residence for at least two of the five years immediately before the sale. The two years do not have to be consecutive, and you do not have to live there on the day you sell.
The exclusion amount depends on your filing status. Single filers exclude up to $250,000 of gain. Married couples filing jointly exclude up to $500,000. If you are married but file separately, each spouse can exclude only $250,000. You can use this exclusion once every two years, so if you sold a home two years ago and used the exclusion, you can use it again now.
The exclusion applies only to gain, not to the full sale price. If you bought a house for $300,000, made $150,000 in improvements, and sold it for $500,000, your gain is $50,000. With the primary residence exclusion, you owe tax on zero dollars. If your gain was $400,000, you owe tax only on $150,000 (the amount over the $250,000 limit for single filers).
How a 1031 exchange defers taxes on investment property
A 1031 exchange (named after the tax code section) lets you sell investment real estate and reinvest the full proceeds into another investment property without paying capital gains tax at that moment. The tax is deferred until you eventually sell the new property without doing another exchange. This can stretch indefinitely if you keep exchanging into new properties.
The rules are strict and timing matters. You have 45 days from the sale closing to identify which property or properties you want to buy next. You then have 180 days total from the sale closing to close on the replacement property. You cannot touch the money yourself; a may have access to intermediary (a neutral third party) must hold it between the sale and the purchase. If you withdraw any of the proceeds, that amount becomes taxable immediately.
Not all real estate qualifies. The property you sell and the property you buy must both be held for investment or business use. Your primary residence does not may have access to. A vacation home you rent out part of the year might may have access to, depending on how much you rent it. Raw land qualifies. Commercial buildings may have access to. You cannot exchange real estate for personal property like a car or equipment.
A 1031 exchange is useful if you want to move your money into a different property but are not ready to pay the tax bill. It does not reduce your total tax burden over your lifetime — it just postpones it. If you eventually sell without exchanging, you will owe tax on all the accumulated gain from every property you owned in the chain.
Installment sales and spreading gains across years
An installment sale is when you sell the property but the buyer pays you over multiple years instead of in one lump sum at closing. You report the gain proportionally as you receive payments, which can lower your taxable income in each individual year and keep you in a lower tax bracket.
This works because capital gains tax is progressive: the more gain you report in a single year, the higher your tax rate. If you have $200,000 in gain and report it all in one year, you might pay 20% federal tax. If you spread that same $200,000 across four years ($50,000 per year), you might pay 15% each year because your total income stays lower. The total tax is less.
The buyer must sign a promissory note agreeing to pay you over time, usually with interest. You report this as a mortgage note receivable on your tax return. The IRS requires you to charge a minimum interest rate (the applicable federal rate, which changes monthly). If you do not charge enough interest, the IRS will impute it and add it to your taxable income.
Installment sales are most useful when you have a large gain and want to manage your tax bracket, or when you want to keep receiving income from the property sale over time. They are less common now because most buyers prefer to finance through a bank rather than directly from the seller.
Stepped-up basis and what happens when you die
If you own real estate when you die, your heirs inherit it at a stepped-up basis. This means the property's value is reset to its fair market value on the date of your death, not what you paid for it. If you bought a rental house for $200,000 and it is worth $500,000 when you die, your heirs inherit it at $500,000 basis. If they sell it immediately for $500,000, they owe zero capital gains tax.
This is not a strategy you can control — it happens automatically. But it is important to understand because it means holding property until death can eliminate the tax burden for your heirs. This is one reason some people do not sell appreciated real estate during their lifetime.
The stepped-up basis applies to the full value of the property at death, regardless of how much gain you accumulated. It applies to both primary residences and investment properties. It does not apply to retirement accounts like IRAs or 401(k)s, which pass to heirs with income tax still owed on the withdrawals.
Depreciation recapture and why rental property is taxed differently
If you owned the property as a rental and claimed depreciation deductions on your tax returns, you will owe depreciation recapture tax when you sell. This is taxed at 25% federal rate, not the 15% or 20% long-term capital gains rate. It applies to the total depreciation you deducted, even if the property did not actually decline in value.
This matters because converting a rental property to your primary residence does not save you money on taxes. If you rented out a house for five years, claimed $50,000 in depreciation, and then moved in and lived there for two years before selling, you still owe recapture tax on that $50,000 at 25%. The primary residence exclusion covers the remaining gain, but not the recapture.
Recapture is separate from capital gains tax. If you sold a rental for a $100,000 gain, with $50,000 of that being depreciation recapture and $50,000 being appreciation, you would owe 25% on the $50,000 recapture and 15% or 20% on the $50,000 appreciation. The total federal tax would be roughly $20,000, not $15,000.
State and local taxes on real estate sales
Federal capital gains tax is only part of the bill. Most states tax capital gains as ordinary income, which means your state rate could be 5%, 10%, or higher depending on where you live. A few states (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming) have no state income tax at all. New Hampshire and Tennessee tax only investment income, not wages.
Some cities and counties also impose local taxes on real estate sales or capital gains. New York City, for example, has a transfer tax. California has no state capital gains tax but does have a state income tax that applies to gains. You need to check both your state and local rules.
The strategies described above (primary residence exclusion, 1031 exchange, installment sale) reduce your federal tax, but they may not reduce state or local tax. Some states conform to federal rules and some do not. A 1031 exchange that defers federal tax might not defer state tax in your state. Check with a tax professional in your state before relying on any strategy.
Frequently Asked Questions
Can I use the primary residence exclusion if I inherited the house?
No. You must have owned the property yourself for two of the five years before the sale. If you inherited it and then sold it within two years, you do not meet the ownership requirement. However, you inherit it at stepped-up basis, so your gain is likely much smaller than the original owner's would have been.
What if I sell my house at a loss?
You cannot deduct a loss on the sale of your primary residence. If you bought for $400,000 and sold for $350,000, you have a $50,000 loss that you cannot use to offset other income. Losses on investment property can sometimes be deducted, but the rules are complex and depend on whether you are a real estate professional.
Do I have to report the sale to the IRS if I do not owe tax?
Yes. Even if your entire gain is covered by the primary residence exclusion, you must report the sale on Form 8949 and Schedule D when you file your tax return. The IRS matches your report to the title company's report, so they will know about the sale regardless.
Can I do a 1031 exchange on my primary residence?
No. A 1031 exchange applies only to property held for investment or business use. Your primary residence does not may have access to, even if you rent out part of it. If you want to defer tax on a primary residence sale, you would need to use a different strategy, and most do not exist.
What is the difference between long-term and short-term capital gains tax?
If you owned the property for more than one year before selling, the gain is long-term and taxed at 0%, 15%, or 20% depending on your income. If you owned it for one year or less, it is short-term and taxed as ordinary income at your regular tax bracket, which could be 10% to 37%. Most real estate sales may have access to for long-term rates because people hold property longer than a year.