When you sell the home you live in, federal law lets you exclude up to $250,000 of profit from income, or $500,000 for most married couples filing jointly, if you owned the home and lived in it as your main home for at least two of the five years before the sale. California follows the same exclusion, so many sellers owe no income tax on the sale at all.
Gain above the exclusion is taxable on both returns. Federal law taxes it at long-term capital gains rates if you owned the home for more than a year, but California has no lower rate for capital gains: the taxable gain is added to your other income and taxed at ordinary rates.
What sellers miss is usually the arithmetic around the exclusion: costs that raise their basis, partial exclusions, rental use, basis resets at death, and state withholding at closing. This is general information, not tax or legal advice; confirm your numbers with a CPA or tax attorney before you list.
How your gain is figured
Your gain is not simply the sale price minus what you paid. The IRS calculation in Publication 523 has three parts:
- Amount realized: the sale price minus your selling expenses, such as commissions and the closing costs you pay as the seller.
- Adjusted basis: what you paid for the home, plus certain settlement fees and closing costs from your purchase, plus the cost of improvements, minus items such as depreciation you claimed.
- Gain: the amount realized minus the adjusted basis.
Our guide to Orange County closing costs shows which seller costs typically appear on a settlement statement, from the documentary transfer tax to escrow and title charges.
Improvements versus repairs
Improvements raise your basis; ordinary repairs do not. The IRS describes an improvement as work that adds to the home's value, prolongs its useful life or adapts it to new uses. Its examples include an added bedroom, a new roof, central air conditioning, a septic system and kitchen modernization. Routine repairs and maintenance generally don't count unless they are part of a larger remodeling project.
You can't count improvements that are no longer part of the home, such as carpet you installed and later replaced. Keep contracts, invoices and permits for major projects; if you bought long ago, your purchase closing statement and your city's permit history can help rebuild the figures.
The $250,000 and $500,000 exclusion
The exclusion comes from Section 121 of the Internal Revenue Code. To get the full amount, you must meet three tests:
- Ownership: you owned the home for at least 24 months in the five years ending on the date of sale.
- Residence: you lived in it as your main home for at least 24 months in that same period. The months don't have to be consecutive, and short absences such as vacations still count as time you lived there.
- Look-back: you didn't exclude gain from the sale of another home in the two years before this sale.
For the $500,000 limit, a married couple filing jointly needs only one spouse to meet the ownership test, but both must meet the residence and look-back tests. If they don't, each spouse's limit is figured as if they were single, which often means $250,000. A surviving spouse who hasn't remarried can still use the $500,000 limit if the home sells within two years of the spouse's death and the other conditions are met.
The limits date to 1997 and aren't indexed for inflation. Bills to raise them have been introduced in Congress, so check the IRS guidance in effect for the year you sell.
Partial exclusions
If you sell before meeting the two-year tests, you may still qualify for a reduced exclusion if the main reason for the sale was a change in place of employment, health, or an unforeseeable event. For a job change, the new work location generally must be at least 50 miles farther from the home than the old one. The IRS's list of unforeseeable events includes a death, divorce or legal separation, and loss of a job.
The reduced exclusion is prorated. A single owner who owned and lived in the home for 12 months before a qualifying job transfer can exclude up to half of $250,000, or $125,000.
Service members
If you or your spouse are on qualified extended duty in the uniformed services, the Foreign Service or the intelligence community, you can suspend the five-year test period for up to 10 years. Qualified duty generally means a duty station at least 50 miles from the home, or government quarters under orders.
When the exclusion doesn't cover everything
Gain above the limit. Long-time owners can exceed it. A hypothetical example with made-up numbers: a couple bought an Orange County home for $600,000, paid $15,000 in purchase closing costs that count toward basis, and added $120,000 in improvements, for an adjusted basis of $735,000. They sell for $1,500,000 with $85,000 in selling expenses, for an amount realized of $1,415,000. Their gain is $680,000. After the $500,000 exclusion, $180,000 is taxable on both their federal and California returns.
Rental or home office use. The exclusion is reduced by depreciation from rental or business use of the home. For federal purposes that gain is generally taxed at a maximum rate of 25%. Gain allocated to "nonqualified use", such as years after 2008 when you rented the home out before moving in, generally can't be excluded either. Renting after you move out is treated differently, but the residence test still applies: an owner who lived there exactly two years has about three years after moving out to sell and qualify.
Losses and second homes. You can't deduct a loss on the sale of your main home, and a vacation home or rental that was never your main home doesn't qualify for the exclusion.
How California taxes the gain
California generally conforms to Section 121, so the same exclusion and tests apply on your state return. The difference is the rate: the Franchise Tax Board says California has no lower rate for capital gains and taxes them all as ordinary income. California's highest bracket is 12.3%, and taxable income over $1 million carries an additional 1% Behavioral Health Services Tax, formerly called the Mental Health Services Tax. A large taxable gain can push the year of the sale into a higher bracket than your usual income.
Federally, gain on a home held more than a year is taxed at long-term rates of 0%, 15% or 20%, depending on taxable income. The 3.8% net investment income tax doesn't apply to excluded gain, but taxable gain above the exclusion can count once modified adjusted gross income passes $200,000 for single filers or $250,000 for joint filers.
Inherited homes and the stepped-up basis
When you inherit a home, your basis is generally its fair market value on the date of the owner's death, not what the owner paid, and California uses the same rule. That is why heirs who sell soon after inheriting often owe little tax; get a written date-of-death appraisal to document it. Our guide to inheriting a home in California covers Prop 19, probate and trust sales.
California's community property rules add a benefit couples often miss. When one spouse dies, IRS Publication 551 says the total value of community property generally becomes the basis of the entire property, as long as at least half of the community interest is includible in the decedent's gross estate. A surviving spouse can then sell with much of the lifetime gain erased. How title was held matters, so have your CPA or estate attorney confirm whether the home was community property.
California withholding at escrow
California law requires withholding when California real estate is sold unless an exemption applies, and escrow normally handles it. The Franchise Tax Board's Publication 1016 sets the standard amount at 3 1/3% of the total sales price; a seller can instead elect an alternative calculation based on the estimated gain multiplied by the seller's maximum tax rate.
No withholding is required when any of these apply:
- The total sales price is $100,000 or less.
- The home qualifies as your principal residence under the Section 121 tests, or you last used it as your principal residence (for withholding purposes only, the two-year period doesn't apply).
- The sale produces a loss or zero gain.
You claim an exemption on FTB Form 593, signed under penalty of perjury and delivered to escrow before closing. Withholding isn't an extra tax: it is credited against what you owe on your California return, and any excess is refunded only after the FTB processes that return.
Sellers who are foreign persons face separate federal withholding under FIRPTA, generally 15% of the amount realized. And if escrow issues you a Form 1099-S, the IRS says you must report the sale on Form 8949 even if all of your gain is excluded.
Mistakes that cost sellers money
- Closing a few weeks short of 24 months of ownership or residence.
- Renting out a former home too long after moving out.
- Discarding receipts for remodels, additions and system replacements.
- Selling two homes within two years and expecting two full exclusions.
- Returning Form 593 late and having 3 1/3% of the price withheld despite qualifying for an exemption.
How Remark Homes can help
Before you list, we estimate your net proceeds, flag timing questions such as the two-year tests, and help gather the records your CPA will ask for. If your sale is tied to a life change, see our guides to selling a home during a divorce and the Prop 19 base year transfer at 55 and older. Learn more about our home selling services, or contact us to talk through your timing.
Frequently asked questions
Do I pay capital gains tax when I sell my house in California?
Only on gain above the exclusion, or on all of it if you don't qualify. Owners who meet the two-out-of-five-year tests can exclude up to $250,000, or $500,000 for most married couples filing jointly, on both federal and California returns.
Do I have to buy another home to avoid the tax?
No. The exclusion doesn't require you to reinvest the proceeds. Buying a replacement home can matter for property tax, but it doesn't change the income tax on your sale.
What if I lived in the home for less than two years?
You may qualify for a partial exclusion if you sold mainly because of a job change, health, or an unforeseeable event such as divorce. The exclusion is prorated by the time you owned and lived there.
Is California withholding the same as the tax I owe?
No. It is a prepayment credited on your California return. Many owners selling their principal residence qualify for an exemption on Form 593.
Sources
- IRS: Publication 523, Selling Your Home
- IRS: Publication 551, Basis of Assets
- IRS: Topic no. 409, Capital gains and losses
- IRS: Questions and Answers on the Net Investment Income Tax
- California Franchise Tax Board: Capital gains and losses
- California Franchise Tax Board: Publication 1016, Real Estate Withholding Guidelines



