The main ways to lower capital gains tax on a home sale
The largest tax break available to most homeowners is the primary residence exclusion: you can exclude up to $250,000 of gain from taxation if you are single, or $500,000 if you are married filing jointly. This applies only if you owned and lived in the home as your main residence for at least two of the five years before the sale. If you meet that test, you owe no federal tax on the first $250,000 or $500,000 of profit, whichever applies to you.
Beyond that exclusion, the remaining strategies involve either reducing your taxable gain (the difference between what you paid and what you sold for) or timing the sale to your tax advantage. The most practical of these are adjusting your cost basis to account for home improvements, understanding state and local tax rules, and coordinating the sale with other income in the year you sell.
State taxes on capital gains vary widely. Some states do not tax capital gains at all. Others tax them as ordinary income, which can be significantly higher than federal rates. A few states have separate capital gains tax rates. Knowing your state's rules before you sell can change whether you owe $5,000 or $15,000 in total tax.
Key Takeaways
- The primary residence exclusion lets you exclude $250,000 (single) or $500,000 (married) of home sale profit from federal tax if you lived there two of the last five years.
- Capital improvements you made to the home — new roof, kitchen remodel, addition — add to your cost basis and reduce your taxable gain dollar-for-dollar.
- State capital gains tax rates range from zero to over 13 percent, so your state of residence at the time of sale matters as much as federal tax.
- Timing the sale to spread income across two tax years, or coordinating it with a year of lower income, can reduce your overall tax burden.
How to increase your cost basis with home improvements
Your cost basis is what you originally paid for the home plus the cost of any improvements you made. When you sell, your taxable gain is the sale price minus your basis. Every dollar you add to your basis reduces your gain by one dollar.
Capital improvements are different from repairs. A repair fixes something that is broken — replacing a rotted board, patching a roof leak, repainting a wall. Those do not increase basis. A capital improvement adds value, prolongs the life of the home, or adapts it to a new use — a new roof, a kitchen renovation, an addition, new HVAC system, or solar panels. Keep receipts and invoices for every capital improvement you made, including labor costs if you hired contractors.
If you paid $300,000 for the home and spent $50,000 on a kitchen remodel and $25,000 on a new roof, your basis is $375,000. If you sell for $600,000, your gain is $225,000, not $300,000. That $75,000 in improvements saved you roughly $15,000 to $20,000 in federal tax (depending on your tax bracket), plus whatever your state taxes on capital gains.
Do not rely on memory. The IRS can ask for documentation years after the sale. Gather receipts, contractor invoices, permits, and before-and-after photos. If you cannot document an improvement, the IRS will not count it toward your basis.
State capital gains taxes and where you live at sale
Federal capital gains tax is only part of your bill. Your state may tax the gain as well, and the rate varies enormously. Nine states — Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire — do not tax capital gains at all. If you live in one of these states when you sell, you owe no state tax on the gain.
Most other states tax capital gains as ordinary income, meaning the rate depends on your total income for the year. In states with high income tax rates — California, New York, Oregon, and others — your state tax on capital gains can exceed 10 percent. A few states, including Massachusetts and Vermont, have separate capital gains tax rates that are lower than their ordinary income rates but still apply.
Your state of residence on the date of sale is what matters. If you are planning to move to a no-tax state, selling after you establish residency there can save thousands. This requires genuine relocation — changing your driver's license, voter registration, and primary residence — not just a mailing address change. The IRS and state tax authorities scrutinize this closely.
If you live in a high-tax state and cannot move, you still owe the tax. There is no legal way to avoid it by timing or structuring the sale differently.
Timing the sale across two tax years
If you sell late in the year, all the gain is taxable in that single year. If you can close the sale in December but delay the funds reaching you until January, you may be able to report the gain in the following year instead. This works only if you have genuine control over when you receive the money — typically through an escrow arrangement or seller financing.
Spreading the gain across two years can matter if your income is unusually high in the year of sale. If you also have a large bonus, retirement distribution, or other income that year, your tax bracket may be higher than normal. Deferring part of the gain to a lower-income year reduces the tax rate applied to it.
This strategy is narrow and requires coordination with your tax preparer and the title company or attorney handling the sale. Most standard sales close with funds transferred immediately, making this impossible. It also does not reduce your total tax — it only shifts when you pay it — so it is useful only if your income situation genuinely differs between the two years.
Installment sales and spreading gain over multiple years
If you sell the home and the buyer pays you over time — through seller financing — you can report the gain using the installment method. This spreads the taxable gain across the years you receive payments, rather than all in the year of sale. If you receive 30 percent of the sale price in year one and 70 percent over the next three years, you report 30 percent of the gain in year one and the rest proportionally in later years.
This can lower your tax if it keeps you in a lower bracket each year. It also requires you to act as the lender, which means you carry the risk if the buyer defaults. You must charge interest (the IRS sets a minimum rate each month), and you have to report that interest as income.
Installment sales are uncommon in residential real estate because most buyers use conventional mortgages. They are more practical if you own investment property or if a buyer cannot may have access to for traditional financing. Discuss this option with a tax professional before structuring the sale this way.
Investment property and depreciation recapture
If the home was investment property or a rental at any point, the rules are different and more complex. You may have deducted depreciation on your tax returns over the years you rented it out. When you sell, you must "recapture" that depreciation — report it as income — even if the home did not actually gain value.
Depreciation recapture is taxed at 25 percent federally, regardless of your ordinary tax bracket. This is higher than the long-term capital gains rate (15 or 20 percent for most people). If you depreciated $100,000 over ten years of rental use, you owe roughly $25,000 in federal tax on that recapture alone, plus state tax and the tax on any actual gain in value.
If you converted a rental back to your primary residence before selling, you may still owe recapture tax on the years it was rented. The rules depend on when you converted it and how long you lived there afterward. This is a situation where a tax professional's help is worth the cost.
When to work with a tax professional
If your gain is under $100,000, you lived in the home as your primary residence for the required time, and you have no state capital gains tax, you may owe no tax at all and can file on your own. If any of those conditions do not apply, a tax professional can identify strategies you might miss and document your cost basis correctly.
A CPA or tax attorney can also help if you are relocating to a different state, if the home was ever rented out, if you owned it jointly with someone other than a spouse, or if you are selling at a large gain. The cost of a consultation — typically $200 to $500 — often pays for itself by catching deductions or strategies that save thousands.
Do not wait until after the sale to talk to a tax professional. Some strategies, like timing the closing or structuring an installment sale, must be planned before the transaction closes. A conversation before you list the home can save more than one after you have already sold it.
Frequently Asked Questions
Do I have to live in the home for the full five years before selling to use the exclusion?
No. You need to have owned and lived in the home as your primary residence for at least two of the five years before the sale. You can have moved out three years ago and still may have access to, as long as you lived there for two years at some point in the five years before selling.
What counts as a capital improvement versus a repair?
A repair restores something to working condition — fixing a leak, repainting, replacing broken windows. A capital improvement adds value or extends the life of the home — new roof, kitchen remodel, addition, new HVAC, deck, or solar panels. When in doubt, keep the receipt. If the IRS questions it, you can explain what was done and why.
Can I avoid capital gains tax by moving to a no-tax state before I sell?
Only if you genuinely relocate and establish residency in that state before the sale closes. Changing your address on paper is not enough. You must change your driver's license, voter registration, and primary residence. The IRS and state tax authorities examine this closely, especially for large gains.
What if I inherited the home — does that change the capital gains tax?
Yes. Inherited property receives a "stepped-up basis," meaning your cost basis is the home's value on the date of the person's death, not what they originally paid. If you inherit a home worth $400,000 and sell it for $410,000 a year later, your gain is only $10,000, not the full difference from the original purchase price.
Do I owe capital gains tax if I sell at a loss?
No. If you sell for less than your cost basis, you have no gain to report. You cannot deduct the loss on your personal tax return, but you owe no tax on it either. Keep documentation of your basis in case the IRS questions the loss.