What actually reduces capital gains tax on real estate
You cannot avoid capital gains tax entirely on a profitable real estate sale, but you can reduce what you owe through specific strategies the IRS allows. The most common method is the primary residence exclusion: if you owned and lived in a 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 not a deferral — the gain straightforward does not count as taxable income.
Beyond that exclusion, your options fall into two categories: strategies that reduce your taxable gain in the year you sell, and strategies that push the tax into a future year. Reducing your gain means lowering your sale price relative to what you paid, or raising your cost basis (the amount you are treated as having paid). Deferring means using a structure that lets you reinvest the proceeds without triggering tax when ready.
The strategy that works for you depends on whether you are selling a primary home, a rental property, or investment land, and whether you want to buy another property or straightforward cash out. Each path has different rules and different tax consequences.
Key Takeaways
- The primary residence exclusion lets you avoid tax on up to $250,000 (single) or $500,000 (married) of gain if you lived in the home for two of the last five years before selling.
- A 1031 exchange defers capital gains tax by letting you reinvest sale proceeds into another investment property, but the replacement property must be identified within 45 days and closed within 180 days.
- Raising your cost basis through documented improvements, property taxes, and closing costs reduces your taxable gain dollar-for-dollar.
- Installment sales let you spread the gain across multiple tax years, which may lower your overall tax if you move into a lower tax bracket.
- Charitable donations of appreciated real estate can eliminate capital gains tax on that property while generating a charitable deduction.
The primary residence exclusion and who qualifies
If you are selling a home you lived in, the primary residence exclusion is the easiest way to reduce or eliminate capital gains tax. You must have owned the property and used it as your main home for at least two of the five years when ready before the sale. The two years do not have to be consecutive, and you can have rented it out after you moved away — what matters is that you lived there for the required time.
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 gets $250,000. You can use this exclusion only once every two years, so if you sold a home in 2022 and excluded gain, you cannot use it again until 2024.
Example: You bought a house for $300,000, lived in it for four years, then sold it for $550,000. Your gain is $250,000. If you are single, you exclude all $250,000, and you owe no federal capital gains tax. If your gain had been $400,000, you would exclude $250,000 and owe tax on the remaining $150,000.
1031 exchanges for rental and investment property
A 1031 exchange is a structure that lets you sell investment property and reinvest the proceeds into another investment property without paying capital gains tax in the year of 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 and timing is critical. After you close the sale of your current property, you have 45 calendar days to identify the replacement property in writing. You then have 180 calendar days from the sale closing to actually close on the replacement property. If you miss either important date, the entire transaction fails and you owe capital gains tax on the original sale. You must use a may have access to intermediary — a third party who holds the sale proceeds and handles the reinvestment — and you cannot touch the money yourself.
The replacement property must be of equal or greater value, and it must be investment or business property. You cannot use a 1031 exchange to sell a rental house and buy a primary residence. You can exchange real estate for real estate of any type: apartment building for raw land, office building for storage units, commercial property for farmland.
A 1031 exchange does not reduce your tax; it postpones it. But deferral has value if you are reinvesting the proceeds anyway, because you keep more money working for you in the meantime.
Increasing your cost basis to lower taxable gain
Your cost basis is the amount you are treated as having paid for the property. The higher your basis, the lower your taxable gain when you sell. You can increase your basis by documenting capital improvements — permanent upgrades that add value or extend the life of the property.
Capital improvements include a new roof, foundation repair, room additions, new HVAC systems, kitchen or bathroom renovations, and permanent landscaping. They do not include routine maintenance like painting, repairs, or lawn care. Keep receipts and invoices for all work done, and photograph the finished result. When you sell, provide these documents to your tax preparer so they can add the improvement costs to your basis.
You can also increase basis by including closing costs paid at purchase (title insurance, survey, recording fees, some attorney fees) and property taxes paid before the sale. Some of these may already be in your basis if you deducted them in prior years, so review your old tax returns before claiming them again.
Installment sales and spreading gain across years
An installment sale is a sale where you receive payment over more than one year. Instead of receiving the full sale price at closing, the buyer pays you in installments, and you report the gain proportionally across the years you receive payments. This can lower your overall tax if the gain pushes you into a higher tax bracket in a single year.
Example: You sell a rental property with a $200,000 gain. If you receive the full amount in one year, all $200,000 is taxable in that year, potentially pushing you into the 20% long-term capital gains bracket. If instead you structure the sale so the buyer pays you $50,000 per year for four years, you report $50,000 of gain each year, which may keep you in the 15% bracket all four years. The total tax is lower.
Installment sales require a promissory note signed by the buyer, and you must charge interest at the IRS minimum rate (which changes quarterly). The buyer must be creditworthy enough to make the payments, because if they default, you have a claim against them but no property to reclaim. Consult a real estate attorney before structuring an installment sale, because the terms affect both your tax and your legal rights.
Charitable donations of appreciated property
If you donate appreciated real estate to a may have access to charity, you avoid capital gains tax on the appreciation entirely. You also receive a charitable deduction equal to the fair market value of the property at the time of donation.
Example: You own land you bought for $100,000 that is now worth $300,000. If you sell it, you owe capital gains tax on the $200,000 gain. If you donate it to a may have access to charity instead, you owe no capital gains tax, and you can deduct $300,000 on your tax return (subject to the limits on charitable deductions, which depend on your income and filing status).
The charity must be a may have access to organization — generally a nonprofit, religious institution, government agency, or educational institution. The property must be real estate; you cannot donate a mortgage or a lease. Work with the charity and a tax professional to document the fair market value, because the IRS requires an appraisal for donations over $5,000.
Timing the sale and your tax bracket
Capital gains tax rates depend on your ordinary income tax bracket. Long-term capital gains (property held over one year) are taxed at 0%, 15%, or 20% depending on your total income. Short-term gains (property held one year or less) are taxed as ordinary income at your regular rate, which can be much higher.
If you are close to the edge of a tax bracket, delaying the sale by a few months or a year can move the gain into a lower bracket. If you are retired and have low income in a given year, selling in that year may result in a 0% capital gains rate on some or all of the gain. Conversely, if you are in a high-income year, deferring the sale to the next year might save you thousands.
This strategy requires planning ahead. Work with a tax professional in the fall before the year you plan to sell, so you can model the tax impact and decide whether to move forward or wait.
Frequently Asked Questions
Can I use the primary residence exclusion if I rented out the house after I moved?
Yes, as long as you owned and lived in the home for at least two of the five years before the sale. You can have rented it out for the remaining years. However, if you claimed depreciation deductions while renting it, you will owe tax on the depreciation recapture (the amount you deducted) at a 25% rate, separate from capital gains tax.
What happens if I miss the 45-day important date in a 1031 exchange?
If you do not identify a replacement property within 45 days, the 1031 exchange fails and you owe capital gains tax on the original sale in that tax year. The important date is strict — weekends and holidays do not extend it. Mark the date on your calendar and work with your intermediary to submit the identification in writing before the important date.
Do I have to pay capital gains tax if I sell at a loss?
No. If you sell for less than you paid, you have a capital loss, not a gain. You cannot deduct a loss on the sale of a primary residence. On investment property, you can use capital losses to offset capital gains from other sales, and up to $3,000 of excess loss against ordinary income in a single year.
Can I do a 1031 exchange with a primary residence?
No. A 1031 exchange applies only to investment or business property. If you sell a primary residence, you use the primary residence exclusion instead. If you convert a primary residence to a rental property, you can do a 1031 exchange on the next sale, but you cannot use the primary residence exclusion.
What if I inherited the property — does that change the capital gains tax?
Yes. Inherited property receives a "stepped-up basis" equal to its fair market value on the date of death, not what the deceased paid for it. If you inherit a house worth $500,000 that the deceased bought for $200,000, your basis is $500,000. If you sell it when ready for $500,000, you have no gain and owe no capital gains tax. This applies to all inherited property, not just real estate.