You can reduce capital gains tax through the primary residence exclusion, or defer it by reinvesting proceeds into another property or a like-kind exchange

The most common way to avoid capital gains tax on property is the primary residence exclusion. If you sell a home you lived in for at least two of the last five years, you can exclude up to $250,000 of gain from taxation (or $500,000 if you're married filing jointly). This means if you bought a house for $300,000, lived there for three years, and sold it for $450,000, your $150,000 gain would be entirely tax-free.

If the primary residence exclusion doesn't cover your full gain, or you're selling investment property, you have other options. You can defer taxes by using a 1031 exchange to reinvest the proceeds into another property. You can also spread the gain over multiple years through an installment sale. Each method has different rules about timing, property types, and what you must do with the money.

The strategy that works depends on what kind of property you own, how long you've held it, and whether you want to keep investing in real estate or cash out. Understanding each option helps you make a decision that fits your situation.

Key Takeaways

  • The primary residence exclusion lets you exclude up to $250,000 of gain ($500,000 if married) when you sell a home you lived in for at least two of the last five years.
  • A 1031 exchange defers all capital gains tax if you reinvest the full sale proceeds into another property of equal or greater value within strict timelines.
  • An installment sale spreads your gain across multiple years, which may lower your tax bracket and reduce the total tax owed.
  • Holding property for more than one year qualifies you for long-term capital gains rates, which are lower than short-term rates.
  • Basis step-up at death allows heirs to inherit property at its market value on the date of death, erasing the original owner's gain from taxation.

Primary Residence Exclusion: The most direct path for homeowners

If you own and live in a home, you can exclude capital gains when you sell it. The IRS allows you to exclude up to $250,000 of gain if you're single, or $500,000 if you're married filing jointly. The only requirements are that you 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. If you bought a house, lived there for one year, moved away for two years, then moved back and lived there for another year before selling, you meet the requirement. The IRS counts any 24 months within the five-year window.

This exclusion applies once every two years. If you sold a home and used the exclusion, you cannot use it again until two years have passed. The exclusion covers only the gain on the sale — if you sold at a loss, there is no tax benefit and no limit on how often you can sell.

1031 Exchange: Deferring tax by reinvesting in another property

A 1031 exchange (named after Section 1031 of the tax code) lets you defer all capital gains tax by reinvesting the sale proceeds into another property. You do not pay tax on the gain in the year of the sale; instead, the gain carries forward to the new property. If you eventually sell that property and do another 1031 exchange, you can defer again indefinitely.

The rules are strict. You must identify a replacement property within 45 days of selling the original property, and you must close on that replacement within 180 days. You cannot touch the money yourself — a may have access to intermediary (a third party approved by the IRS) must hold the proceeds during this time. If you withdraw any of the money, that portion becomes taxable when ready.

The replacement property must be of equal or greater value than the property you sold, and it must be "like-kind" — meaning real property for real property. You can exchange a rental house for commercial land, or an apartment building for a farm. You cannot exchange real property for personal property like a car or equipment.

1031 exchanges are common for investors who want to move money between properties without triggering a tax bill. They require careful planning and working with a may have access to intermediary to meet the timelines.

Installment Sale: Spreading the gain across multiple years

An installment sale is when you sell property but the buyer pays you over time in installments rather than all at once. Instead of recognizing all the gain in the year of sale, you recognize it proportionally as you receive payments. This can lower your tax burden by spreading the gain across multiple tax years.

If you sell a property for $500,000 and the buyer pays $100,000 per year for five years, you report one-fifth of your gain each year. If your gain is $100,000 total, you report $20,000 of gain per year. Spreading the gain may keep you in a lower tax bracket each year, reducing the total tax owed compared to recognizing the full gain in one year.

You must report the sale using Form 6252 (Installment Sale Income) with the IRS. The buyer typically pays interest on the unpaid balance, which is income to you but also deductible to the buyer. This method works best when you are comfortable acting as the lender and the buyer is creditworthy.

Long-term vs. short-term capital gains rates

How long you hold property affects the tax rate on your gain. If you sell property you owned for more than one year, your gain is taxed as long-term capital gain. Long-term rates are 0%, 15%, or 20% depending on your income level. If you sell property you owned for one year or less, your gain is taxed as short-term capital gain, which is taxed at your ordinary income tax rate — potentially as high as 37%.

For investment property and rental homes, holding the property for more than one year before selling significantly reduces your tax rate. This is one reason investors often hold properties for years rather than flipping them quickly.

The holding period starts the day after you acquire the property and ends the day you sell it. If you bought on January 15 and sold on January 15 of the following year, you have held it for exactly one year and may have access to for long-term rates.

Basis step-up at death: How heirs can avoid tax

When you inherit property, the tax basis (the value used to calculate gain) is "stepped up" to the property's market value on the date of death. This means if your parent bought a house for $200,000 and it was worth $500,000 when they died, your basis becomes $500,000. If you sell it when ready for $500,000, you have no gain and pay no capital gains tax.

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 until death. Holding until death erases all accumulated gain from taxation, though the property will be subject to estate tax if your total estate exceeds the federal estate tax threshold (which varies by year and is currently very high).

The step-up applies only to property you inherit, not to property you gift during your lifetime. If you give property to someone while you are alive, they inherit your original basis, not the stepped-up basis.

Losses and other tax considerations

If you sell property at a loss, you cannot deduct the loss on your personal tax return — capital losses on personal residences are not deductible. However, if you sell investment property or rental property at a loss, you can use that loss to offset capital gains from other investments, and excess losses can offset up to $3,000 of ordinary income per year. Unused losses carry forward to future years.

Depreciation recapture is another consideration for rental and investment property. If you claimed depreciation deductions while you owned the property, you must "recapture" that depreciation when you sell — meaning you pay tax on it at a 25% rate, separate from capital gains tax. This applies even if you use a 1031 exchange to defer the capital gains portion.

State and local taxes also explore to capital gains in most states. Some states tax capital gains at ordinary income rates; others have separate capital gains tax rates. A few states have no capital gains tax. Your state's rules affect the total tax you owe on a sale.

Frequently Asked Questions

Can I use the primary residence exclusion if I rent out part of my home?

You can still use the exclusion if you rent out part of the home, but only if the rented portion is a small part of the property and you use the rest as your primary residence. If you rent out a separate unit or more than a small portion, the IRS may treat the entire property as investment property and deny the exclusion. The rules depend on the specific facts of your situation.

What happens if I do a 1031 exchange but the replacement property costs less than the sale price?

If the replacement property costs less, you have "boot" — the difference between what you sold for and what you bought for. You must pay capital gains tax on the boot amount in the year of the exchange. For example, if you sold for $500,000 and bought for $400,000, you owe tax on $100,000 of gain.

Do I have to live in a home for two full years to use the primary residence exclusion?

No, you need two years within the five years before the sale, and they do not have to be consecutive. If you lived there for one year, moved away for three years, then moved back for one year before selling, you meet the requirement. The IRS counts any 24 months in the five-year window.

Can I use a 1031 exchange for my primary home?

Technically yes, but it is rarely useful. If you live in the home, you can use the primary residence exclusion instead, which is simpler and covers up to $250,000 or $500,000 of gain with no reinvestment required. A 1031 exchange makes sense for investment property, not owner-occupied homes.

What if I inherited property and want to sell it soon — do I still owe capital gains tax?

No. When you inherit property, your basis steps up to its market value on the date of death. If you sell it shortly after inheriting it for approximately the same value, you have little or no gain and owe no capital gains tax, even if the original owner held it for decades and it appreciated significantly.