This page walks a California homeowner through the tax that comes due when a primary home is sold: the Section 121 exclusion of $250,000 or $500,000, the two-of-five-year ownership and use tests, how basis and documented improvements shrink the taxable gain, the federal and state rates that apply to what remains, and the partial exclusions for early moves. It is education, not tax advice: I am a real estate agent, not a CPA, every figure here comes from federal or state law that changes, and a CPA or tax attorney should be the guide for your actual sale.
Everything below feeds one question: what will you actually keep after the sale? For the process itself, from prep to close, start with my guide on how to sell your Bay Area home.
The Section 121 exclusion: $250,000 single, $500,000 married
The centerpiece of home sale taxation is Section 121 of the federal tax code, summarized by the IRS in Topic 701, Sale of Your Home. If the property was your main home and you pass the tests below, you may exclude up to $250,000 of gain from federal tax as a single filer, or up to $500,000 on a joint return. Excluded gain is simply never taxed: no deferral, no repayment, no age requirement. If the entire gain fits under the cap and no 1099-S arrives, the sale often does not even need to be reported; ask your tax preparer.
Two old rules are worth retiring from memory: the rollover rule, where tax was deferred by buying a more expensive home, was repealed in 1997, and the one-time over-55 exclusion went with it. Since then the deal is simple: qualify, exclude up to the cap, pay tax on the rest in the year of sale, and claim the exclusion no more than once every two years.
The two-of-five-year tests
Two tests, both measured against the five years ending on the date of sale. The ownership test: you owned the home for at least 24 months of that window. The use test: you lived in it as your main home for at least 24 months of the same window. The months do not need to be continuous, and the two tests can be satisfied in different stretches. Short absences such as vacations count as use; a multi-year stint living elsewhere does not.
The $500,000 figure has its own fine print: you must file jointly, either spouse can satisfy the ownership test, but both spouses must individually satisfy the use test, and neither may have used the exclusion on another sale in the prior two years. Miss one of those and the available amount depends on the facts. A surviving spouse may in some cases keep the full $500,000 on a sale within two years of the spouse's death. These edges are where a CPA earns the fee.
Why long-held Bay Area homes routinely exceed the exclusion
The exclusion amounts were set in 1997 and have never been adjusted for inflation, while Bay Area appreciation since the late 1990s is measured in multiples, not percentages. A single-family home bought in Fremont, Sunnyvale, or San Jose in 1998 for around $400,000 can sell today for well over $2 million; even after a generous basis, the gain clears $500,000 with room to spare, and that is the ordinary result of owning the same house for twenty-five years, not a rare one. For long holds the exclusion still helps, but it stops being the whole answer, and the biggest remaining lever is basis: proving everything you actually put into the home.
Basis: the arithmetic that decides the bill
Your taxable gain is not sale price minus purchase price. It is the amount realized minus your adjusted basis. Amount realized means the contract price minus selling costs: the commission, county and any city transfer taxes, and the title, escrow, and legal fees you pay as the seller. Adjusted basis starts with what you paid for the home, adds certain closing costs from the purchase, adds every capital improvement you made over the years, and subtracts any depreciation you claimed for a home office or rental use. Only one of those pieces, the improvements, is entirely under your control to document.
That is the record-keeping message of this whole page: every documented dollar of improvements reduces taxable gain roughly dollar for dollar, and at combined rates that can mean thirty cents or more of tax saved per dollar proven. Keep a folder with permits, contractor invoices, and receipts for as long as you own the home plus a few years after the sale. For the non-tax column of the same arithmetic, my seller net sheet shows where the commission, transfer taxes, and prep take the rest of the price.
Improvement or repair: what adds to basis
The IRS test, laid out in Publication 523, Selling Your Home, is whether the work adds value to the home, prolongs its useful life, or adapts it to new uses. Additions and converted spaces qualify, and so do kitchen and bath remodels, a new roof, a new furnace or air conditioning, rewiring and repiping, foundation and seismic work, insulation, new windows, a deck, a fence, a pool, and permanent landscaping. Repairs and maintenance that merely keep the home in ordinary operating condition do not: painting, patching drywall, fixing a leak, servicing the furnace.
Three nuances catch people. Repairs inside a substantial remodel count as part of that project. An improvement that is no longer part of the home drops out: carpet you later tore out for hardwood no longer counts, the hardwood does. And your own labor never adds to basis; materials do, your weekends do not.
A worked example, for illustration only
Here is the arithmetic on a hypothetical long-held Bay Area house, with deliberately rounded numbers. It is an illustration, not advice or a prediction: your prices, costs, and rates will differ.
| Line | Single filer | Married filing jointly |
|---|---|---|
| Purchase price (1998) | $400,000 | $400,000 |
| Documented improvements over the years | $200,000 | $200,000 |
| Adjusted basis | $600,000 | $600,000 |
| Sale price (2026) | $2,400,000 | $2,400,000 |
| Selling costs (commission, transfer tax, prep) | $150,000 | $150,000 |
| Amount realized | $2,250,000 | $2,250,000 |
| Capital gain | $1,650,000 | $1,650,000 |
| Section 121 exclusion | $250,000 | $500,000 |
| Taxable gain | $1,400,000 | $1,150,000 |
At a 20% federal rate, plus the 3.8% net investment income tax, plus California rates that run into double digits at these income levels, the combined bill on the taxable slice can approach a third of it. The $200,000 of documented improvements removes $200,000 from the taxable gain, on the order of $60,000 of tax at those combined rates: that is the price of a lost shoebox of receipts. Confirm every line of this math with a CPA for your own home.
Federal rates, the NIIT, and the California treatment
Federally, gain above the exclusion on a home held more than a year is a long-term capital gain, taxed at 0%, 15%, or 20% depending on taxable income. For 2026, the 15% rate applies up to about $545,500 of taxable income for single filers and $613,700 for joint filers, with 20% above that; the thresholds adjust each year. A large home sale gain stacks on top of your other income, so the sale itself can push much of the gain into the 20% bracket. On top of that sits the 3.8% net investment income tax, which applies to gain above the exclusion once modified adjusted gross income passes $200,000 single or $250,000 joint.
California conforms to the Section 121 exclusion, so the same $250,000 or $500,000 comes off the state return, as the Franchise Tax Board explains. Beyond that, California gives no break at all: there is no state long-term capital gains rate, and the taxable remainder is taxed as ordinary income at rates that reach 13.3% in the top bracket. One escrow note: California generally withholds 3.33% of the price unless an exemption applies; the principal residence exemption is certified on FTB Form 593, and withholding is a prepayment, not the final bill.
Partial exclusions: job, health, and unforeseen moves
Selling before the two-year mark, or reusing the exclusion within two years, does not always mean losing it. If the main reason is a work-related move (the new job at least 50 miles farther from the home than the old one), health, or an unforeseeable event, Publication 523 allows a partial exclusion. The proration applies to the cap, not the gain: qualify after 12 months and a single filer's cap becomes 12/24 of $250,000, or $125,000, which on a short hold often covers the entire gain. Whether your reason qualifies, and how to document it, is a call to bring to a CPA before you sign a listing agreement.
Special situations worth their own conversation
Four situations change this math enough to deserve their own analysis:
- Inherited homes. An inherited house generally takes a stepped-up basis equal to its value at the owner's death, which can erase decades of gain before you ever sell; the mechanics, including the community property angle for married couples, are in my guide to selling an inherited home in the Bay Area.
- Divorce. Section 121 has special provisions for spouses who transfer the home in a divorce, including when one spouse stays in the house under the decree. The timing of the sale relative to the divorce can change the available exclusion, so bring a CPA and your family law attorney in early.
- Rentals and former rentals. A home that spent years as a rental faces nonqualified use rules that carve part of the gain out of the exclusion, plus separate tax on the depreciation claimed. Section 1031 exchanges apply to investment property, not the home you live in, and sit firmly in CPA territory.
- Downsizing and Proposition 19. Prop 19 lets homeowners 55 or older move a low property tax base to a replacement home anywhere in California. That is a property tax rule, separate from the income tax here, and downsizing math needs both: see California property tax explained for that half.
Let's run your numbers before you list
If you are weighing a sale of a long-held Bay Area home, run the numbers first and list second. I will give you a realistic view of what your home would sell for and what selling costs look like, show how timing fits in (my guide on when to sell your Bay Area home covers that side), and tell you plainly when the next question belongs to a CPA. I am not a tax professional; what I bring is the market side of the decision, learned across 104 documented closings and more than $115M in volume.
Reach me at lilyagaripova@gmail.com or (415) 910-3958. I work out of Fremont, CA, and I would rather get the question a year before the sale, while the receipts folder can still be rebuilt, than a week before closing.
Lily Garipova, REALTOR®, in real estate since 2007, California licensed since 2016 (Cal DRE #02010731).
Email: lilyagaripova@gmail.com
Phone: (415) 910-3958
Web: lilygaripova.com
Fremont, CA
FAQ
How much of my gain is tax free when I sell my home?
If the home was your main home and you meet the two-year ownership and use tests, federal law lets you exclude up to $250,000 of gain if you file single and up to $500,000 on a joint return. California conforms to the same exclusion. Gain above those amounts is taxable, and the exclusion can generally be used only once every two years. A CPA should confirm how the rules apply to your specific facts.
Do I still qualify if I rented the home out for part of the last five years?
Possibly. The tests ask whether you owned and lived in the home for a total of 24 months within the five years before the sale, and the months do not have to be continuous. Living in it for two years and then renting it for up to three before selling can still qualify. Renting first and moving in later brings in the nonqualified use rules, and any depreciation you claimed is taxed separately, so have a CPA run that exact timeline.
What counts as an improvement I can add to my basis?
Work that adds value to the home, prolongs its useful life, or adapts it to new uses: an addition, a kitchen or bath remodel, a new roof, a new furnace or air conditioning, rewiring, foundation or seismic work, a deck, a pool, landscaping, new windows. Routine repairs and maintenance, such as painting or fixing a leak, generally do not count unless they are done as part of a larger remodel. IRS Publication 523 has the full list.
I never kept receipts for my remodels. Is the basis lost?
Not necessarily, but the burden of proof is on you. Permits on file with the city, contractor agreements, bank and credit card statements, before and after photos, and even old listing descriptions can help reconstruct what you spent. A CPA can tell you what documentation will hold up. The lesson for anyone not selling yet: start the folder now, because every documented dollar of improvements reduces the taxable gain later.
Does California give its own exclusion or a lower rate on the rest?
California conforms to the federal Section 121 exclusion, so the same $250,000 or $500,000 comes off your state return too. Beyond that there is no break: California has no lower rate for long-term capital gains and taxes the remaining gain as ordinary income, at rates that reach 13.3% in the top bracket.
Can I get part of the exclusion if I sell before two years?
Sometimes. If the early sale is caused by a work-related move of 50 miles or more, by health, or by certain unforeseen circumstances, you may claim a partial exclusion, prorated by the months you qualified divided by 24. The gain itself is not prorated, the cap is, and on a shorter hold the prorated cap often covers the entire gain. Whether your reason qualifies is a CPA question.
Will escrow withhold state tax when I sell?
California requires withholding on real estate sales, generally 3.33% of the price, unless an exemption applies. Selling a home that qualifies as your principal residence under Section 121 is one of the standard exemptions, which you certify on FTB Form 593 during escrow. Withholding is a prepayment, not the final tax; the actual bill is settled on your returns.