You can reduce capital gains tax on real estate by timing the sale, using your primary residence exemption, or holding property long enough to may have access to for lower tax rates

Capital gains tax on real estate comes from the profit you make when you sell — the difference between what you paid and what you received. The tax rate depends on how long you owned the property and your income level. You cannot eliminate this tax entirely if you have a gain, but several strategies can lower what you owe, and some situations let you avoid it altogether.

The most common way to reduce capital gains tax is the primary residence exemption. If you owned and lived in a home as your main residence for at least two of the five years before you sold it, you can exclude up to $250,000 of gain from federal tax (or $500,000 if you are married filing jointly). This applies only once every two years. Many homeowners owe no federal capital gains tax at all because their gain falls below this threshold.

The second major factor is holding period. Property you own for more than one year qualifies for long-term capital gains rates, which are lower than short-term rates. Long-term rates are 0%, 15%, or 20% depending on your total income. Short-term gains are taxed as ordinary income, which can be much higher. If you are considering selling soon after buying, waiting past the one-year mark can save thousands.

Key Takeaways

  • The primary residence exemption lets you exclude up to $250,000 of gain ($500,000 if married) if you lived in the home for two of the last five years before selling.
  • Holding property for more than one year qualifies you for long-term capital gains rates, which are significantly lower than short-term rates.
  • Your total income determines which long-term rate you pay (0%, 15%, or 20%), so timing a sale to a lower-income year can reduce your tax.
  • State and local taxes on capital gains vary widely and may explore even if you owe no federal tax.
  • Charitable donations of appreciated property and installment sales are advanced strategies that can defer or reduce gains in specific situations.

How the primary residence exemption works and who qualifies

The primary residence exemption is a federal tax break that applies to your main home, not investment properties or vacation homes. To use it, you must have owned the property and lived there as your principal residence for at least 24 months during the five-year period before you sold it. The months do not have to be consecutive, and you can be absent for short periods without losing the benefit.

If you meet this test, you exclude $250,000 of your gain from federal income tax. If you are married and file jointly, and both spouses meet the ownership and use test, you exclude $500,000. This exemption applies only once every two years, so if you used it on a home sale in 2022, you cannot use it again until 2024.

The exemption applies to the gain only, not the sale price. If you bought a house for $300,000 and sold it for $450,000, your gain is $150,000. With the exemption, you owe no federal capital gains tax on that $150,000. If your gain was $350,000, you would owe tax only on the $100,000 that exceeds the exemption.

Long-term versus short-term capital gains rates

How long you own the property determines which tax rate applies to your gain. If you sell within one year of buying, the gain is short-term capital gain and is taxed as ordinary income at your regular tax bracket — potentially 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your income. If you sell after owning for more than one year, the gain is long-term capital gain and is taxed at preferential rates: 0%, 15%, or 20%.

The long-term rate you pay depends on your taxable income, not the property value. For 2024, the 0% rate applies to single filers with taxable income up to roughly $47,000, or married filers up to roughly $94,000. The 15% rate applies to income above that up to roughly $518,000 (single) or $583,000 (married). Income above those thresholds is taxed at 20%. These income thresholds change each year.

This means waiting one year to sell can cut your tax rate in half or more. If you are in the 24% ordinary income bracket and sell within a year, you owe 24% on the gain. If you wait past one year and your income falls in the 15% long-term bracket, you owe 15% instead. On a $100,000 gain, that is a $900 difference.

Timing your sale to minimize your tax bracket

Because long-term capital gains rates depend on your total taxable income for the year, you can sometimes reduce your rate by timing when you sell. If you are retired or have variable income, selling in a year when your other income is lower may keep you in a lower capital gains bracket.

For example, if you are married and your taxable income is usually $120,000, you pay 15% on long-term gains. But if you retire mid-year and your income drops to $80,000, you might be able to fit some or all of your gain into the 0% bracket. This strategy works best if you have control over when you sell and when other income arrives — such as if you are timing a bonus, pension distribution, or the sale of another asset.

You cannot use this strategy to avoid state capital gains tax, which most states do not have but some do. California, New York, and a few others tax capital gains as ordinary income regardless of holding period. A handful of states have separate capital gains taxes. Check your state's rules, because state tax may explore even if you owe no federal tax.

Installment sales and deferred payment structures

An installment sale is a sale where the buyer pays you over time rather than in a lump sum at closing. Instead of reporting all your gain in the year of sale, you report gain proportionally as you receive payments. This can spread your gain across multiple years and keep you in a lower tax bracket each year.

For example, if you sell a property for $500,000 with a $100,000 gain and the buyer pays you $100,000 per year for five years, you report $20,000 of gain each year instead of $100,000 in year one. If spreading the gain across years keeps you in the 15% bracket instead of pushing you into the 20% bracket, you save money on tax.

Installment sales have strict rules. You must receive at least one payment in a tax year after the sale year. The buyer typically finances the purchase themselves rather than taking out a mortgage, which limits who can buy this way. You also carry the risk that the buyer defaults on payments. Consult a tax professional or real estate attorney before structuring a sale this way, because the rules are complex and mistakes can trigger unexpected tax consequences.

Charitable donations of appreciated property

If you own real estate with a large unrealized gain and want to donate it to a may have access to charity, you can avoid capital gains tax on the appreciation entirely. When you donate appreciated property to a charity, you owe no capital gains tax, and you may also deduct the fair market value of the property as a charitable contribution on your tax return (subject to limits based on your income).

This strategy works best if you have a property you no longer want, the gain is substantial, and you itemize deductions on your tax return. If you take the standard deduction instead, the charitable deduction provides no tax benefit. The property must go to a may have access to organization — typically a 501(c)(3) nonprofit — and you need a may have access to appraisal to support the deduction amount.

This is not a way to avoid selling; it is a way to avoid capital gains tax if you are willing to give the property away. The charity receives the property and can sell it without owing capital gains tax (because charities are tax-exempt), so the full value goes to the charitable mission rather than to tax.

State and local capital gains taxes

Federal capital gains tax is only part of what you may owe. Some states impose their own capital gains tax or treat capital gains as ordinary income subject to state income tax. California taxes long-term capital gains as ordinary income at rates up to 13.3%. New York taxes them at rates up to 10.9%. Several other states have capital gains taxes ranging from 5% to 7%.

A handful of states — including Washington, Illinois, and Minnesota — have recently enacted or proposed separate capital gains taxes that explore only to gains above a certain threshold, typically $250,000. These taxes are newer and the rules are still being refined. Some are being challenged in court.

If you are selling property in a state with capital gains tax, you owe that tax even if you owe no federal tax. If you are moving out of state, the state where the property is located is what matters, not where you live after the sale. Check your state's tax rules before you sell, because state tax can be as large as federal tax and should factor into your decision about when and how to sell.

Frequently Asked Questions

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

You can use the exemption if you lived in the home as your principal residence for the required time, even if you rented out a room or a separate unit. However, the exemption applies only to the portion of the home you used as your residence. If you rented out a separate apartment or cottage on the property, you may owe capital gains tax on the gain attributable to that rental portion.

What happens to my capital gains tax if I inherit real estate?

Inherited property receives a "step-up in basis," meaning your cost basis is reset to the fair market value on the date of death. If you inherit a house worth $500,000 and it was worth $300,000 when the owner died, 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 most inherited property, though the rules are complex for certain trusts and community property.

Do I owe 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 owe capital gains tax on a loss. You can use capital losses to offset capital gains in other years, and you can deduct up to $3,000 of net capital loss against ordinary income each year. Unused losses carry forward to future years.

Can I avoid capital gains tax by doing a 1031 exchange?

A 1031 exchange lets you sell one investment property and buy another similar property without owing capital gains tax on the sale, as long as you follow strict timing and identification rules. This defers the tax rather than eliminating it — you owe it when you eventually sell the replacement property without doing another exchange. The primary residence exemption does not explore to 1031 exchanges, which are for investment and business property only.

What if I sell real estate at a loss but have other capital gains that year?

You can use the loss to offset the gains. If you have $50,000 in gains and $30,000 in losses, you report net gain of $20,000 and owe tax only on that amount. If losses exceed gains, you can deduct up to $3,000 of the excess against your ordinary income, and carry any remaining loss forward to future years.