You cannot avoid capital gains tax entirely, but you can reduce what you owe through specific strategies
Capital gains tax is the federal tax on profit when you sell property for more than you paid for it. The IRS does not allow you to skip this tax, but the law does create several legitimate routes to lower your bill: holding the property longer to may have access to for lower tax rates, using the primary residence exemption, timing the sale across tax years, or reinvesting proceeds into certain types of property. Which strategy works depends on your situation — how long you have owned the property, whether it is your home, your income level, and your plans for the money after the sale.
This guide explains the real mechanisms the tax code offers. It does not cover tax avoidance schemes or illegal strategies. It also does not replace advice from a tax professional, especially if you own multiple properties or have a high sale price.
Key Takeaways
- The primary residence exemption lets you exclude up to $250,000 (or $500,000 if married filing jointly) of gain from federal tax if you owned and lived in the home for at least two of the last five years.
- Long-term capital gains rates (15% or 20% for most people) are lower than short-term rates (your ordinary income tax rate), so holding property for more than one year before selling reduces your tax bill.
- Timing a sale to fall in a lower-income year, or splitting the sale across two tax years, can move you into a lower tax bracket and reduce what you owe.
- A 1031 exchange lets you reinvest the full sale proceeds into another investment property without paying capital gains tax at the time of sale, though the tax is deferred, not erased.
- State and local taxes on capital gains vary widely; some states have no capital gains tax at all, while others tax gains as ordinary income.
The primary residence exemption: up to $250,000 or $500,000 tax-free
If the property you are selling is your main home, you may be able to exclude a portion of your gain from federal tax. The primary residence exemption allows you to exclude up to $250,000 of gain if you are single, or up to $500,000 if you are married filing jointly. This is not a deferral — the gain is simply not taxed.
To use this exemption, you must have 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, and you do not have to live there at the time you sell. If you owned it for two years but rented it out for the third year, you still may have access to. If you sold another home and used this exemption within the past two years, you cannot use it again until two years have passed.
Example: You bought a house for $200,000, lived in it for four years, and sold it for $550,000. Your gain is $350,000. You can exclude $250,000 (if single), leaving $100,000 subject to capital gains tax. If you are married filing jointly, you exclude the full $350,000 and owe no federal capital gains tax on this sale.
Long-term versus short-term capital gains rates
How long you owned the property before selling it determines which tax rate applies. Short-term capital gains — on property held one year or less — are taxed as ordinary income. Long-term capital gains — on property held more than one year — are taxed at lower rates: 0%, 15%, or 20%, depending on your total income for the year.
For 2024, the 15% long-term rate applies to most people. The 20% rate applies only if your income is very high (over $578,750 if single, or $693,750 if married filing jointly). The 0% rate applies if your income is low enough that you fall into the lowest tax bracket. Because long-term rates are substantially lower than ordinary income tax rates (which can reach 37%), holding property for more than one year before selling can save thousands of dollars.
Example: You bought a rental property for $100,000 and sold it for $150,000 after 11 months. Your $50,000 gain is short-term and taxed at your ordinary rate — say 24%. You owe $12,000 in federal tax. If you had waited one month to hit the one-year mark, the same $50,000 would be taxed at 15%, costing $7,500. Waiting one month saved $4,500.
Timing the sale to lower your tax bracket
Capital gains are added to your other income for the year, which can push you into a higher tax bracket. If you have control over when you sell, you can time the sale to a year when your other income is lower, keeping your total income — and your tax rate — down.
This works best if you are between jobs, taking a sabbatical, retiring mid-year, or have unusually low income in a particular year. You can also split a large sale across two tax years by closing the sale in December of one year and the deed transfer in January of the next, though the exact timing rules depend on your state and the type of property. A tax professional can model the numbers for your specific situation.
Example: You plan to retire at the end of June and sell investment property in July. Your income for the year will be only six months of salary plus the capital gain. If you had sold in December while still working full-time, your gain would have been added to a full year of salary, pushing you into a higher bracket. Selling after retirement keeps your total income lower and your tax rate down.
1031 exchanges: deferring tax by reinvesting in property
A 1031 exchange (named after the section of the tax code) lets you sell one investment property and reinvest the proceeds into another investment property without paying capital gains tax at the time of 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. You must identify a replacement property within 45 days of selling the first property, and close on it within 180 days. The replacement property must be of equal or greater value, and both properties must be held for investment or business use (your primary home does not may have access to). You cannot touch the sale proceeds yourself; a may have access to intermediary must hold the money during the exchange. If you fail to meet the timelines or property requirements, the entire gain becomes taxable immediately.
1031 exchanges are complex and require professional help. The intermediary fees, title work, and legal review typically cost $1,000 to $3,000, so they make sense only if your gain is substantial. They are most useful if you plan to keep reinvesting in property and want to defer taxes over many years or decades.
State and local capital gains taxes
Federal capital gains tax is only part of your bill. Most states also tax capital gains, and the rates vary widely. Some states have no capital gains tax at all (including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming). Others tax capital gains as ordinary income, which can add 5% to 13% to your federal bill depending on the state.
A few states — California, New York, and Oregon — have high capital gains taxes specifically on investment property or high-income gains. If you are selling a high-value property, moving to a state with no capital gains tax before the sale can save tens of thousands of dollars, though you must establish residency legitimately and meet that state's requirements for how long you must live there before the sale.
Check your state's tax authority website or speak with a tax professional about your state's rules. State taxes can sometimes exceed federal taxes, so they should not be overlooked in your planning.
Charitable donations and stepped-up basis for heirs
If you donate appreciated property to a may have access to charity, you avoid capital gains tax on the gain and also receive a charitable deduction. This works best for property that has appreciated significantly and that you no longer need.
A stepped-up basis is a different strategy: if you hold property until death, your heirs inherit it at its fair market value on the date of your death, not at your original purchase price. This means if you bought land for $50,000 and it is worth $500,000 when you die, your heirs can sell it immediately and owe capital gains tax only on gains after your death. This is not tax avoidance — it is how the tax code treats inherited property — but it is worth understanding if you are planning your estate.
Frequently Asked Questions
Can I avoid capital gains tax by not reporting the sale?
No. The IRS receives a copy of the closing statement from your title company or real estate agent. Unreported sales are audited regularly, and penalties for underreporting income are steep — typically 20% of the unpaid tax, plus interest. Reporting the sale and using legitimate strategies to reduce your tax is always better than not reporting it.
What if I sell at a loss?
Capital losses can offset capital gains, and if your losses exceed your gains, you can deduct up to $3,000 of the loss against ordinary income in a single year. Excess losses carry forward to future years. This does not reduce your tax bill directly, but it can lower your taxable income.
Does the primary residence exemption apply to a second home or vacation property?
No. The exemption applies only to your primary residence — the home where you live most of the year. A vacation home, investment property, or former primary residence that you no longer live in does not may have access to, even if you owned and lived in it for two of the last five years.
If I do a 1031 exchange, do I ever have to pay the capital gains tax?
Yes, eventually. The tax is deferred, not erased. When you sell the replacement property, you owe tax on the original gain plus any new gain from the second property — unless you do another 1031 exchange. Some people chain exchanges together for decades, deferring tax indefinitely, but the tax liability remains.
Do I need a tax professional to handle this?
For a simple primary residence sale that qualifies for the exemption, you may not need one. For investment property, multiple properties, high-value sales, or 1031 exchanges, a tax professional or CPA can model your options, ensure you meet all requirements, and often save far more than their fee costs.