Do you pay capital gains tax when you sell your home?
Usually not — the exclusion covers most sellers. Who it covers, what the tests are, and the situations where tax is owed anyway.
7 min read · Last reviewed August 27, 2026
For most people selling the home they live in, the answer is no. That is worth saying plainly and first, because a great deal of writing on this subject is designed to make you think otherwise.
The rest of this page is about the part that actually matters: knowing whether you are one of the people it does apply to, and what happens if you cannot tell yet.
Why most sellers owe nothing
When you sell your main home at a profit, the profit is called gain. Under Section 121, a seller who meets the conditions below can exclude up to $250,000 of that gain from tax, or up to $500,000 filing a joint return (Topic 701).
Those are large numbers. Gain is not your sale price and it is not what your home appreciated on paper — it is broadly the sale price less your adjusted basis, which is what the home has cost you: the purchase price, certain purchase costs, and qualifying improvements. Most sellers land under the limit and the question stops there.
The exclusion is not a lifetime allowance you spend down. If you exclude $80,000 on this sale, you have not used up part of some running total — and equally, you cannot save the unused portion for your next house. It applies per sale, and unused exclusion is simply gone.
Whether you qualify
Three conditions, all measured against the five years ending on the date of sale (Publication 523):
- The ownership test— you owned the home for at least 24 months of those five years.
- The use test— you lived in it as your main home for at least 24 months of those five years. The months need not be consecutive, and they need not be the same months as the ownership.
- The look-back— you have not excluded gain from the sale of another home in the two years before this sale.
For the $500,000 amount on a joint return, either spouse can satisfy the ownership test, but both must satisfy the use test, and neither may have claimed the exclusion in the prior two years.
Falling short does not always mean the full amount is taxable. A reduced exclusion may be available where the sale was driven by a change in workplace, health, or certain unforeseen circumstances.
When tax is owed anyway
There are several situations where the exclusion does not settle it, and they are more common than the headline suggests.
- Gain above the limit. The exclusion caps at $250,000 or $500,000. Anything beyond it is taxable, and in a long-held home in an appreciating market that is not exotic.
- Depreciation you claimed.If you took depreciation on the property — a home office, or a period as a rental — that depreciation is generally recaptured and the exclusion does not cover it. It is treated separately and taxed at up to 25%. This catches more people than expected.
- It was not your main home. A second home, a vacation property or a pure rental gets no Section 121 exclusion at all.
- Periods of non-qualified use.Broadly, time after 2008 when the property was not your principal residence can reduce the share of gain you may exclude — with important exceptions.
- Two sales close together. The look-back allows the exclusion only once in any two-year window.
State tax is a separate question with its own rules, and some states do not follow the federal treatment.
The part you cannot know yet
Here is the honest shape of the problem. Everything above is decided on the day you sell — by how much the home appreciated, by your filing status at that moment, by what you did with the property in between. None of those are knowable when the questions that matter are being answered, which is years earlier, every time you spend money on the house.
Qualifying improvements may raise your adjusted basis, and a higher adjusted basis may reduce taxable gain — but only where you can support the cost with records. An improvement you cannot document is an adjustment you cannot support, and by the time you know whether you needed it, the invoice is a decade old and the contractor has retired.
Which is why the useful framing is not “will I owe tax”. It is that keeping the record costs a few minutes each time and reconstructing it later may be impossible.
Start with what basis is if this is the first you have met the term.
HomeBasisLedger keeps records; it is not tax advice. What qualifies as an improvement, how your basis is calculated, and what you may owe are questions for you and your tax professional.
Start the record while it’s easy
The five minutes after a contractor leaves beats fifteen years of memory. Free covers one home and every improvement you log.
Start your free home ledger