Internal Revenue Code §121 lets you exclude up to $250,000 of gain on the sale of your primary residence if you file single, or $500,000 if you are married filing jointly. You need to have owned and lived in the home for two of the last five years.
Here is the part that decides outcomes for the people I work with: those two figures are not indexed to inflation. They were set in 1997 and they have not moved since. Not once, in what is now nearly three decades.
Bay Area house prices, of course, did move.
What that does to a longtime owner
Take a couple who bought in 1988 for $185,000 and are selling today at $2,400,000. Before any adjustments that is $2,215,000 of gain. The $500,000 exclusion absorbs part of it and leaves $1,715,000 still exposed.
In 1997, the same exclusion would have covered an entire typical gain with room to spare. Today it covers a slice. Nothing about the law changed; the denominator did.
This is the single most common reason a seller’s expected net and their actual net are hundreds of thousands of dollars apart. People remember “there’s a half-million-dollar exclusion” and assume it covers them. For a 30-year Bay Area owner it usually does not come close.
Two things pull the exposed number back down, and both get missed
Capital improvements add to your basis. Under §1016, every improvement you made over those decades increases what the house “cost” you for tax purposes — the kitchen, the roof, the addition, the seismic retrofit, the new foundation. Repairs do not count; improvements do. Thirty years of receipts is a real project, which is exactly why it should start well before you list rather than during escrow.
Selling costs come off the amount realized. Commission, escrow, title, transfer tax — these reduce the gain, they are not paid out of what is left after it.
The ownership and use test is looser than people think
Two of the last five years means 730 days, and they do not have to be continuous. You can have moved out and back. You can have rented it for a stretch. The exclusion is available once every two years.
Three situations where the rule bends in your favour
A surviving spouse has two separate provisions, and they are often confused. §121(b)(4) gives you the full $500,000 if you sell within two years of the date of death and have not remarried. Separately, §121(d)(2) lets you tack on your late spouse’s ownership and use to satisfy the two-of-five test — and that one has no time limit at all. They do different jobs; you can need one and not the other.
Moving to a care facility does not cost you the exclusion. Under §121(d)(7), if you became physically or mentally incapable of self-care, you only need to have owned and used the home for one year out of the five, and time in a licensed care facility counts as use. This is a full exclusion, not a partial one, and it is missed constantly.
The step-up in basis often matters more than the exclusion. If the property passed through a death, the basis may have reset to date-of-death value, which can make the gain small or nothing. For California community property that reset can be 100% at the first death — I wrote that up separately, because the difference between community property and joint tenancy here is enormous.
What §121 does not cover
If you ever rented the property and took depreciation, §121(d)(6) pulls that back: depreciation allowed or allowable after May 6, 1997 is recaptured at a maximum rate of 25% and the exclusion does not shelter it. Neither of my sale calculators models recapture, and both say so on the page.
And the exclusion only addresses federal capital gain on the residence. California has no preferential capital gains rate at all — gain is ordinary income there — and the 3.8% net investment income tax is a separate calculation with its own threshold.
The net proceeds calculator runs all of it: the exclusion, federal brackets with the real stacking, California at your marginal rate, and the net investment income tax computed the way the statute computes it rather than as a flat percentage of the gain.