Plain-language education

Taxes before and after you sell your home.


Selling a home can create taxable gain, but the IRS provides a generous exclusion for your primary residence. This page explains, in plain language, how capital gains, the primary residence exclusion, and selling at a loss versus a gain work, so you can plan before you list. It is educational information, not tax advice.

The basics

Your gain is not your sale price.


For tax purposes, your gain is the sale price minus selling expenses (like commissions and some closing costs), minus your adjusted basis. Your adjusted basis starts with what you originally paid, plus closing costs from your purchase, plus money you spent on capital improvements over the years, like a new roof or a remodel. Routine repairs generally do not add to basis.

That is why keeping improvement records matters. Two sellers can sell identical homes for the same price and have very different tax results, simply because one tracked their improvements and the other did not.

The good news

The primary residence exclusion.


Under IRS rules, most people who sell their main home can exclude a large portion of the gain from tax. As of 2026, you can generally exclude up to $250,000 of gain if you are single, and up to $500,000 if you are married and filing a joint return.

To qualify for the maximum exclusion, you generally must meet two tests during the five-year period ending on the date of sale: you owned the home for at least two years, and you lived in it as your main home for at least two years. The two-year periods do not have to be consecutive. You also generally cannot claim the exclusion if you claimed it on another home within the two years before the sale.

If you sell before meeting the two-year tests, you may still qualify for a partial exclusion if the sale was primarily due to a change in employment, health reasons, or an unforeseeable event. The exact rules are detailed, so it pays to confirm them with a tax professional before you decide.

Loss vs. gain

Selling at a loss, or above the exclusion.


If you sell your main home at a loss, that loss generally is not deductible. The exclusion protects gains, but it does not turn a personal home loss into a tax deduction.

If your gain is more than the exclusion amount, the amount above the exclusion is taxable, and different rules can apply. Special rules also apply when a home has been used partly as a rental or for business, including depreciation recapture, so those situations deserve extra attention from a tax professional.

Plan ahead

Before you sell: think about timing and records.


  • Gather your original purchase documents, closing statements, and receipts for improvements before you talk to an advisor.
  • Consider the two-year ownership and use tests when choosing when to sell, especially after a recent move or a change in marital status.
  • If your home has rental or business use, plan for the extra rules and possible depreciation recapture before listing.
  • For estate, trust, and inherited homes, the starting basis can work very differently, so get specific guidance for that situation.

After the sale

Report it, even when it is excluded.


Even if your gain is fully excluded, the sale of a home is generally reported on your tax return for the year of the sale, so your tax preparer can document the exclusion. Keep your closing statement, improvement records, and any tax forms you receive, because you will want them if the IRS ever asks.

House keys handed over beside a small sold sign

Your next step

Talk it through before you list.


Every situation is different, especially for downsizers, estate sales, and probate or trust properties. I am not a tax advisor, but I have guided hundreds of South Sacramento sellers through the practical decisions, and I can help you get the right documents and the right questions ready for your CPA.

Important: This page is educational and informational only. It is not tax, legal, or financial advice, and it is not a substitute for consulting a qualified tax professional about your specific circumstances. Tax laws and amounts change over time. CA DRE #01194604.

Sources