Estimate federal and California capital gains tax when you sell a home, including the Section 121 primary residence exclusion. Updated for 2026 rates.
When you sell a home in California, capital gains tax is not charged on the full sale price. It applies only to your gain, and only after the Section 121 exclusion. The calculator above runs this sequence:
Say you sell a Peninsula home for $3,500,000 that you bought for $1,200,000, with $200,000 in documented improvements and $210,000 in selling costs, filing jointly:
The biggest swing factors are your documented basis, the timing of the sale within your income year, and whether the home was ever a rental (which triggers depreciation recapture). Those are the levers a calculator cannot see for you. Run your full net sheet to model proceeds after mortgage payoff, compare your Prop 13 tax basis if you are weighing whether to hold, or look at a 1031 exchange if the property is an investment. And since every number above starts from the sale price, start there: find out what your home would command today.
This calculator is built for primary residence and investment property sales. If you purchased a property to renovate and resell quickly (a short-term hold or active flip), the tax rules are different: profit is typically treated as ordinary income (not capital gains), and active dealers also owe self-employment tax. The Section 121 exclusion and 1031 exchange are generally not available. A separate tool models those scenarios.
House Flipping Tax Calculator →Start with your net sale proceeds (sale price minus selling costs), subtract your adjusted cost basis (purchase price plus capital improvements), then subtract the Section 121 exclusion if the home was your primary residence. The remaining taxable gain is taxed at your federal capital gains rate (0%, 15%, or 20%), plus the 3.8% Net Investment Income Tax for high earners, plus California state income tax of up to 13.3%. The calculator above runs all of this in one step.
California has no separate capital gains rate. It taxes capital gains as ordinary income, from 1% up to 13.3% (12.3% plus a 1% Mental Health Services surcharge on income over $1 million). That state tax stacks on top of the federal rate of up to 20% and the 3.8% Net Investment Income Tax, so a high-income seller can face a combined rate above 37% on the taxable portion of the gain.
Often, but not always. If the home was your primary residence for at least 2 of the last 5 years, the Section 121 exclusion shelters the first $250,000 of gain (single) or $500,000 (married filing jointly), and many sellers owe nothing. On long-held Peninsula homes, though, the gain frequently exceeds the exclusion by millions, leaving a large taxable balance. Investment and second homes receive no exclusion at all.
If the home was your primary residence for at least 2 of the last 5 years, you can exclude up to $250,000 of gain (single) or $500,000 (married filing jointly) from federal capital gains tax. This is a per-sale exclusion, not a one-time benefit, and can be claimed every two years. California conforms to this exclusion for state tax purposes as well.
Because Peninsula homes purchased 20 to 30 years ago have appreciated $2M, $5M, even $10M+. The $500,000 married exclusion is a small fraction of that. A $4M gain on a long-held Atherton or Palo Alto home leaves $3.5M taxable, often producing $1M+ in combined federal and California tax. This is why many long-time owners delay selling, gift to heirs (step-up in basis at death), or pursue a 1031 exchange on investment properties.
Anything that adds value, prolongs useful life, or adapts the property to new uses. Kitchen and bath remodels, additions, new roofs, HVAC replacement, landscaping, foundation work, pools, ADUs. Routine repairs (paint, fixing leaks, plumbing service) do not count. Save every receipt: a $200K addition reduces your taxable gain by $200K, saving tens of thousands in tax.
If you converted the home to a rental at any point, prior depreciation deductions are recaptured at up to 25% federal, separate from the capital gain rate. The §121 exclusion is also prorated based on time used as a primary residence versus rental. This is one of the most commonly mismodeled scenarios. Always involve a CPA before selling a converted property.
Four levers move the number, and three of them are settled before the listing goes live.
First, document every capital improvement. Each receipt raises your basis dollar for dollar. Second, confirm the Section 121 residence test, two of the last five years, so the $250,000 or $500,000 exclusion applies.
Third, look at the timing of the close within your income year. California taxes the gain as ordinary income, and your other income sets the bracket. Fourth, for an investment property, a 1031 exchange can defer the tax.
Which lever matters for a given home is a conversation with your CPA, and a documented basis is where it starts.
Both. Choose the primary residence option for the Section 121 exclusion, or the investment option for a second home or rental, which receives no exclusion. The calculator doesn't model depreciation recapture on a rental. That's taxed separately at up to 25% federal. For the deferral route on investment property, use the 1031 exchange calculator.
Timing, structure, and basis all move the final number. Call Lisa before you list.
Call (650) 668-1868Or start with Page One, the pricing map Lisa's sellers see before anything is listed →
Not tax advice. Consult your CPA before listing.