Key Takeaways
When you sell a Silicon Valley home, your taxable gain is the sale price minus selling costs and your adjusted basis, less the $250,000 or $500,000 primary residence exclusion if you qualify. Gain above that is taxed by the IRS at long-term capital gains rates, by California as ordinary income, and in some cases by the 3.8% net investment income tax. Widows and widowers, heirs and owners with good improvement records can often reduce or eliminate the tax, so run the numbers with a CPA before you list.
Whether you're relocating or downsizing in Silicon Valley, selling a house here often produces a big gain, and that gain comes with real tax obligations. Santa Clara County's median single-family home price was $1,850,000 in August 2026, according to the Santa Clara County Association of REALTORS®, and the median for all home types was about $1.53 million.
Because values have climbed so much over the past few decades, longtime owners frequently see profits well beyond the federal exclusion. Figuring out your actual bill means looking at federal rules, California's tax brackets and local transfer taxes, and you want to understand those numbers before you list, not after you've signed. I'm not a CPA, so treat this as a map for the conversation with your tax advisor, not a substitute for it.
How Capital Gains Tax Works for Home Sales
When you sell a property for more than your adjusted basis, the profit is a capital gain. The IRS and the California Franchise Tax Board both tax it, but they treat it differently, and the rate you pay depends on how long you owned the home and your overall income.
Silicon Valley owners face large gains simply because of time. Someone who bought in San Jose in the early 1990s for a few hundred thousand dollars may be sitting on a home worth well over $1.5 million today, and the gain is the difference between those two numbers, adjusted for improvements and selling costs.
Short-Term Versus Long-Term Holding Periods
If you sell after owning the home for one year or less, the profit is a short-term capital gain, taxed at your ordinary federal income tax rate.
Own it for more than one year and the profit becomes a long-term gain. The federal government taxes long-term gains at 0%, 15% or 20%, depending on your taxable income. Almost every longtime homeowner is in long-term territory.
The Section 121 Exclusion Rules
The main way homeowners reduce the tax is the Section 121 exclusion, explained in IRS Publication 523. It lets qualifying sellers exclude a large part of the gain from federal tax, and California follows the same exclusion for state tax. The home has to be your main home, so rentals and second homes don't qualify.
You also have to pass the two-out-of-five-year test. You must have owned the home and lived in it as your main home for at least 24 months of the five years before the sale. The months don't have to be consecutive, and you generally can't have used the exclusion on another home in the two years before this sale. There's also a special rule for people who move into a care facility: if you become unable to care for yourself, time spent in a licensed facility can count as living in the home, as long as you lived there at least one year during the five-year window.
Limits for Single, Married and Widowed Sellers
Single filers can exclude up to $250,000 of gain. Married couples filing jointly can exclude up to $500,000 if either spouse owned the home and both lived there for two of the last five years. A surviving spouse can still use the full $500,000 exclusion if the home sells within two years of the spouse's death and the other requirements were met, which is something I explain in selling a Silicon Valley home after your spouse died.
In Silicon Valley, many sellers' gains exceed these limits. Everything above the exclusion is taxable, which is why I always suggest running your numbers through a capital gains tax calculator and then sitting down with a CPA well before the listing goes live. My longer guide to capital gains tax on a home you've owned for 30 years goes deeper.
Calculating Your Taxable Gain
To figure out what you owe, start with your cost basis: the original purchase price plus certain closing costs from when you bought, plus capital improvements. Then take your sale price, subtract selling costs like commissions, transfer taxes and escrow fees, and subtract your adjusted basis. That's your gain.
For illustration only, suppose a married couple bought a Santa Clara County home for $300,000, added $100,000 of documented improvements, and sells today for $1,800,000 with $100,000 of selling costs. Their gain is $1,800,000 minus $100,000 minus $400,000, or $1,300,000. After the $500,000 exclusion, $800,000 is taxable at the federal and state level.
Factoring in Home Improvements
Capital improvements add to your basis and reduce your gain. The IRS defines them as work that adds value, prolongs the home's life or adapts it to new uses, such as a new roof, an addition, a remodeled kitchen, a new HVAC system or a replaced sewer line. Routine repairs and maintenance don't count.
Keep the receipts, permits and contracts, because you'll need documentation if the IRS asks. If the paperwork is long gone, bank records, old permits and photos can help reconstruct what was done. IRS Publication 551 covers the basis rules in detail.
State Taxes, the 3.8% Surtax and Transfer Taxes
California has no special lower rate for long-term capital gains. The Franchise Tax Board taxes all capital gains as ordinary income, so the taxable portion of your home sale is added to your other income and taxed under California's brackets, which run from 1% to 12.3%, plus a 1% Mental Health Services Tax on taxable income over $1 million, for a top rate of 13.3%.
On top of that, the federal net investment income tax adds 3.8% to the taxable portion of a home sale gain when your modified adjusted gross income is above $200,000 single or $250,000 married filing jointly. The excluded part of the gain isn't subject to it, but a large taxable gain can push you over the threshold by itself. I wrote a full article on the 3.8% surtax that blindsides Bay Area home sellers.
County and City Transfer Taxes
Transfer taxes aren't a capital gains tax, but they come out of your proceeds at closing, and in Santa Clara County the seller customarily pays them. The county documentary transfer tax is $1.10 per $1,000 of value ($0.55 per $500). San Mateo County charges the same base rate.
Several cities add their own tax on top of the county's. San Jose, for example, charges $3.30 per $1,000, and its Measure E adds a further tax of 0.75% to 1.5% on sales above a threshold that started at $2 million and is adjusted each year. Palo Alto and Mountain View also have city transfer taxes, so check the rate for your city when you estimate your net proceeds.
Special Circumstances and Exceptions
Inherited homes get very different treatment, and it usually helps the seller. When you inherit a house, its basis generally steps up to fair market value on the date of the owner's death. If you sell soon after, the taxable gain is only the difference between the sale price and that stepped-up value, which is often small. I cover this in capital gains on inherited property in California.
Married couples in California get an extra advantage. When a home is held as community property, the surviving spouse can receive a step-up on the entire home, not just the deceased spouse's half, which can wipe out most or all of the gain. Here's how the community property double step-up works.
1031 Exchanges and Rental Properties
If you're selling a rental or investment property, the Section 121 exclusion doesn't apply, and any depreciation you took (or could have taken) is recaptured and taxed at up to 25% federally. Investors can defer the tax through a 1031 exchange by rolling the proceeds into another investment property.
The deadlines are strict. You have 45 days from the sale to identify replacement properties and 180 days to close on them, and a qualified intermediary has to hold the funds, because you can't take the cash yourself. A former home you've rented out may qualify for both the exclusion and a 1031 exchange if the timing works, so get advice before you sell.
Pending Federal Proposals
The $250,000 and $500,000 limits haven't changed since 1997, and Congress has seen proposals to raise or eliminate the exclusion, including the More Homes on the Market Act. Until a bill actually becomes law, plan around the current rules.
Sources
- IRS Publication 523, Selling Your Home
- IRS Topic 409, Capital Gains and Losses
- IRS, Net Investment Income Tax
- IRS Publication 551, Basis of Assets
- Santa Clara County Association of REALTORS®, Housing Statistics (August 2026)
If a move is part of the picture, my guide to downsizing in Silicon Valley for homeowners over 60 walks through Prop 19, timing the sale against the move, and where people actually go.
Frequently Asked Questions
How much is capital gains tax on a house sale in California?
It depends on your income and filing status. Gain above your exclusion is taxed federally at 0%, 15% or 20% for long-term holdings, by California as ordinary income at rates up to 13.3%, and possibly by the 3.8% net investment income tax. For many Silicon Valley sellers, the combined rate on the taxable portion lands somewhere between about 25% and 37%.
How long do I have to live in a house to avoid capital gains?
You need to have owned and lived in it as your main home for at least two of the five years before the sale. That lets single filers exclude up to $250,000 of gain and married couples filing jointly up to $500,000. The 24 months don't have to be consecutive.
Can I avoid capital gains tax by buying another house?
No. The old rule that let you roll gains into a more expensive home ended in 1997. Buying another primary residence doesn't defer the tax. Investment property owners can defer gains with a 1031 exchange into other investment property.
What if my gain is more than the $500,000 exclusion?
You'll owe federal and state tax on the amount above the exclusion. If your gain is $800,000 and you qualify for $500,000, you're taxed on $300,000. Set aside money from your proceeds for the tax and talk with your CPA about estimated payments.
Do home improvements reduce capital gains tax?
Yes. Capital improvements like a new roof, an addition, a kitchen remodel or new HVAC add to your basis and reduce your taxable gain. Routine maintenance and repairs don't count, so keep receipts and permits for the big projects.
Is there a partial exclusion if I have to move before two years?
Yes. If you sell early because of a job change that meets the IRS distance test, health reasons, or certain unforeseen circumstances, you may qualify for a prorated exclusion based on how long you lived there. IRS Publication 523 explains the rules.
What happens to the exclusion when a spouse dies?
A surviving spouse can still claim the full $500,000 exclusion if the home is sold within two years of the death and the other requirements were met. In California, a home held as community property may also get a full step-up in basis at the first spouse's death, which can reduce the gain even more.
Do heirs pay capital gains tax when they sell an inherited home?
Usually very little. An inherited home's basis generally steps up to its value at the date of death, so heirs are only taxed on any increase after that. If they sell soon after inheriting, the taxable gain is often small or zero.