You cannot avoid capital gains tax on a property sale, but you can reduce what you owe through specific rules that explore to your situation

Capital gains tax is the federal tax on profit when you sell property for more than you paid for it. The profit itself—not the sale price—is what gets taxed. If you bought a house for $300,000 and sold it for $400,000, your capital gain is $100,000, and that $100,000 is subject to tax.

You cannot eliminate this tax by timing the sale, using a particular deed type, or transferring the property to someone else before selling. But the tax code does contain several real mechanisms that reduce or defer what you owe: the primary residence exclusion, the stepped-up basis rule, installment sales, and like-kind exchanges. Each applies only in specific circumstances, and each has strict requirements. Understanding which ones fit your situation is the difference between owing tax on your full gain and owing tax on a smaller amount—or deferring the tax entirely.

Key Takeaways

  • The primary residence exclusion lets you exclude up to $250,000 of gain (or $500,000 if married filing jointly) when you sell a home you have lived in for at least two of the past five years.
  • A stepped-up basis resets the cost basis of inherited property to its value on the date of death, which can eliminate capital gains tax if you sell soon after inheriting.
  • An installment sale spreads the gain—and the tax on it—across multiple years, which may lower your tax rate if it keeps you in a lower bracket.
  • A like-kind exchange (Section 1031) defers capital gains tax when you sell investment property and reinvest the proceeds into similar property within strict timelines.
  • Capital gains tax rates depend on your income level and filing status, and long-term gains (property held over one year) are taxed at lower rates than short-term gains.

The Primary Residence Exclusion: The Most Common Way to Reduce Tax

If you sell a home you have lived in as your primary residence for at least two of the past five years, you can exclude $250,000 of the gain from federal tax (or $500,000 if you are married filing jointly). This is not a deferral—the gain straightforward does not count as taxable income. It is the single largest tax break available on property sales.

The two-year requirement is flexible. You do not need to have lived there continuously; you only need to have lived there for 24 months total during the five-year window before the sale. If you moved for work, health reasons, or an unforeseen circumstance, you may also may have access to for a partial exclusion even if you do not meet the two-year test. The IRS publishes a list of may have access to reasons on Form 8949.

This exclusion applies only to your primary residence, not to investment properties, vacation homes, or rental properties. If you rent out part of the home or claim a home office deduction, the IRS may reduce the exclusion proportionally. State taxes do not automatically follow the federal exclusion, so you may still owe state capital gains tax even if you owe nothing to the federal government.

Stepped-Up Basis: How Inherited Property Gets a Tax Reset

When you inherit property, its cost basis—the value used to calculate your gain when you eventually sell—is reset to its fair market value on the date the previous owner died. This is called a stepped-up basis. If your parent bought a house for $100,000 and it was worth $400,000 when they died, your basis becomes $400,000. If you sell it a year later for $410,000, your gain is only $10,000, not $310,000.

The stepped-up basis applies automatically to inherited property; you do not need to file anything special to claim it. However, the estate must report the property's value on the federal estate tax return (Form 706) if the total estate exceeds the federal exemption amount. For deaths in 2024, that exemption is $13.61 million per person. Most estates do not owe federal estate tax, but the return is still required to establish the stepped-up basis value.

This rule is particularly valuable when property has appreciated significantly. If you inherit investment real estate that has doubled in value, the stepped-up basis can eliminate most or all of the capital gains tax you would have owed if the original owner had sold it. The downside is that this benefit applies only to inherited property, not to property you receive as a gift during someone's lifetime.

Installment Sales: Spreading the Gain Across Multiple Years

An installment sale is a sale where you do not receive all the payment in the year of sale. Instead, the buyer pays you over two or more years. You report the gain proportionally across each year you receive payment, which can keep you in a lower tax bracket and reduce your overall tax liability.

For example, if you sell investment property with a $100,000 gain and receive $30,000 in year one and $70,000 in year two, you report roughly $30,000 of gain in year one and $70,000 in year two. If your other income is lower in year two, the additional gain may be taxed at a lower rate. This is a deferral, not an elimination—you still owe tax on the full gain, but you may owe less because of the tax brackets you fall into each year.

Installment sales require a promissory note and formal documentation. The buyer must make a down payment of at least 10 percent in the year of sale, and you must charge interest at the IRS's applicable federal rate (which changes monthly). If you do not charge enough interest, the IRS will impute it. This method works best when you have significant other income in the year of sale and expect lower income in future years.

Like-Kind Exchanges: Deferring Tax on Investment Property

A like-kind exchange under Section 1031 of the tax code lets you sell investment property and reinvest the proceeds into similar property without paying capital gains tax on the sale. The tax is deferred, not eliminated—when you eventually sell the replacement property, you owe tax on the combined gain from both sales.

The rules are strict. You have 45 days from the sale of the original property to identify the replacement property in writing, and you have 180 days total to close on it. The replacement property must be of "like kind"—for real estate, this means any real property held for investment or business use. A rental house can be exchanged for commercial land, or vice versa. Your primary residence does not may have access to.

You cannot touch the sale proceeds yourself; they must go to a may have access to intermediary, who holds the money and transfers it to the seller of the replacement property. If you receive any cash or take out a loan against the property, you owe tax on that amount. Like-kind exchanges are complex and require careful timing and documentation. A real estate attorney or tax professional should review the transaction before you proceed.

How Tax Rates Affect What You Actually Owe

Capital gains tax rates depend on how long you held the property and your income level. Long-term capital gains—gains on property held for more than one year—are taxed at 0 percent, 15 percent, or 20 percent depending on your taxable income and filing status. Short-term capital gains—gains on property held for one year or less—are taxed as ordinary income, which can be as high as 37 percent.

For 2024, the 15 percent long-term rate applies to most people. The 0 percent rate applies only if your taxable income is below $47,025 (single) or $94,050 (married filing jointly). The 20 percent rate applies if your income exceeds $518,900 (single) or $583,750 (married filing jointly). These thresholds change annually for inflation.

This is why holding property for longer than one year almost always reduces your tax. A $100,000 gain taxed as short-term capital gains at your ordinary income rate could cost $37,000 in federal tax. The same gain taxed as long-term capital gains at 15 percent costs $15,000. State taxes vary widely and may add 5 to 13 percent on top of the federal rate, depending on where you live and where the property is located.

State Capital Gains Taxes and Local Considerations

Federal capital gains tax is only part of the picture. As of 2024, most states do not have a separate capital gains tax, but some do. California, New York, Oregon, Washington, and a few others tax capital gains as ordinary income or at a special rate. Some states tax only gains above a certain threshold, like $250,000.

If you sell property in a state different from where you live, you may owe tax to both states. A few states offer credits to prevent double taxation, but not all. If you are considering a move before selling property, the state tax difference can be substantial. Consulting a tax professional in the state where the property is located is worth the cost if the gain is large.

Frequently Asked Questions

Can I avoid capital gains tax by selling to a family member at a discount?

No. The IRS calculates your gain based on the fair market value of the property, not the price you actually received. If you sell below market value, you have still realized the full gain, and you owe tax on it. Selling to a family member does not change the tax outcome.

What if I rent out my primary residence after I sell it—do I lose the exclusion?

No. The exclusion applies based on how you used the property before the sale, not after. If you lived in the home for two of the past five years and then sold it, you may have access to for the exclusion even if you rented it out in the years before the sale. However, if you claimed depreciation deductions on a rental portion, the exclusion may be reduced.

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

If you are selling your primary residence and your gain is less than $250,000 (or $500,000 if married), you still report the sale on Form 8949 and Schedule D, but you will owe no federal tax. Reporting it prevents the IRS from questioning why you did not report the transaction. Your state may have different reporting requirements.

Can I use a 1031 exchange to defer tax on my primary residence?

No. Section 1031 exchanges explore only to investment property and property held for business use. Your primary residence does not may have access to, even if you later rent it out. Use the primary residence exclusion instead.

What happens to capital gains tax if I die before selling the property?

Your heirs inherit the property with a stepped-up basis, which means they owe no capital gains tax on the appreciation that occurred during your lifetime. This is one of the largest tax benefits in the code and applies automatically to all inherited property.