How to Save on Capital Gains Tax When Selling Property

The best way to save on capital gains tax when selling property is to match the right provision to the kind of property you’re selling: the Section 121 exclusion wipes out up to $250,000 of gain for single filers and $500,000 for married couples on a primary residence, a higher cost basis quietly shrinks the taxable number on any sale, holding past one year drops you into long-term rates, a 1031 exchange defers the entire bill on investment property, an installment sale spreads the hit across years, and inherited property gets a fresh basis at death. Most of these stack. The sections below walk through each one and the traps that go with it.

Use the Primary Residence Exclusion

If the property is the home you actually live in, this is the largest single break available. Single filers can exclude up to $250,000 of gain from federal tax, and married couples filing jointly can exclude up to $500,000.1Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence A married couple with $600,000 in gain pays tax on only the $100,000 above the cap.

To get the full exclusion, two tests have to be met within the five-year window ending on the sale date. You must have owned the home for at least two of those five years, and you must have lived in it as your main residence for at least two of them.1Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence The 24 months of residency don’t have to be consecutive. You also can’t have used the exclusion on another sale within the past two years.

Hold on to utility bills, voter registration, and anything else that ties you to the address. If the IRS questions residency, those are the records that settle it.

Partial Exclusion When You Sell Early

Selling before the two-year mark doesn’t automatically kill the break. If the sale was driven by a job move, a health condition, or certain unforeseen circumstances, you can claim a reduced exclusion equal to the months you lived there divided by 24, multiplied by the $250,000 or $500,000 cap.2Internal Revenue Service. Publication 523, Selling Your Home A single filer who lived in the home 18 months before a qualifying job change could still exclude up to $187,500.

Watch for Nonqualified Use

If you used the property as something other than your main home during ownership, part of the gain may not qualify. The IRS allocates gain to those “nonqualified use” periods based on the ratio of that time to your total ownership.3Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Own a house for ten years, rent it the first four, live in it the next six, and roughly 40% of the gain falls outside the exclusion.

One useful carve-out: time after your last day of living in the home doesn’t count as nonqualified use. Live in a house three years, move out, sell two years later, and those final two years don’t reduce the exclusion. Absences for military service or short job and health relocations of two years or less are also excluded from the calculation.3Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

Raise Your Cost Basis

Cost basis is what the IRS treats as your investment in the property. The higher it is, the smaller your taxable gain. Basis starts at the purchase price and grows with capital improvements and certain transaction costs.

Capital Improvements

A capital improvement adds value, extends useful life, or adapts the property to a new use.4Internal Revenue Service. Publication 523, Selling Your Home – Section: Improvements A new roof, an added bathroom, a replaced HVAC system, a kitchen remodel. Routine maintenance doesn’t count. Fixing a leaky faucet or repainting is upkeep.

Buy a home for $300,000, spend $40,000 on a kitchen remodel and $15,000 on a new roof, and your adjusted basis is $355,000. Sell for $600,000 and the gain is $245,000 instead of $300,000. For a single filer, that difference can pull the whole gain inside the $250,000 exclusion.

The catch is paperwork. Save receipts, contractor invoices, and bank statements for every improvement, for as long as you own the home. No records, no higher basis.

Closing Costs on Both Ends

Costs from the original purchase can also go into basis: title insurance, recording fees, survey fees, transfer taxes, and legal fees tied to the purchase.5Internal Revenue Service. Publication 523, Selling Your Home – Section: Fees and Closing Costs Keep the original settlement statement; years later it’s the only place these numbers live.

On the sale side, agent commissions, transfer taxes, escrow fees, and legal fees come off your “amount realized,” which lowers the gain the same way basis would.6Internal Revenue Service. Publication 523, Selling Your Home – Section: Selling Expenses Agent commissions alone usually run 5% to 6% of the sale price. On a $500,000 sale, that’s $25,000 to $30,000 subtracted before the IRS calculates anything.

Hold the Property More Than a Year

Selling within a year of purchase triggers short-term capital gains, taxed at your ordinary income rate. Holding longer than a year drops you to long-term rates, which top out at 20% and can be as low as 0%.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses The clock runs from the day after acquisition through the day of sale.

For 2026, single filers hit the 15% long-term rate on taxable income above $49,450 and the 20% rate above $545,500. Married couples filing jointly reach 15% at $98,900 and 20% at $613,700.8Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates Most home sellers land in the 15% bracket. Pushing a closing from month eleven to month thirteen on an investment property can be worth thousands.

The 3.8% Surtax Higher Earners Need to Plan Around

On top of the capital gains rate, a 3.8% net investment income tax applies to the lesser of your net investment income or the amount your modified adjusted gross income exceeds $200,000 single, $250,000 married filing jointly, or $125,000 married filing separately.9Internal Revenue Service. Topic No. 559, Net Investment Income Tax Those thresholds are set by statute and have never been adjusted for inflation. A couple with $300,000 of modified AGI and a $200,000 property gain can see another $7,600 on top of the regular tax.

Defer the Gain With a 1031 Exchange

If the property is investment or business real estate rather than a personal home, a 1031 like-kind exchange lets you roll the proceeds into a replacement property and defer the entire gain. You can never touch the cash. A qualified intermediary holds the proceeds and sends them directly to the closing on the new property.10Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 Receive the money yourself, even briefly, and the exchange fails.

Since 2018, Section 1031 covers only real property, and the replacement has to be held for investment or business use.11Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment You can swap an apartment building for retail space or vacant land for a rental house. You can’t exchange into a personal vacation home.

The deadlines are unforgiving. From the sale closing of the old property, you have 45 days to identify replacement properties in writing to your qualified intermediary and 180 days total to close on the replacement.12Office of the Law Revision Counsel. 26 U.S. Code 1031 – Exchange of Real Property Held for Productive Use or Investment Miss either and the exchange collapses. Most investors use the three-property rule during the identification window, which lets you name up to three replacements regardless of value.

The exchange gets reported on Form 8824, and the deferred tax carries forward through a reduced basis in the new property.13Internal Revenue Service. Instructions for Form 8824 You can repeat the process indefinitely. Tax only comes due when you eventually sell without starting a new exchange.

Spread the Gain Across Years With an Installment Sale

An installment sale lets you take the sale price in payments over multiple years and recognize gain proportionally as each payment arrives. Any sale with at least one payment after the tax year of closing qualifies.14Office of the Law Revision Counsel. 26 USC 453 – Installment Method If 30% of the price arrives in year one, you report 30% of the gain that year.

This helps most when a lump-sum gain would push you into a higher bracket. Spreading payments can keep annual income inside the 15% long-term bracket instead of jumping to 20% or tripping the 3.8% surtax. Installment income is reported on Form 6252.15Internal Revenue Service. About Form 6252, Installment Sale Income

The trade-off: you’re the lender, and you carry the risk that the buyer stops paying. You also have to charge interest the IRS considers adequate, or it will impute a higher rate. On very large deals where outstanding installment obligations exceed $5 million at year-end, an additional interest charge applies to the deferred tax.

Plan Around Depreciation Recapture on Rentals

If you’ve taken depreciation deductions on a rental or investment property, those deductions come back at sale. Every dollar of depreciation reduces basis, which raises the gain. The portion tied to past depreciation is unrecaptured Section 1250 gain, taxed at a flat rate of up to 25% regardless of your bracket.16Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed The remaining gain above your original purchase price is taxed at standard long-term rates.

Say you bought a rental for $300,000, claimed $80,000 in depreciation, and sold for $400,000. Adjusted basis is $220,000, total gain is $180,000. The first $80,000 is recapture at up to 25%. The other $100,000 runs through the usual 0%, 15%, or 20% rates. Rental owners who skip this calculation can watch an expected $15,000 bill become $35,000.

A 1031 exchange defers recapture along with the rest of the gain, which is why investors lean on exchanges so hard. But if you ever sell the last property in the chain outside an exchange, all the accumulated recapture comes due. The only way to erase it is to hold until death.

Inherited Property Gets a Fresh Basis

Real estate you inherit has its cost basis reset to fair market value on the date the previous owner died.17Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent This step-up erases all the appreciation that built up during the deceased owner’s lifetime. If a parent bought a house for $80,000 and it was worth $400,000 at death, the heir’s basis is $400,000. Sell for $420,000, and the taxable gain is $20,000.

The adjustment runs both directions, so a property worth less at death gets a stepped-down basis. Families with highly appreciated real estate sometimes hold rather than sell during life for exactly this reason: the step-up permanently wipes out capital gains tax, and it wipes out depreciation recapture along with it.

Report the Sale Correctly

Capital gains from property sales go on Schedule D of Form 1040, with transaction detail on Form 8949.18Internal Revenue Service. About Schedule D (Form 1040), Capital Gains and Losses If the entire gain falls inside the Section 121 exclusion, you generally don’t need to report the sale at all unless the closing agent sent you a Form 1099-S. 1031 exchanges go on Form 8824. Installment sales go on Form 6252. Missing a required form can trigger IRS notices even when no tax is owed.

Keep the original purchase settlement statement, every improvement receipt, the sale closing documents, and any 1031 paperwork for at least three years after filing the return that reports the sale. For chained 1031 exchanges, keep the records from every property in the chain until three years after the final, non-exchanged sale is reported.