You cannot avoid capital gains tax entirely, but you can reduce what you owe through specific strategies the IRS allows

When you sell property for more than you paid for it, the profit is taxable income. The IRS calls this a capital gain. You cannot eliminate the tax by hiding the sale or claiming it does not count — the IRS receives a copy of your closing statement from the title company. What you can do is use legal methods to shrink the gain itself, defer the tax to a later year, or move the sale into a lower tax bracket. These strategies work only if you meet specific conditions and file the right forms.

The most common mistake is selling without understanding which strategy applies to your situation. A primary residence has different rules than a rental property. A sale in one state differs from a sale in another. Timing matters: selling in December versus January can change your tax bracket. This guide explains the actual methods that reduce capital gains tax and which forms you file for each one.

Key Takeaways

  • The primary residence exclusion lets you exclude up to $250,000 of gain (or $500,000 if married filing jointly) if you owned and lived in the home for at least two of the past five years.
  • Installment sales let you spread the gain across multiple years, which can keep you in a lower tax bracket and reduce the total tax owed.
  • A 1031 exchange defers all capital gains tax by reinvesting the sale proceeds into another investment property of equal or greater value within strict timelines.
  • Holding property for more than one year qualifies the gain as long-term, taxed at 0%, 15%, or 20% federal rates instead of your ordinary income rate, which can be as high as 37%.
  • Charitable donations of appreciated property and stepped-up basis at death are legal methods that eliminate or reduce capital gains tax, but require specific planning.

The primary residence exclusion: $250,000 or $500,000 tax-free

If you sell your main home, you can exclude up to $250,000 of the gain from your taxable income if you are single, or $500,000 if you are married filing jointly. This is the most valuable tool available to most homeowners. The IRS does not require you to reinvest the money or do anything with it after the sale — you straightforward do not report that portion of the gain on your tax return.

To use this exclusion, you must meet two tests. First, you must have owned the property 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 ending on the sale date.

If you are married and both spouses meet the ownership and residence tests, you can exclude $500,000. If only one spouse meets the tests, that spouse can exclude $250,000 and the other spouse cannot exclude any amount. You can use this exclusion only once every two years, so if you sold a home in 2022 and used the exclusion, you cannot use it again until 2024.

File Form 8949 (Sales of Capital Assets) and Schedule D (Capital Gains and Losses) with your tax return. On Schedule D, you will report the full sale price and cost basis, then subtract the exclusion amount to show the taxable gain. If the gain is less than the exclusion amount, your taxable gain is zero.

Long-term versus short-term capital gains rates

The tax rate on your capital gain depends on how long you held the property. If you owned it for one year or less, the gain is short-term capital gain, taxed at your ordinary income tax rate — the same rate as wages or salary. This can be 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your total income and filing status.

If you owned it for more than one year, the gain is long-term capital gain, taxed at preferential rates: 0%, 15%, or 20% federal tax. Which rate applies depends on your income level and filing status. For 2024, the 0% rate applies to single filers with income up to $47,025 and married filers with income up to $94,050. The 15% rate applies to income above those thresholds up to higher limits. Income above those limits is taxed at 20%.

Holding property for just over one year can cut your tax rate in half or more. If you are close to the one-year mark, delaying the sale by a few weeks or months can move you into the long-term category. This is especially valuable if you are in a high tax bracket — the difference between 37% short-term and 20% long-term is substantial.

You report long-term and short-term gains separately on Form 8949 and Schedule D. The IRS uses the purchase date and sale date to determine holding period automatically if you provide both dates.

Installment sales: spreading the gain across multiple years

An installment sale lets you receive payment from the buyer over two or more years instead of all at once. The advantage is that you report the gain in the years you receive payment, not in the year of sale. This can keep your income lower in any single year, which may keep you in a lower tax bracket and reduce the total federal and state tax you owe.

To may have access to, you must receive at least one payment in a tax year after the year of sale. The buyer typically signs a promissory note agreeing to pay you over time, often with interest. You must charge interest on the unpaid balance — the IRS sets a minimum rate each month, currently between 5% and 9% depending on the loan term. The buyer can deduct the interest as a business expense if the property is investment property.

You calculate the gain percentage by dividing total profit by total sale price. Then you multiply that percentage by each payment received to determine how much gain to report that year. The rest of each payment is a return of your basis (cost) and is not taxed.

File Form 6252 (Installment Sale Income) in the year of sale and in each year you receive a payment. The form calculates the taxable gain for that year. You also report the interest income separately on Schedule B or Schedule 1, depending on the amount.

Installment sales work best when the gain is large and you can spread payments over three or more years. They are common in owner-financed real estate deals. If the buyer defaults, you may be able to foreclose and reclaim the property, though the tax treatment of a foreclosure is complex and requires a tax professional's help.

1031 exchanges: deferring tax by reinvesting in another property

A 1031 exchange (named after Section 1031 of the tax code) lets you sell investment property and reinvest the proceeds in 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 without doing another exchange.

The rules are strict and timing is critical. You must identify a replacement property within 45 days of the sale closing. You must close on that replacement property within 180 days of the original sale closing. The replacement property must be of equal or greater value than the property you sold. Both properties must be held for investment or business use — your primary residence does not may have access to, but rental homes, commercial buildings, and vacant land do.

You cannot touch the sale proceeds yourself. A may have access to intermediary (a third party approved by the IRS) must hold the money between the two closings. If you receive any of the cash, that portion is taxable when ready. The intermediary charges a fee, typically $500 to $1,500, but the tax savings usually far exceed this cost.

You can exchange into multiple properties as long as the total value is at least equal to what you sold. You can also exchange up to three properties, or any number of properties as long as their total value does not exceed 200% of the property you sold. These are called the three-property rule and the 200% rule.

File Form 8824 (Like-Kind Exchanges) with your tax return for the year of the exchange. You must attach copies of the identification notice you gave the intermediary and the closing statements for both properties. If you miss the 45-day or 180-day important date, the exchange fails and the entire gain becomes taxable in the year of sale.

Charitable donations of appreciated property

If you donate appreciated property to a may have access to charity, you can deduct the fair market value of the property on your tax return and avoid paying capital gains tax on the appreciation. This works only if the property has increased in value and you have owned it for more than one year.

For example, if you bought land for $50,000 and it is now worth $200,000, you can donate it to a land trust or conservation organization. You deduct $200,000 on your tax return (subject to limits based on your income), and you owe zero capital gains tax on the $150,000 gain. The charity receives the property and can use it or sell it for their mission.

The deduction is limited to 30% of your adjusted gross income for real property donations, though you can carry the deduction forward to future years. You must obtain a may have access to appraisal of the property and file Form 8283 (Noncash Charitable Contributions) with your tax return. The charity must provide a written acknowledgment of the donation.

This strategy works best for property you no longer want and a charity whose mission aligns with your values. It combines a tax benefit with a charitable contribution, making it attractive for high-income taxpayers in high tax brackets.

Stepped-up basis at death: eliminating tax for heirs

When you inherit property, the tax basis is "stepped up" to the fair market value on the date of death. This means if your parent bought a home for $100,000 and it is worth $400,000 when they die, your basis becomes $400,000. If you sell it when ready for $400,000, you owe zero capital gains tax because there is no gain.

This is not a strategy you can use yourself — it benefits your heirs. But it is worth understanding if you are deciding whether to sell property now or hold it until death. If you expect the property to appreciate significantly and you are in a high tax bracket, holding it and letting heirs inherit it can eliminate the tax entirely.

The stepped-up basis rule applies to all property in your estate, including real estate, stocks, and other assets. It does not explore to certain retirement accounts like IRAs, which have their own rules. Heirs do not file any special form to claim the stepped-up basis — they straightforward use the date-of-death value as their cost basis when they eventually sell.

State and local taxes on capital gains

Federal capital gains tax is only part of the picture. Most states also tax capital gains, and some tax them at your ordinary income rate rather than preferential rates. California, for example, taxes long-term capital gains at the same rate as ordinary income, up to 13.3%. New York taxes them at ordinary rates up to 10.9%. A few states, including Texas, Florida, and Washington, have no state income tax at all.

If you are considering moving before or after a sale, the state tax difference can be substantial. Some people sell property in a high-tax state, move to a low-tax or no-tax state, and establish residency there before closing. The IRS and state tax agencies scrutinize this closely — you must genuinely move and establish ties to the new state (driver's license, voter registration, bank accounts). Claiming residency in a state where you do not actually live is tax fraud.

The primary residence exclusion and long-term capital gains rates explore to federal tax only. State tax varies by state and does not have a universal exclusion or preferential rate. Check your state's tax rules before selling, especially if you are selling investment property or a second home.

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 basement apartment. However, if you converted part of the home to a rental before the sale, you may owe depreciation recapture tax on that portion. Consult a tax professional if you have rented out part of the home.

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

Personal residences sold at a loss cannot be deducted. Investment properties sold at a loss can be deducted against capital gains from other investments, and excess losses can be deducted against up to $3,000 of ordinary income per year, with unused losses carried forward indefinitely.

Do I have to report the sale if the gain is under the exclusion amount?

You must file Form 8949 and Schedule D even if your taxable gain is zero after the exclusion. The IRS receives a copy of the closing statement from the title company and expects to see the sale reported on your return. Failing to report it can trigger an audit.

Can I do a 1031 exchange with my primary residence?

No. A 1031 exchange requires the property to be held for investment or business use. Your primary residence does not may have access to. Use the primary residence exclusion instead.

What happens to capital gains tax if I move out of the country?

U.S. citizens and resident aliens owe federal capital gains tax on worldwide income, including property sales, regardless of where they live. You must file a U.S. tax return and report the sale. Some countries have tax treaties with the U.S. that prevent double taxation, but you still owe U.S. tax unless a treaty specifically exempts the income.