How to Lower Your Capital Gains Tax on Property Sales

You cannot avoid capital gains tax entirely on a property sale, but you can reduce what you owe through several legal strategies. The most common is the primary residence exclusion: if you owned and lived in your home for at least two of the last five years before selling, you can exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly. This means you only pay tax on the profit above that amount.

Beyond the primary residence exclusion, you can lower your taxable gain by increasing your cost basis—the amount you paid for the property plus the cost of improvements. Keeping receipts for renovations, repairs, and upgrades matters because these add to your basis and reduce your gain. You can also time the sale strategically, use a 1031 exchange to defer taxes by reinvesting in another property, or donate the property to charity if you no longer want it. Each approach has different rules and tax consequences.

Key Takeaways

  • The primary residence exclusion lets you exclude $250,000 (single) or $500,000 (married) of gain if you lived in the home for two of the last five years before selling.
  • Keeping detailed records of home improvements and upgrades increases your cost basis and directly reduces the gain you owe tax on.
  • A 1031 exchange lets you defer capital gains tax by selling one property and buying another similar property within strict timelines.
  • Donating property to a may have access to charity can eliminate capital gains tax, though you cannot deduct the gain itself—only the fair market value.
  • Losses on investment property can offset gains from other sales, though losses on primary residences cannot be deducted.

Using the Primary Residence Exclusion

The primary residence exclusion is the largest tax break available for most homeowners. To use it, you must have owned the property and lived in it as your main home for at least two of the five years before you sell. The two years do not have to be consecutive, and you can have been away for work or other reasons during that time.

If you meet these requirements, you exclude $250,000 of gain if you are single, or $500,000 if you are married filing jointly and both spouses meet the ownership and use test. You report the sale on Form 8949 and Schedule D when you file your tax return. If your gain is less than the exclusion amount, you owe no federal capital gains tax on the sale. If your gain exceeds the exclusion, you pay tax only on the excess.

You can use this exclusion once every two years. If you sold another home in the past two years and used the exclusion then, you cannot use it again until two years have passed from that earlier sale. Some situations—like divorce, death of a spouse, or unforeseen circumstances—allow you to use a partial exclusion even if you have not owned or lived in the home for the full two years.

Documenting Home Improvements to Increase Your Cost Basis

Cost basis is what you paid for the property plus the cost of capital improvements. Capital improvements are upgrades that add value, extend the life of the property, or adapt it to new uses. Repairs and maintenance do not count—replacing a broken window is a repair, but replacing all the windows with new energy-efficient ones is an improvement.

Keep receipts and invoices for any major work: a new roof, new HVAC system, kitchen or bathroom renovation, deck or patio, new flooring, or updated electrical or plumbing. Also save records of the original purchase price, closing costs, and any property taxes or mortgage interest you paid during ownership. When you sell, add the total cost of improvements to your original purchase price to get your adjusted cost basis. Your gain is the sale price minus this adjusted basis.

For example, if you bought a house for $300,000 and spent $50,000 on a kitchen renovation and $30,000 on a roof, your adjusted basis is $380,000. If you sell for $500,000, your gain is $120,000, not $200,000. This reduces your taxable gain by $80,000. Keep these records for at least three years after you sell, because the IRS can audit a property sale within that window.

Using a 1031 Exchange to Defer Taxes

A 1031 exchange (named after Section 1031 of the tax code) lets you sell one investment property and buy another without paying capital gains tax on the sale—as long as you follow strict rules. This is a deferral, not a permanent avoidance: you will eventually owe tax when you sell the replacement property, unless you do another 1031 exchange at that time.

The rules are tight. You have 45 days from the sale of the first property to identify the replacement property in writing. You then have 180 days total from the sale to close on the replacement property. The replacement must be of equal or greater value, and it must be real property held for investment or business use—a rental house, apartment building, or commercial property. You cannot use a 1031 exchange to buy a primary residence or a property you plan to flip and resell quickly.

You must use a may have access to intermediary to handle the money between the sale and purchase. You cannot touch the proceeds yourself, or the exchange fails and you owe tax when ready. The intermediary holds the funds and pays the seller of the replacement property. Many real estate agents and title companies can refer you to may have access to intermediaries in your area. Fees typically run $500 to $1,500 depending on the transaction size.

Donating Property to Charity

If you donate appreciated property to a may have access to charity, you avoid capital gains tax on the gain entirely. You also get a charitable deduction on your tax return for the fair market value of the property at the time of donation. This works best if the property has significant appreciation and you itemize deductions on your tax return.

The property must go to a may have access to organization—typically a 501(c)(3) nonprofit, public charity, or conservation organization. You cannot donate to a private foundation or a donor-advised fund and get the same tax treatment. You will need a may have access to appraisal of the property's fair market value, and you must file Form 8283 with your tax return to claim the deduction.

This strategy makes sense if you no longer want the property, have a strong charitable interest, and the property has appreciated significantly. If you donate a $500,000 house that you bought for $200,000, you avoid $300,000 in capital gains tax and deduct $500,000 on your return. However, if you need the money from the sale, this approach does not work.

Offsetting Gains with Losses from Other Property Sales

If you own investment property that has lost value, you can sell it at a loss and use that loss to offset capital gains from other property sales. Long-term losses (property held over one year) offset long-term gains first, and any remaining loss can offset short-term gains. If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against other income, and carry forward any remaining loss to future years.

This strategy only works for investment property, not your primary residence. Losses on a home you live in cannot be deducted. If you have rental property or land held for investment that has declined in value, selling it strategically in the same year as a profitable sale can reduce your overall tax bill.

For example, if you sell a rental house for a $100,000 gain and sell vacant land for a $40,000 loss, your net gain is $60,000 and you owe tax only on that amount. You would report both sales on Schedule D and the loss automatically reduces your taxable gain.

Timing Your Sale and Understanding Tax Brackets

Capital gains tax rates depend on your total income for the year. Long-term gains (property held over one year) are taxed at 0%, 15%, or 20% depending on your income bracket. Short-term gains (property held one year or less) are taxed as ordinary income at your regular tax rate, which can be much higher. If possible, hold the property for more than one year before selling to may have access to for long-term rates.

You can also time a large sale to spread the gain across two tax years. If you are close to a higher tax bracket, selling in December and January instead of both in one year might keep you in a lower bracket. This works best if you have flexibility on the closing date. Consult a tax professional before timing a sale this way, because state taxes, net investment income tax, and other factors also affect your total bill.

If you expect your income to be lower in a future year—because you are retiring, taking a sabbatical, or have a one-time high-income year—deferring the sale to a lower-income year can reduce your tax rate. Again, this requires planning and professional information to execute correctly.

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. If you rent out a portion—like a basement apartment or guest house—you still may have access to for the exclusion on the whole property. However, the part you rented may be subject to depreciation recapture tax when you sell, which can offset some of the exclusion benefit. Consult a tax professional about your specific situation.

What counts as a capital improvement versus a repair?

A capital improvement adds value, extends the property's life, or adapts it to new uses. Examples: new roof, HVAC system, kitchen renovation, deck, or updated electrical. A repair maintains the property in its current condition. Examples: patching a roof, fixing a broken pipe, or repainting. If you are unsure, keep the receipt—the IRS may challenge it, but documentation helps your case.

Can I do a 1031 exchange on my primary residence?

No. A 1031 exchange only works for investment or business property. Your primary residence does not may have access to. Use the primary residence exclusion instead, which is simpler and does not require a may have access to intermediary or strict timelines.

Do I owe capital gains tax on inherited property?

No. Inherited property receives a "step-up in basis" to its fair market value on the date of death. If you inherit a house worth $500,000 and sell it a month later for $500,000, you owe no capital gains tax because your basis is $500,000. You only owe tax on gains that occur after you inherit it.

What if I sell at a loss—can I deduct it?

Only if the property is investment property. Losses on your primary residence cannot be deducted. If you sell rental property or land held for investment at a loss, you can use that loss to offset capital gains from other sales, or deduct up to $3,000 against other income in that year.