Taxes When You Sell a House in California
The federal and California taxes on a home sale: the $250,000 or $500,000 exclusion, capital gains rates, the 3.8% NIIT, state withholding and FIRPTA.
If you’ve owned and lived in your home for a while, a federal exclusion may shelter much or all of your gain from income tax. But a long-held Bay Area home can have a gain larger than the exclusion, and rentals, short ownership and foreign sellers have rules of their own. Here’s how the federal and California rules work, so you know what to ask your tax preparer before you sell.
The home sale exclusion
Federal law lets you exclude up to $250,000 of gain on the sale of your main home, or up to $500,000 for a married couple filing jointly. To get the full exclusion, you generally have to meet three tests:
- Ownership: you owned the home for at least 24 months during the five years before the sale.
- Residence: you lived in it as your main home for at least 24 months during those five years. The months don’t have to be in a row.
- Look-back: you didn’t exclude the gain on another home sold in the two years before this sale.
For a married couple filing jointly, only one spouse has to meet the ownership test, but both must meet the residence test to get the full $500,000. California generally follows the same rules. If the whole gain is excluded, there’s usually no tax to pay, though you may still need to report the sale, for example if you receive Form 1099-S.
If you haven’t lived there two years
You may still qualify for a partial exclusion if the main reason for the sale was one of these:
- A work-related move, such as a new job at least 50 miles farther from the home than your old workplace
- A health-related move, including moving to care for a family member or on a doctor’s recommendation
- An unforeseeable event, such as a death in the household, a divorce or legal separation, a job loss that qualifies for unemployment, multiple births from one pregnancy or the home being condemned or damaged in a disaster
The partial exclusion is a fraction of the full amount, based on how long you owned and lived in the home. Someone single who lived there 12 months could exclude up to 12/24 of $250,000, or $125,000. Our guide to selling a house you’ve owned about a year walks through the timing in more detail.
How the gain is figured
Your gain is what you get from the sale minus what you have invested in the home. The IRS calls these the amount realized and the adjusted basis.
- Amount realized: the sale price minus selling expenses, such as commissions, advertising and legal fees.
- Adjusted basis: what you paid for the home, plus some of your purchase costs (such as transfer taxes, owner’s title insurance and recording fees) and the cost of improvements like an addition or a new roof. Ordinary repairs generally don’t count.
For example, say you bought for $600,000 and added a $50,000 kitchen, then sell for $1,200,000 with $60,000 in selling costs. Your amount realized is $1,140,000, your adjusted basis is $650,000 and your gain is $490,000. A married couple who meets all three tests could exclude all of it; a single owner would have $240,000 of taxable gain. Keep records of improvements, because they lower the gain.
If you sell your home for less than your adjusted basis, the loss isn’t deductible. Inherited and gifted homes have their own basis rules; see our guide to capital gains tax on an inherited house.
Federal tax on the taxable part
Any gain the exclusion doesn’t cover is a capital gain, and how long you owned the home matters:
- Owned one year or less: short-term gain, taxed at ordinary income rates.
- Owned more than one year: long-term gain, taxed at 0%, 15% or 20% depending on your income.
There’s also the 3.8% net investment income tax. It applies to the smaller of your net investment income or the amount by which your modified adjusted gross income exceeds $200,000 for single filers and heads of household, $250,000 for married couples filing jointly or $125,000 for married people filing separately. Gain that’s excluded under the home sale rules isn’t subject to this tax, but taxable gain above the exclusion can be.
California taxes gains as ordinary income
California doesn’t have a lower rate for capital gains. The Franchise Tax Board taxes all capital gains as ordinary income, at the same rates as wages, whether you owned the home for one year or twenty. A large gain can push part of your income into a higher state bracket for the year of the sale.
California withholding at closing
When California real estate sells, escrow generally has to withhold part of the seller’s proceeds and send it to the Franchise Tax Board. The standard amount is 3 1/3% of the sale price. A seller can instead elect an alternative amount based on the estimated gain, which for individuals is 12.3% of that gain.
Withholding isn’t required when the price is $100,000 or less, or when the seller certifies an exemption on Form 593. Common exemptions include:
- The home qualifies as your principal residence under the federal home sale rules
- The home was last used as your principal residence, even if you didn’t live there two years
- The sale produces a loss or no gain
- The sale is part of a qualifying like-kind exchange
Withholding is a prepayment, not an extra tax. You claim it as a credit on your California return, and qualifying for an exemption doesn’t relieve you of reporting the sale and paying any tax due.
Rentals and former rentals
The home sale exclusion is for your main home, so a property you only rented out generally doesn’t qualify. If you lived in a home and later rented it, or rented part of it, you may qualify for some exclusion, but you can’t exclude the part of the gain equal to depreciation you claimed (or could have claimed) after May 6, 1997. Federally, that portion is taxed at up to 25%.
Investors who plan to buy another investment property can sometimes defer tax with a 1031 exchange, which has strict deadlines. Our page on selling a rental property covers the basics.
Sellers who aren’t U.S. persons
If the seller is a foreign person for tax purposes, a federal law known as FIRPTA requires the buyer to withhold 15% of the amount realized and send it to the IRS. There are exceptions, including when the buyer will live in the home and the price is $300,000 or less. A seller who isn’t a foreign person can sign a certification saying so, which avoids the withholding. A foreign seller can apply to the IRS for a withholding certificate to reduce the amount, and should talk to a tax professional well before closing.
Getting help
These rules have exceptions that this guide doesn’t cover, including military service, homes held in trusts and divorce. A CPA or enrolled agent can look at your purchase records, improvements and income and tell you what you’re likely to owe, ideally before you set a closing date.
Sources
- IRS Publication 523, Selling Your Home (opens in a new tab)
- IRS Topic No. 409, Capital Gains and Losses (opens in a new tab)
- IRS Topic No. 559, Net Investment Income Tax (opens in a new tab)
- Franchise Tax Board: Capital Gains and Losses (opens in a new tab)
- Franchise Tax Board: 2026 Instructions for Form 593 (opens in a new tab)
- IRS: FIRPTA Withholding (opens in a new tab)
General information about California rules as of October 3, 2026, not legal, tax or financial advice. Laws change and every situation is different, so check the details with an attorney, CPA or other professional.