Capital gains when you sell
Sellers routinely assume they owe tax on the whole difference between what they paid and what they sell for. For a primary residence that is usually not how it works.
The exclusion
If a home has been your main residence, you may be able to exclude gain from your income:
- $250,000 if you file as a single person
- $500,000 if you are married filing jointly
That is gain excluded, not sale price. A couple who bought at $300,000 and sell at $780,000 have $480,000 of gain before costs - which may fall entirely inside the exclusion.
The two tests you have to pass
Both, not either:
- Ownership. You or your spouse owned the home for at least 24 months of the previous five years.
- Use. You used it as your residence for at least 24 months of the previous five years.
Married couples: the two tests work differently. To claim
the full $500,000, only one spouse needs to meet the ownership
test - but both spouses must meet the use test, and
neither may have excluded gain on another home in the prior two years.
If only one spouse meets the use test, the couple is generally limited to
the $250,000 exclusion rather than $500,000. This catches people who marry
shortly before selling a home one of them already lived in.
The 24 months do not have to be continuous, and the five-year window is counted back from the sale. This is what makes it possible to move out, rent a home for a period, and still qualify - provided you sell inside the window.
Two things that catch California sellers specifically
State withholding at closing
California generally requires real estate withholding at closing - 3⅓% of the sales price, or an optional gain-based calculation. There is an exemption where the property was last used as your principal residence within the meaning of the federal rules, and an automatic exemption below a low sale-price threshold.
The form is FTB 593, and escrow handles it - but you need to claim the exemption rather than assume it applies. Sellers who miss this have the money withheld and wait until they file to get it back.
The 3.8% surtax
Gain above the exclusion can be subject to the federal Net Investment Income Tax of 3.8% for higher-income sellers, on top of ordinary capital gains treatment. At Southern California price points a long-held home can generate gain well past the exclusion, so this is not an edge case here.
How often you can use it
You are not eligible if you excluded gain on the sale of another home during the two years before this sale. It is not once-in-a-lifetime, but it is not repeatable at will either.
The three things sellers most often miss
1. Your basis is higher than the purchase price
Gain is measured from your adjusted basis, not what you paid. Capital improvements - an addition, a new roof, a remodel, a permitted ADU, landscaping and hardscape - generally increase basis. Ordinary repairs and maintenance generally do not.
Selling costs also reduce the gain. Which is why the receipts matter, and why the people who do best are the ones who kept them. If you are years away from selling, start a folder now - it is worth real money later.
2. Renting it out has consequences beyond the window
If a home was a rental at any point, depreciation allowed or allowable for periods after 6 May 1997 cannot be excluded. It is taxed separately as unrecaptured gain, at a rate up to 25%, regardless of how much exclusion you have available.
There are also rules limiting the exclusion for periods of "non-qualified use" - and the detail here matters more than people realize:
Non-qualified use does not include time after the home was last
your principal residence. That single exception is why the common
pattern still works: move out, rent the property for a limited period,
then sell while still inside the five-year window, and the rental period
after you moved out does not reduce your exclusion.
Renting it before you lived there is treated differently and can
reduce it.
This is genuinely intricate, and it is the single most common reason a seller's expectation and their actual bill diverge. If the property was ever rented, this is a conversation with a CPA before you list, not after you close.
3. If your spouse has died
A surviving spouse may generally claim the full $500,000 exclusion if the sale happens within two years of the spouse's death, rather than dropping to $250,000. That deadline is easy to miss during a period when selling is not anyone's priority, and it is worth knowing early.
Separately, if the home was held as community property, both halves generally receive a stepped-up basis at the first spouse's death - which can eliminate decades of gain entirely. More on stepped-up basis →
4. Military and Foreign Service
Qualified official extended duty allows the five-year window to be suspended for up to ten years. Relevant across San Diego County and around March Air Reserve Base, and routinely missed.
3. California taxes it too
The exclusion above is federal. California generally conforms on the home sale exclusion, but state tax treatment of capital gain differs from federal - California does not have a separate lower long-term capital gains rate. Check the current position with the FTB or your accountant rather than assuming your federal outcome is the whole picture.
Partial exclusions exist
If you fail the tests because of a change in workplace location, a health reason, or certain other unforeseeable circumstances, a reduced exclusion may still be available. People assume they get nothing and sometimes leave money behind. Publication 523 covers the qualifying situations.
If you inherited the property
Different starting point entirely - inherited property generally receives a stepped-up basis at the date of death, which often means very little taxable gain on a prompt sale. See the inherited property guide →
What we can and cannot help with
We can tell you what the property will realistically sell for, itemize the selling costs that reduce your gain, and give you a net-proceeds estimate before you list rather than at closing. What selling costs →
We cannot tell you your tax bill, and you should be wary of any agent who offers to. What we will do is flag when your situation looks like one of the complicated ones - a former rental, a partial-use property, a sale close to the two-year boundary - so you get a CPA involved while there is still time for it to change a decision.
Working out what a sale would actually net you?
We will tell you what we think it will sell for and how we got there - including when that is less than you hoped.
What's your home worth? Looking to buy?
Already working with us? Guides and what happens next →