When Silicon Valley homeowners start thinking about selling, one question usually comes up before pricing, staging, or timing: how much of the profit will go to taxes? The reassuring answer is that not every dollar of gain is taxable. Federal tax law gives primary-home sellers a generous exclusion, and gives investment-property owners a separate tool for deferring tax. Understanding which bucket your home falls into changes how you plan the sale.
Start With the Right Number: Your Actual Gain
Your taxable gain is not simply your sale price minus what you paid. In broad terms, it is the sale price, minus your adjusted basis, minus eligible selling costs. Basis generally starts with what you paid for the home, plus major capital improvements with documentation — an addition, a new roof, a system-wide remodel. Routine repairs usually do not count. Depreciation you claimed, insurance reimbursements, and other adjustments can reduce basis.
That is why the paperwork matters before you list: the original closing documents, contracts and receipts for major work, and any record of rental periods or depreciation. In Silicon Valley, where owners often live in a home, rent it out, and move back in, basis is rarely as simple as the seller remembers it.
The Primary-Home Exclusion: Up to $250,000 or $500,000
For a primary residence, federal law lets qualifying sellers exclude a portion of the gain: up to $250,000 for a single filer, or up to $500,000 for a married couple filing jointly. Only the gain above the exclusion is potentially taxable as a capital gain.
Qualifying generally requires two tests, both measured over the five years ending on the sale date. You must have owned the home for at least two years, and you must have used it as your principal residence for at least two years. The two years do not have to be continuous, and the ownership and use periods do not have to overlap. On a joint return, either spouse can satisfy the ownership test, but both spouses must individually satisfy the use test.
There are a few traps worth knowing. First, the exclusion is not unlimited in frequency: in general, you cannot claim it again if you used it on another home sale within the prior two years. Second, periods of rental or other nonqualified use can shrink the exclusion, and depreciation previously claimed generally cannot be excluded. Third, the caps have not moved in decades, so in a high-priced market like Silicon Valley, gains above $500,000 are common and the excess remains taxable. Fourth, if you must sell early because of a job change, health reasons, or other unforeseen circumstances, a partial exclusion may be available — but it depends on the specific facts, not on a general assumption that an early sale qualifies.
The practical takeaway: a home with a mixed history of living, renting, and changing use deserves a professional calculation before it goes on the market.
The 1031 Exchange: Deferral, Not Forgiveness
If you are selling a rental or business property, the primary-home exclusion does not apply. The tool investors most often ask about is the 1031 like-kind exchange. Its key idea is easy to misunderstand: it defers tax, it does not erase it. By reinvesting the proceeds into another qualifying investment property under strict rules, you can push the tax bill forward to a future sale where you do not exchange.
The deadlines are unforgiving. Within 45 calendar days of transferring the old property, you must identify replacement property in writing. Within 180 calendar days of the same transfer, you must close on the replacement — and the two clocks run concurrently, not one after the other, so you effectively have 135 days after identification to close. The sale proceeds generally must be held by a qualified intermediary, not handed to you, and the replacement property's value and debt must meet the applicable requirements. Cash you pocket, or debt relief you receive without replacing it, can become taxable in the year of the exchange.
Two misconceptions come up constantly. A home you live in does not qualify, and neither does property held mainly for resale. Both sides must be real property held for investment or productive business use, and U.S. real property is not like-kind to foreign real property. A 1031 exchange can keep capital working inside real estate, but the deferred gain travels with the new property in the form of a lower basis.
Three Calculations to Run Before You List
First, the gain calculation: estimate your gain using the basis approach above, then compare it with the exclusion to see how much, if anything, remains. Second, the timeline calculation: for a primary home, count your months of residence within the last five years; for an investment property, respect the 45-day and 180-day deadlines as hard dates, not targets. Third, the cash calculation: tax is figured on gain, but your net proceeds also depend on the remaining mortgage balance, closing costs, and commissions. Gross appreciation is not the same as money in your pocket.
One more layer: federal rules are only part of the picture. California has its own state tax rules and withholding procedures for sales, and the right treatment depends on your situation. This article covers the federal framework in general terms only.
If a sale is on your horizon, start by pulling together your purchase price, improvement records, and a timeline of how the home was used, then look at that picture alongside current market conditions. You can follow recent local market updates on the Market Updates page, and if you want to talk through timing and pricing for your own home, you can reach out through the Contact page.
This article is general information only and is not tax, legal, or investment advice. Ownership history, filing status, and sale circumstances vary widely, so please consult a licensed tax professional before making a decision.