Key Takeaways
Summary: Selling a longtime Bay Area home can trigger a large capital gains bill once your profit exceeds the $250,000 or $500,000 home sale exclusion, with federal and California taxes combining for a top rate of about 37%. Knowing your cost basis, how California treats sellers who move away, the limits of 1031 exchanges and moving expense deductions, and the special rules for surviving spouses, heirs and Prop 19 lets you plan the sale before you list instead of after.
If you’ve ever thought about packing up and making a move, you know it’s about a lot more than finding the perfect new place. There’s a whole tax side to consider, especially when you’re selling a Bay Area home you’ve owned for decades.
Whether you’re downsizing, moving closer to family, or just ready for a change of scenery, it’s important to have a handle on the financial ins and outs before you sign on the dotted line. After more than 20 years of helping longtime Silicon Valley homeowners sell, I can tell you the tax conversation is often the one that changes the plan, so it’s worth having early. From capital gains to deductions, here’s what you should know before you start packing those moving boxes.
What Bay Area Homeowners Should Know Before Selling
Whether it’s a new job in another city, a move to be near the grandkids, or simply a lower cost of living, moving is a big step. Before you start picturing your new life, it helps to understand the tax rules that apply when you sell your Bay Area home, because on a house bought in the 1980s or 1990s the numbers can be surprisingly large.
Capital Gains Tax and the Home Sale Exclusion
One of the most important things to understand when selling your Bay Area home is the capital gains tax. If you’re selling your primary residence, you might be in luck. Under Section 121 of the tax code, which came from the Taxpayer Relief Act of 1997, individuals can exclude up to $250,000 of gain from the sale of their primary residence, and married couples filing jointly can exclude up to $500,000. The IRS explains the details in Publication 523, Selling Your Home.
To qualify, you generally must have owned the home and lived in it as your main home for at least two of the five years before the sale, and you can’t have used the exclusion on another home in the previous two years. Keep in mind that the exclusion is based on your gain, not the sale price. If you bought your Los Gatos home for $400,000 in 1995 and sell it for $2.4 million, your gain is roughly $2 million before selling costs and improvements, and even a married couple would owe tax on about $1.5 million of it.
Those exclusion amounts have never been adjusted for inflation, and there are proposals in Congress to raise or eliminate them, including the More Homes on the Market Act. As of this update none of them have become law, so plan around the current limits.
How the Gain Is Taxed
If your gain exceeds the exclusion, the rest is taxed at both the federal and state levels. Federally, long-term capital gains are taxed at 0%, 15% or 20%, and for 2026 the 20% rate applies to taxable income above $613,700 for married couples filing jointly and $545,500 for single filers. Higher-income sellers may also owe the 3.8% net investment income tax on the taxable part of the gain.
California doesn’t have a separate capital gains rate, so the state taxes your gain as ordinary income at rates up to 13.3%. Put the two together and the combined top rate is about 37%, which on a seven-figure Bay Area gain is a number worth planning around.
Lowering Your Gain With Your Cost Basis
Your taxable gain isn’t simply the sale price minus what you paid. It’s the sale price, minus selling costs like commissions and transfer taxes, minus your adjusted basis, which is what you paid plus the cost of capital improvements you’ve made over the years. A kitchen remodel, a new roof, an addition, solar panels or a new HVAC system all add to your basis, while routine repairs and maintenance don’t.
For longtime owners, digging up old receipts, permits and contractor invoices can knock tens of thousands of dollars off the tax bill. I cover more ways to shrink the number in reducing or eliminating capital gains tax on the sale of your primary home.
Surviving Spouses and Inherited Homes
Two rules matter a lot for older homeowners and their families. First, a surviving spouse who sells within two years of their spouse’s death can generally still claim the full $500,000 exclusion, as long as they haven’t remarried and the couple met the requirements right before the death. Second, because California is a community property state, a home held as community property can receive a full step-up in basis to its value at the date of death, not just on the deceased spouse’s half.
Heirs who inherit a home also receive a stepped-up basis, which often wipes out most or all of the gain. That’s why the timing of a sale deserves a conversation with your CPA or estate attorney. If you’re in this situation, read selling a Silicon Valley home after your spouse died and selling an inherited home in the Bay Area.
Relocation Deductions
Years ago, if you moved for a new job and your new workplace was at least 50 miles farther from your old home than your old workplace was, you could deduct your moving expenses. The Tax Cuts and Jobs Act of 2017 suspended that deduction for most people starting in 2018, and the One Big Beautiful Bill Act of 2025 made the suspension permanent. Today only active-duty military members moving under orders, and certain intelligence community employees, can deduct moving costs on their federal return.
California never adopted the federal change, so a job-related move may still be deductible on your California return, although the rules are narrower if you’re moving out of state. If you’re retired, moving costs generally aren’t deductible at all, since the deduction is tied to starting work in a new location. It’s worth asking a tax professional how this applies to your situation, and my guide to the cost of moving out of the Bay Area can help you budget.
Timing Is Everything
The timing of your home sale can have a significant impact on your tax bill. Selling in a year when your other income is lower, like after you’ve stopped working but before required minimum distributions and Social Security push your income up, can keep more of the gain out of the top brackets. Selling before you’ve hit the two-year residency mark, or more than three years after you’ve moved out, can cost you the exclusion entirely.
Health and family circumstances matter too. If one spouse’s health is declining, selling before a death rather than after can mean giving up the step-up in basis, so it’s worth running the numbers both ways with your advisors before you decide.
1031 Exchanges Are for Investment Property
You may have heard that you can defer capital gains by buying another home with the proceeds. That’s only true for investment or business property. A 1031 exchange lets you sell a rental or investment property and defer the tax by reinvesting in like-kind real estate, but you must identify the replacement property within 45 days and close within 180 days, and a qualified intermediary has to hold the funds. The IRS like-kind exchange rules are strict, and your primary residence doesn’t qualify.
If you own a rental along with your home, or you’ve turned a former home into a rental, there are strategies that combine Section 121 and 1031, which I explain in converting a Bay Area rental property to a primary residence with a 1031 exchange. Some investment property owners also look at structured installment sales or a Section 721 exchange. These are complex maneuvers that require careful planning, so be sure to work closely with a tax advisor.
California-Specific Considerations
As a Bay Area homeowner, you already know California does things its own way, and taxes are no different. A few state rules catch sellers off guard every year.
- Moving away doesn’t avoid California tax. Gain on California real estate is California-source income, so you’ll owe California tax on it even if you’ve already moved to Nevada or Texas. My guide to leaving California and the taxes when you sell goes deeper.
- Withholding at closing. Escrow generally withholds 3⅓% of the sale price for the Franchise Tax Board unless you certify an exemption on Form 593, such as the home qualifying as your principal residence under Section 121 or the sale producing a loss. It’s a prepayment credited against your tax, not an extra tax.
- Prop 19 for owners 55 and older. If you’re 55 or older, severely disabled, or a wildfire or disaster victim, you can transfer your property tax base to a replacement home anywhere in California, up to three times. Start with my Prop 19 explainer for seniors or try the Prop 19 calculator.
- Transfer taxes. Santa Clara County charges a documentary transfer tax of $1.10 per $1,000 of the price, and some cities, including San Jose, add their own. These are selling costs that reduce your gain, and you can see how they fit into the bigger picture in how much it costs to sell a home.
Home Office Deductions
If you’ve been running a business from a home office, there’s a selling-related wrinkle most people miss. Self-employed owners who used part of the home regularly and exclusively for business may have claimed depreciation on that space over the years. When you sell, any depreciation taken after May 6, 1997 can’t be excluded under Section 121 and is taxed at up to 25%.
If the office was in a separate structure, like a detached studio or backyard cottage, part of the gain may not qualify for the exclusion at all. W-2 employees who worked from home generally haven’t been able to claim the home office deduction since 2018, so this mostly affects the self-employed. The IRS covers the rules in Publication 587, Business Use of Your Home.
Consult a Tax Professional
The world of taxes is a complex one, and navigating it on your own can be overwhelming. Before you make any decisions about selling your Bay Area home, sit down with a CPA or enrolled agent who can run your actual numbers, and bring in an estate attorney or financial planner if a trust, a surviving spouse or heirs are involved. I’m happy to connect you with professionals I trust and work alongside, like the CPA I interviewed in what to know about real estate taxation.
As you get ready to move, don’t let the tax side catch you off guard. Understanding the home sale exclusion, knowing your basis, and planning around California’s rules are the steps that make for a smooth transition. Whether you’re trading your view of the Santa Cruz Mountains for a spot near the grandkids in another state or simply moving across town, taking the time to get your tax ducks in a row can make all the difference. So as you start packing up those memories, pack some tax knowledge along with them. Your future self will thank you for it!
Frequently Asked Questions
How much profit can I make on my home before paying capital gains tax?
Do I still pay California tax if I move out of state before I sell?
Can I avoid capital gains tax by buying another house?
What counts as a capital improvement that raises my cost basis?
Does a surviving spouse still get the $500,000 exclusion?
Are moving expenses tax deductible in 2026?
Can I use Prop 19 if I’m moving out of California?
Check out these Great Homes for Multi-Generational Living
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
