What actually reduces capital gains tax on real estate sales
You cannot avoid capital gains tax entirely on a profitable real estate sale, but you can reduce what you owe through specific strategies that are built into tax law. The most common approach is the primary residence exclusion: if you owned and lived in a house as your main home for at least two of the five years before you sell, you can exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly. This is not a deferral—the gain simply does not count as taxable income.
Beyond that exclusion, the main strategies involve either deferring the tax to a later year, reducing your taxable basis (the amount you owe tax on), or structuring the sale in a way that spreads gains across multiple tax years. Each has different requirements and different consequences. None of these are loopholes; they are all part of standard tax code that the IRS expects people to use.
The strategy that works for you depends on what kind of property you own, how long you have owned it, whether you live in it, and what your income looks like. A rental property has different options than a vacation home. A property you inherited has different rules than one you bought twenty years ago.
Key Takeaways
- The primary residence exclusion lets you exclude up to $250,000 (single) or $500,000 (married) of gain if you lived in the home for two of the last five years before selling.
- A 1031 exchange defers capital gains tax by reinvesting the sale proceeds into another investment property of equal or greater value within strict timelines.
- Installment sales spread the gain across multiple years, which may lower your tax bracket and reduce what you owe in any single year.
- Inherited property receives a "step-up in basis," meaning your taxable gain is calculated from the property's value on the date of death, not the original purchase price.
- Charitable donations of appreciated property and opportunity zone investments are specialized strategies that require specific circumstances and professional guidance.
The primary residence exclusion and who qualifies
If you sell a house you have lived in, the IRS lets you exclude a portion of your gain from taxable income. For a single filer, the exclusion is $250,000. For married couples filing jointly, it is $500,000. This means if you bought a house for $300,000, lived in it for three years, and sold it for $700,000, your gain is $400,000—but you would only report $150,000 as taxable income (as a single filer).
The requirement is straightforward: you must have owned the property and lived in it as your primary residence for at least two of the five years immediately before the sale. The two years do not have to be consecutive. If you owned the house for ten years but only lived in it for the last two years, you still may have access to. If you lived in it for three years, moved out, rented it for two years, then sold it, you still may have access to because you met the two-of-five test.
You can use this exclusion only once every two years. If you sold a home and used the exclusion in 2022, you cannot use it again until 2024. There are narrow exceptions if you had to move for work, health reasons, or unforeseen circumstances, but those require documentation and IRS approval.
1031 exchanges for investment and rental properties
A 1031 exchange (named after the tax code section) lets you sell one investment property and buy another without paying capital gains tax on the sale—as long as you reinvest all the proceeds and follow strict rules. This is a deferral, not a permanent avoidance: you will eventually owe the tax when you sell the second property, unless you do another 1031 exchange at that time.
The mechanics are rigid. You have 45 calendar days from the sale of your first property to identify the replacement property in writing. You have 180 calendar days from the sale to close on the replacement property. The replacement property must be of equal or greater value, and it must be held for investment or business use—meaning rental properties, commercial buildings, or land held for development. You cannot use a 1031 exchange to buy a primary residence or a vacation home you plan to use personally.
You must use a may have access to intermediary—a third party that holds the sale proceeds and coordinates the purchase. You cannot touch the money yourself, or the exchange fails and you owe the tax immediately. The intermediary charges a fee, usually $500 to $1,500, but the tax savings often justify the cost on larger sales.
A 1031 exchange works best if you want to move your investment into a different property but are not ready to cash out and pay tax. Many investors chain multiple exchanges over decades, continuously deferring the tax until they eventually sell without reinvesting.
Installment sales and spreading gains across years
An installment sale is when you sell the property but the buyer pays you over time rather than all at closing. Instead of reporting the entire gain in the year of sale, you report a portion of it each year as you receive payments. This can lower your taxable income in any single year and may keep you in a lower tax bracket.
For example, if you sell a rental property for $500,000 with a $200,000 gain, and the buyer pays you $100,000 per year over five years, you report $40,000 of gain each year instead of $200,000 in year one. If your income is high in the year of sale, spreading the gain across five years might save you thousands in taxes by keeping you in a lower bracket.
The downside is that you are financing the buyer yourself—you do not receive all the cash at closing, and you carry the risk that the buyer defaults. You also owe tax on the gain each year even though you have not received all the money yet. This strategy works best when you have other income to cover the tax bill and when you trust the buyer's ability to pay.
Step-up in basis for inherited property
When you inherit real estate, the tax basis is "stepped up" to the property's fair market value on the date of the owner's death. This is one of the most powerful tax tools available, and it happens automatically—you do not have to do anything to claim it.
Here is how it works: if your parent bought a house in 1980 for $100,000 and it is worth $600,000 when they die in 2024, your basis becomes $600,000. If you sell it immediately for $600,000, you have zero gain and owe no capital gains tax. If you hold it for five years and sell for $650,000, you owe tax only on the $50,000 gain, not the $550,000 appreciation that happened while your parent owned it.
This step-up applies to all inherited property—real estate, stocks, bonds, and other assets. It is not limited by value, and there is no income limit. The only requirement is that the property was actually inherited (passed through an estate or trust) rather than gifted during the owner's lifetime. If your parent gave you the house as a gift while alive, you inherit their original basis and owe tax on all the appreciation.
Charitable donations and opportunity zones
If you donate appreciated real estate to a may have access to charity, you can deduct the fair market value of the property and avoid capital gains tax on the appreciation entirely. This works best for property you have held a long time and that has appreciated significantly.
The requirements are strict: the charity must be a may have access to organization (most established nonprofits may have access to), and you must itemize deductions on your tax return for the deduction to matter. You also need a professional appraisal of the property's value. This strategy makes sense only if you were already planning to donate to charity and the property is worth enough that the tax savings justify the appraisal cost.
Opportunity zones are a different tool: if you invest capital gains from a sale into a may have access to opportunity zone fund within 180 days, you can defer the tax on those gains. The deferred tax is due in 2026 or when you sell the opportunity zone investment, whichever comes first. This is a deferral, not a permanent reduction, and it requires investing in specific geographic areas designated by the Treasury Department. Opportunity zone investments are complex and carry their own risks; they work best with professional guidance.
What does not work and common misconceptions
You cannot avoid capital gains tax by reinvesting the proceeds into stocks, bonds, or other investments. Only a 1031 exchange (for investment property) or a charitable donation (for any property) actually defers or eliminates the tax. Buying a new primary residence does not reduce your tax on the sale of the old one, though the primary residence exclusion may eliminate the tax entirely if you meet the requirements.
You also cannot reduce capital gains tax by timing the sale to a year when your income is lower, unless you use an installment sale to actually spread the gain across multiple years. Simply delaying the sale does not change your tax liability—the gain is the same whether you sell this year or next year.
Holding the property longer does not reduce the tax rate. Long-term capital gains (property held over one year) are taxed at a lower rate than short-term gains, but once you have held it over a year, holding it longer does not lower the rate further. The rate depends on your income bracket, not on how long you owned the property.
Working with a tax professional on your specific situation
Capital gains tax on real estate involves details that vary by state, by your income level, by how long you owned the property, and by what you plan to do with the proceeds. A tax professional or CPA can model different scenarios and tell you which strategy saves the most money in your situation.
Before you list the property, it is worth spending $200 to $500 on a consultation with a tax professional who understands real estate. They can review your purchase price, the current value, your income, and your plans, then tell you whether the primary residence exclusion applies, whether a 1031 exchange makes sense, or whether an installment sale would help. That conversation often pays for itself many times over.
If you inherited property, a professional can confirm whether the step-up in basis applies and what your actual basis is for tax purposes. If you own rental property, they can review whether you have been deducting depreciation (which affects your basis and your tax when you sell) and what your actual tax liability will be.
Frequently Asked Questions
Do I have to live in a house for the full two years before I sell to use the primary residence exclusion?
No. You need to have owned and lived in the house for two of the five years before the sale, but those years do not have to be consecutive or recent. If you owned it for ten years but only lived in it for the last two years before selling, you may have access to. If you lived in it for three years, moved out, and sold it two years later, you still may have access to.
Can I do a 1031 exchange if I want to buy a vacation home or a house to live in?
No. A 1031 exchange works only for investment or business property—rental houses, commercial buildings, land held for development. You cannot use it to buy a primary residence or a vacation home you plan to use personally. If you sell a rental property and want to buy a house to live in, you will owe capital gains tax on the sale.
What happens to the step-up in basis if I inherited property but did not sell it right away?
The step-up applies on the date of death, regardless of when you sell. If your parent died when the house was worth $600,000 and you sell it five years later for $700,000, your basis is still $600,000 and you owe tax only on the $100,000 gain. The step-up does not change based on how long you hold the property after inheriting it.
Can I use both the primary residence exclusion and a 1031 exchange on the same property?
No. The primary residence exclusion applies only to homes you lived in. A 1031 exchange applies only to investment property. A house cannot be both at the same time. If you lived in a house and then rented it out, you can use the primary residence exclusion only if you sell within a certain window after moving out; after that, it becomes investment property and you would use a 1031 exchange instead.
If I sell at a loss, do I get a tax deduction?
Not usually. Capital losses on personal residences are not deductible. If you sell a rental property at a loss, you can deduct the loss against other capital gains, and any excess loss can offset up to $3,000 of ordinary income per year, with unused losses carrying forward to future years. Consult a tax professional about how losses in your situation work.