When someone asks me what they will walk away with after selling, the conversation usually starts with price and ends with a question I am not licensed to answer fully: "What about the taxes?" Capital gains on a home sale is one of the most misunderstood parts of selling in the Bay Area, partly because the rules are decades old and partly because home values here have moved so far that the rules no longer cover the whole gain for a lot of long-time owners. I am a real estate agent, not a CPA, so treat everything here as general education. Your own numbers belong in front of a tax professional. But you should walk into a sale understanding the mechanics, because they affect timing, and sometimes they affect whether you sell at all.
The Section 121 exclusion, in plain terms
There is a federal tax rule called the Section 121 exclusion. It lets you exclude a chunk of the gain on the sale of your primary residence from your taxable income. The amounts are $250,000 if you file single, and $500,000 if you are married and file jointly. Those are the numbers to anchor on, and they have not been adjusted for inflation, which matters more every year that home prices climb.
The word that trips people up is gain. The exclusion does not apply to your sale price. It applies to your profit, roughly the sale price minus what you originally paid and minus certain costs and improvements. So a married couple who sells for a high number is not automatically facing a tax bill. The question is how much the home gained over what they have in it, and whether that gain exceeds the exclusion.
The exclusion is on your gain, not your sale price. The math that matters is profit, and profit is sale price minus your cost basis.
The ownership-and-use test
To qualify for the full exclusion, there is a basic two-part test you generally have to meet. The IRS describes it as the ownership test and the use test.
- Ownership: you owned the home for at least two of the five years before the sale.
- Use: you lived in it as your main home for at least two of those same five years.
- Frequency: generally you can only use this exclusion once every two years.
The two years of use do not have to be continuous, and they do not have to be the same two years as the ownership period, as long as both tests land inside that five-year window. There are partial exclusions for certain situations (a job-related move, health reasons, and other unforeseen circumstances), and there are special rules for members of the military and for surviving spouses. These edge cases are exactly where a CPA earns their fee, so if your situation is not a clean "I bought it, I lived in it for years, I am selling it," get advice before you list. This is general information, not tax advice.
Cost basis, and why improvements are worth tracking
Your gain is calculated against your cost basis, not just your purchase price. Cost basis usually starts with what you paid, plus certain purchase costs, and then it grows with qualifying capital improvements you made over the years. A new roof, a room addition, a kitchen remodel, a foundation repair, the kind of work that adds value or extends the life of the home, can generally be added to basis. Routine maintenance and repairs usually cannot. The IRS draws that line, so keep your receipts and check the specifics with your tax advisor.
Here is why this is not just paperwork. A higher basis means a lower gain, and a lower gain means more of your profit can fit under the exclusion. Take a clearly hypothetical case: a married couple bought for $400,000, put $150,000 into real improvements over the years, and sells for $1,500,000. Their basis is in the neighborhood of $550,000, so the gain is around $950,000 before selling costs. Subtract the $500,000 exclusion and roughly $450,000 of gain is potentially taxable. Now imagine they had not tracked that $150,000 of improvements. The taxable gain would look $150,000 larger. Those are illustrative numbers, not a prediction about any real home, but the lesson is real: documentation directly affects the bill.
Selling costs matter too. Commissions and certain closing costs generally reduce the gain. If you want to see how the proceeds side breaks down before taxes, the net proceeds tool walks through the deductions, and the home value page is where to start on the sale-price side of the equation.
Why Bay Area homes often blow past the exclusion
Here is the part specific to where I work. The $250,000 and $500,000 figures were set in 1997 and have never been raised. In much of the country, those amounts still cover the entire gain on a typical sale. In Santa Clara County, for an owner who bought fifteen or twenty-five years ago, the gain alone can exceed the exclusion before you even finish the conversation. That is not a reason to panic, and it is definitely not a reason to avoid selling. It is a reason to plan.
When the gain runs past the exclusion, the excess is generally taxed as a long-term capital gain at the federal level, and California taxes capital gains as ordinary income on top of that. The exact rate depends on your total income and filing situation, which is squarely CPA territory. I am flagging the mechanism, not quoting you a rate. The practical move is to model it before you list, not after you are in escrow, because the answer sometimes changes how you sequence a sale, especially if you are selling one home and buying another.
One more thing worth naming for longtime owners: California's Prop 13 caps how fast your assessed value (and therefore your property tax) grows, generally at 2% per year, which is a separate system from capital gains entirely. People sometimes confuse the low property-tax basis they have enjoyed with their cost basis for a sale. They are not the same thing. And if you are weighing a move and want to understand how programs like Prop 19 might let you carry a tax basis, that is again a question for your tax advisor and the county assessor, not something to assume from a blog post.
How I fold this into a sale
My job is not to do your taxes. My job is to make sure the tax question gets asked early enough to matter, and to give your CPA clean numbers to work with. That means a realistic sale-price estimate, a clear accounting of selling costs, and a nudge to dig up your improvement records before they are needed. When I put together a pre-listing strategy review, the after-tax picture is part of the conversation, even though the final number comes from your tax professional.
If you are thinking about selling and want to understand your likely gain before you commit, start with the seller resources, pull a home value estimate, and then loop in a CPA. If you want to talk through timing or sequencing, reach out and we will map it out. Bring the tax pro into the room early. It is the cheapest insurance in the whole transaction.
Thinking about selling? Request a pre-listing strategy review.