You can reduce the federal capital gains tax on a property sale in several ways: exclude up to $250,000 (single) or $500,000 (married filing jointly) of profit on a primary residence, increase your cost basis with improvements and selling costs, hold the property more than a year to qualify for lower long-term rates, defer investment-property gains through a like-kind exchange, spread the profit across years with an installment sale, or offset the gain with capital losses. Which levers apply depends on whether the property was your home or an investment.
Exclude Up to $500,000 on a Primary Residence
The biggest single tax break belongs to homeowners. If the property was your main home, you can exclude up to $250,000 of gain as a single filer, or up to $500,000 filing jointly, from federal capital gains tax.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Gain inside those limits is simply not taxed.
To claim the full exclusion, you must have owned the home and used it as your primary residence for at least two of the five years before the sale. Those two years don’t have to be consecutive. For a married couple, both spouses must meet the use test, but only one has to meet the ownership test. You can generally use the exclusion only once every two years.
Partial Exclusion If You Sell Early
Selling before you hit the two-year mark doesn’t always cost you the entire break. If the sale is driven by a job change, a health issue, or another unforeseen circumstance recognized by the IRS, you can claim a prorated portion of the exclusion based on how long you actually lived in the home. A single filer forced to sell after one year for a qualifying job move, for example, could still exclude up to $125,000.
Military and Foreign Service Extension
If you or your spouse are on qualified official extended duty in the uniformed services or Foreign Service, you can elect to suspend the five-year test period for up to 10 years.2eCFR. 26 CFR 1.121-5 – Suspension of 5-Year Period for Certain Members of the Uniformed Services and Foreign Service The clock effectively pauses while you’re stationed elsewhere. You make the election by excluding the gain on your return for the year of the sale.
One boundary to note: the primary-residence exclusion is only for a home you actually lived in. Rental properties, vacation homes used mainly for personal enjoyment, and pure investment property don’t qualify, and neither does the Net Investment Income Tax hit an excluded gain.
Raise Your Cost Basis
Your taxable gain is the sale price minus your adjusted basis, not minus what you originally paid. Anything that legitimately raises your basis shrinks your gain.
Capital Improvements, Not Repairs
Improvements that add value, extend the property’s useful life, or adapt it to a new use increase basis. Adding a room, installing a new roof, or replacing an entire HVAC system all qualify. Routine maintenance does not. The IRS specifically excludes interior and exterior painting, fixing leaks, filling cracks, and replacing broken hardware.3Internal Revenue Service. Selling Your Home – Publication 523 Improvements that are no longer part of the home (carpet you later tore out, for instance) can’t be counted either. Save receipts throughout ownership; you’ll need them to document basis at sale.
Selling Expenses
Costs tied directly to the sale also come off your gain. Real estate commissions, advertising, legal fees, and any loan charges you paid that were normally the buyer’s responsibility all reduce the profit you report. Commissions alone, commonly 5% to 6% of the sale price, can move the number substantially.
Stepped-Up Basis on Inherited Property
If you inherited the property, your basis is generally its fair market value on the date the previous owner died, not what they paid.4Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent If a parent bought a home for $100,000 and it was worth $400,000 at death, your basis starts at $400,000. Selling soon after inheriting often means little or no taxable gain.
Hold the Property More Than One Year
Sell within a year of purchase and any profit is a short-term capital gain, taxed at your ordinary income rate, which can reach 37%. Hold for more than a year and the gain qualifies for long-term capital gains rates, which are much lower.5Internal Revenue Service. Topic No. 409, Capital Gains and Losses The holding period runs from the day after acquisition through the day of sale. Crossing the one-year line by a single day can meaningfully cut the rate.
For 2026, the long-term rates are 0%, 15%, or 20%, depending on taxable income and filing status:6Internal Revenue Service. Revenue Procedure 2025-32 – 2026 Adjusted Items
- 0% rate: taxable income up to $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household)
- 15% rate: taxable income above the 0% threshold but not exceeding $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household)
- 20% rate: taxable income above the 15% threshold
Most sellers land in the 15% bracket. If you have flexibility on closing date, timing the sale to keep your total taxable income inside a lower bracket for the year can save thousands.
Defer Investment Gains With a 1031 Exchange
A like-kind exchange under Section 1031 lets you defer capital gains tax when you sell business or investment property and reinvest the proceeds into another qualifying property.7Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment The tax isn’t erased; your original basis rolls into the new property. Personal residences and vacation homes used mainly for personal enjoyment don’t qualify.
Use a Qualified Intermediary
You cannot take possession of the sale proceeds at any point, even briefly, or the exchange fails and the full gain becomes taxable. Federal regulations provide a safe harbor: a qualified intermediary holds the funds from the sale and applies them toward the replacement property.8Internal Revenue Service. Revenue Procedure 2003-39
Meet the 45-Day and 180-Day Deadlines
Two strict deadlines apply. You have 45 days from the sale of your original property to identify potential replacements in writing, and 180 days from the sale to close on one. Miss either and the exchange is disqualified.
Within the 45-day window, you can identify up to three potential replacements of any value. To identify more than three, the combined value generally cannot exceed 200% of what you sold. Getting the identification rules wrong is treated as identifying nothing at all.
Spread the Gain With an Installment Sale
If the buyer pays you over time and at least one payment arrives after the tax year of the sale, you can report the gain on the installment method rather than recognizing all of it up front.9Office of the Law Revision Counsel. 26 USC 453 – Installment Method Splitting the income across years can hold you inside a lower bracket and reduce the average rate applied to the gain.
Each payment is broken into three pieces: return of basis, taxable gain, and interest. The taxable share is set by your gross profit ratio, which is total expected profit divided by total contract price. A 40% ratio means $4,000 of every $10,000 in principal is taxable gain. Interest is taxed separately as ordinary income.
Report the sale each year on Form 6252.10Internal Revenue Service. About Form 6252, Installment Sale Income The agreement must charge interest at or above the Applicable Federal Rate the IRS publishes monthly; below that, the IRS will treat part of the sale price as imputed interest and recompute your tax. Weigh the risk of buyer default before choosing this structure.
Offset the Gain With Capital Losses
If other investments are sitting at a loss, selling them in the same year as the property can cut your taxable gain. The IRS lets you net capital gains against capital losses across the year.
Netting follows a set order. Short-term losses offset short-term gains first, and long-term losses offset long-term gains first. Any excess in one category then crosses over to the other. That crossover is especially valuable against short-term gains, which would otherwise be taxed at ordinary rates.
If total losses exceed total gains, you can use up to $3,000 of the excess ($1,500 if married filing separately) to reduce ordinary income.11Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Anything above that carries forward to future years, where it can offset future gains or trim ordinary income by the same annual cap. Keep careful records of carried-forward losses.
Watch for Depreciation Recapture and NIIT
Two extra taxes can eat into the savings from the strategies above, and both apply mainly to investment property.
If you claimed depreciation on a rental, selling triggers depreciation recapture. Every year of depreciation lowered your basis, and the portion of the gain attributable to those deductions is taxed at up to 25%, higher than the standard 15% long-term rate.5Internal Revenue Service. Topic No. 409, Capital Gains and Losses Buy a rental for $300,000, take $50,000 in depreciation, and sell for $400,000: the gain is $150,000, with the first $50,000 taxed at up to 25% and the remaining $100,000 at your long-term rate. A 1031 exchange defers both the capital gain and the recapture.
Higher-income sellers also owe a 3.8% Net Investment Income Tax on top of the capital gains rate. It applies to the lesser of net investment income or the amount by which modified AGI exceeds $250,000 (married filing jointly), $200,000 (single or head of household), or $125,000 (married filing separately).12Internal Revenue Service. Topic No. 559, Net Investment Income Tax Gain from investment real estate, rentals, and second homes counts.13Internal Revenue Service. Questions and Answers on the Net Investment Income Tax A high-income investment sale can face an effective 23.8% federal rate. NIIT does not apply to any portion of gain excluded under the primary-residence rules, so a home sale that fits inside the $250,000 or $500,000 exclusion escapes the surtax.
State Tax and Reporting
Federal tax is only part of the bill. Many states also tax capital gains, some at rates above 10%, some not at all. Check your state’s treatment before estimating what you’ll owe.
Report the sale federally on Schedule D of Form 1040, which pulls in both short-term and long-term capital gains and losses.14Internal Revenue Service. About Schedule D (Form 1040), Capital Gains and Losses Depending on the situation, you may also file Form 8949 for transaction detail, Form 6252 for an installment sale, or Form 8997 if you hold a Qualified Opportunity Fund. Keeping organized records of purchase price, improvements, selling expenses, and dates throughout ownership is the single best thing you can do to keep the final tax bill from being larger than it needs to be.