Capital gains tax on home sale California rules start with a federal break: if you owned and lived in the home for at least two of the last five years, you can exclude up to $250,000 of gain, or $500,000 on a joint return, per IRS Topic 701. Gain above that is taxed twice. The IRS uses its 0%, 15% or 20% long-term rates, and California taxes it as ordinary income at rates up to 12.3%, with no lower capital gains rate, per the Franchise Tax Board.
TL;DR
- The home sale exclusion is $250,000 for single filers and $500,000 for most married couples filing jointly (IRS Topic 701).
- You need 24 months of ownership and 24 months of living there within the 5 years before the sale. The two periods don't have to overlap.
- California has no special capital gains rate. Taxable gain is added to your income and taxed at your regular state rate (FTB).
- Higher earners may also owe the 3.8% net investment income tax on gain above the exclusion (IRS Topic 559).
- Your gain is the sale price minus selling costs minus your adjusted basis, and improvements raise your basis.
- Moving early for a job, health or an unforeseeable event can still earn a partial exclusion.
Table of Contents
- How much is capital gains tax on a home sale in California?
- Who qualifies for the capital gains exclusion on a home sale?
- How do you calculate the gain on your home?
- What can you add to your cost basis?
- What federal and California rates apply above the exclusion?
- A worked example: a long-time owner sells
- How is California different from federal rules?
- What if you sell before two years?
- Special situations: spouses, divorce, military, inherited and gifted homes
- What if part of your home was a rental or an office?
- How to avoid capital gains tax on a home sale, legally
- How do you report the sale?
- Mistakes that cost California sellers money
- Perspective: what we tell sellers about capital gains
- Get a realistic sale price before you run the numbers
- FAQ
- Sources
Capital gains tax on home sale California questions come up the moment a seller sees what their place might sell for. Capital gains tax on home sale California rules are kinder than most people fear for a main home, and tougher than most people expect for anything else.
This guide comes from Chelsea Almario in San Diego. It explains the rules in plain words, with figures from the IRS and the Franchise Tax Board and simple examples. We're real estate people, not tax preparers. Use this to understand the moving parts, then talk to a tax adviser about your own numbers before you list.
How much is capital gains tax on a home sale in California?
For most people selling a main home they've lived in for years, the capital gains tax is zero, or a lot less than they feared. The federal exclusion wipes out the first $250,000 or $500,000 of gain, and California generally follows it.
Tax only shows up on the part of your gain above the exclusion. That leftover gain then faces three possible layers:
| Layer | Who sets it | Rate on long-term gain | Source |
|---|---|---|---|
| Federal capital gains tax | IRS | 0%, 15% or 20%, depending on taxable income | IRS Topic 409 |
| Net investment income tax | IRS | 3.8% on part of the gain, if income is above $200,000 single or $250,000 joint | IRS Topic 559 |
| California income tax | FTB | Your ordinary state rate, 1% to 12.3%, plus 1% on taxable income over $1 million | FTB 2025 rate schedules |
The "long-term" rate needs more than a year of ownership. A home you held for a year or less is a short-term gain, and the IRS taxes that as ordinary income, per Topic 409. That rarely matters for a main home, since the exclusion itself needs two years. It matters a lot for flips.
San Diego prices are why this topic gets so much attention here. A couple who bought in the early 2000s and sells today can easily have a gain bigger than $500,000. A single owner crosses $250,000 even faster. That's when the rest of this guide starts to matter.
Who qualifies for the capital gains exclusion on a home sale?
You qualify for the capital gains exclusion on a home sale if you pass three tests: ownership, use and look-back. All three are measured against the five years ending on your closing date, per IRS Topic 701 and Publication 523.
- Ownership test. You owned the home for at least 24 months in those five years.
- Use test. You lived in it as your main home for at least 24 months in those five years. The months don't have to be in a row.
- Look-back test. You didn't exclude gain on another home sale in the two years before this one.
The ownership and use periods can be different stretches of time. You could rent the house for two years and then buy it and live there for two more. As long as both tests are met inside the five-year window, you pass.
How do married couples qualify for $500,000?
Married couples get the full $500,000 on a joint return if either spouse meets the ownership test, both spouses meet the use test, and neither took the exclusion in the last two years. If only one spouse lived there for two years, the couple may get only that spouse's $250,000. Pub 523 walks through these combinations.
What counts as your "main home"?
Your main home is the one you actually live in most of the time. The FTB's Publication 1016 says you can have only one principal residence at a time. If you own two, the one you live in most counts. A house, condo, co-op, houseboat with living facilities, or a fixed mobile home can all qualify. A vacation home in Julian or a rental in El Cajon doesn't, unless you really lived there long enough.
How do you calculate the gain on your home?
Your gain is what you sold for, minus your selling costs, minus your adjusted basis. The IRS worksheet in Publication 523 runs it in that order:
- Sale price. The contract price.
- Minus selling expenses. Commissions, advertising, legal fees and some loan charges you paid as the seller. The result is your "amount realized."
- Minus adjusted basis. What you paid for the home, plus certain purchase costs, plus improvements, minus a few items like casualty losses you deducted or depreciation you claimed.
- Equals your gain. If the number is negative, it's a loss.
A loss on your own home isn't deductible. The IRS treats a main home as personal-use property, and Topic 409 says losses on personal-use property don't lower your taxes.
Selling costs in San Diego can be large, so track them. Commission, escrow and title fees, and the county documentary transfer tax all reduce your amount realized. Our San Diego closing costs guide lists what sellers typically pay at closing.
What can you add to your cost basis?
You can add the purchase price, some of your original closing costs, and every real improvement you've made. Each dollar added to basis is a dollar of gain you don't pay tax on.
From your purchase, Pub 523 lets you include items such as:
- Abstract and title search fees
- Charges for installing utility services
- Legal fees for the title search, contract and deed
- Recording fees and survey fees
- Transfer or stamp taxes you paid
- Owner's title insurance
Amounts put into escrow for future taxes and insurance don't count.
Improvements vs. repairs
An improvement adds value, extends the home's life, or adapts it to a new use. Think a new roof, a kitchen remodel, a room addition, a new HVAC system, solar panels you own, or a new sewer line. Those raise your basis.
A repair keeps the home in normal shape, like patching a leak, repainting a room or fixing a broken window. Repairs alone usually don't count. There's an exception in Pub 523 for repairs done as part of a larger remodel, which can be added along with the project.
Watch for improvements you've since removed. If you put in carpet in 2010 and replaced it with hardwood in 2020, the old carpet's cost comes out of your basis. Credits and subsidies you got for energy upgrades can also reduce basis.
Many San Diego homes from the 1920s to the 1950s, in places like North Park, Kensington and Normal Heights, have had decades of work done. If you've owned one a long time, your receipts may be worth real money.
What federal and California rates apply above the exclusion?
Above the exclusion, the IRS taxes long-term gain at 0%, 15% or 20% based on your total taxable income, and California taxes it at your regular state bracket. Here are the most recent published figures.
Federal long-term capital gains brackets, tax year 2026 (taxable income; IRS Rev. Proc. 2025-32, section 4.03):
| Rate | Single | Married filing jointly | Head of household |
|---|---|---|---|
| 0% | Up to $49,450 | Up to $98,900 | Up to $66,200 |
| 15% | $49,451 to $545,500 | $98,901 to $613,700 | $66,201 to $579,600 |
| 20% | Over $545,500 | Over $613,700 | Over $579,600 |
A sale that closes in 2026 is taxed on your 2026 return, so these are the figures that apply to most sales right now. (For sales closed in 2025, the 0% band ended at $48,350 single and $96,700 joint, per IRS Topic 409.)
These thresholds are adjusted for inflation each year, so check the current year's figures with your tax adviser. On top of these rates, the 3.8% net investment income tax applies to the smaller of your net investment income or your modified AGI above $200,000 single or $250,000 joint. Excluded home sale gain is not counted for that tax, per Topic 559.
California brackets, tax year 2025, married filing jointly (FTB 2025 tax rate schedules):
| Taxable income | Rate on that slice |
|---|---|
| $0 to $22,158 | 1% |
| $22,158 to $52,528 | 2% |
| $52,528 to $82,904 | 4% |
| $82,904 to $115,084 | 6% |
| $115,084 to $145,448 | 8% |
| $145,448 to $742,958 | 9.3% |
| $742,958 to $891,542 | 10.3% |
| $891,542 to $1,485,906 | 11.3% |
| Over $1,485,906 | 12.3% |
Single filers hit each bracket at about half those amounts. The 9.3% band, for example, runs from $72,724 to $371,479 for a single filer. If your California taxable income tops $1,000,000, the FTB adds the 1% Behavioral Health Services Tax on the amount over $1 million, per the 2025 Form 540 booklet. It used to be called the Mental Health Services Tax.
A worked example: a long-time owner sells
Here's a simplified example with made-up numbers, to show how the pieces stack. Real returns have deductions and credits this skips.
A married couple bought a University Heights house in 2008 for $450,000. Their purchase closing costs that count toward basis were $6,000. Over the years they spent $90,000 on a new roof, a kitchen and windows, and they kept every receipt. In 2026 they sell for $1,350,000 and pay $70,000 in commission and other selling costs. Their other taxable income is $150,000.
| Step | Amount |
|---|---|
| Sale price | $1,350,000 |
| Minus selling costs | −$70,000 |
| Amount realized | $1,280,000 |
| Basis: price + closing costs + improvements | $546,000 |
| Gain | $734,000 |
| Minus joint exclusion | −$500,000 |
| Taxable gain | $234,000 |
Now the tax, using 2025 rates for simplicity:
- Federal. Their total taxable income lands around $384,000, inside the 15% band for joint filers. So roughly 15% × $234,000 = $35,100.
- Net investment income tax. Their MAGI is about $384,000, which is $134,000 over the $250,000 threshold. The tax is 3.8% of the smaller of $234,000 or $134,000, so 3.8% × $134,000 = $5,092.
- California. Their other income already sits in the 9.3% bracket, and the extra $234,000 stays inside it, so roughly 9.3% × $234,000 = $21,762.
That's about $62,000 in total. Without those $90,000 of receipts, their taxable gain would be $324,000 and the bill would be higher by roughly $25,000. That's the case for keeping a folder of every invoice from the day you buy.
If one spouse had died and the survivor sold within two years of the death without remarrying, the survivor could still claim $500,000, per Pub 523. If they were single sellers from the start, only $250,000 would be excluded.
How is California different from federal rules?
California is different in three ways: it has no lower capital gains rate, it can require withholding at closing, and it has its own Schedule D when your federal and state numbers don't match.
No special rate. The FTB says it plainly: "California does not have a lower rate for capital gains." All capital gains are taxed as ordinary income. That's why the state share in the example above is so large.
Same exclusion, in general. The FTB says California law generally conforms to the federal tax code as of January 1, 2025 (FTB like-kind exchange page). Its real estate withholding rules use the same IRC Section 121 ownership-and-use test for a principal residence (FTB Pub 1016). Where your federal and state gain differ, you file California Schedule D (540).
Withholding at closing. California requires real estate withholding when title transfers, usually 3 1/3% of the total sales price, unless an exemption applies (FTB Pub 1016). There's a full exemption when the home qualifies as your principal residence under the two-of-five-year test. Withholding also isn't required when the total sales price is $100,000 or less. You claim an exemption on Form 593, which escrow collects before closing. Any withholding is a credit against your California tax, not an extra tax.
Moving out of state doesn't erase it. California taxes gain on California real estate even if you've moved away by the time you sell. The FTB's Form 3840 instructions put it this way: the source of gain on California property is fixed when the gain is realized. If you relocated to Arizona and sell your old Point Loma house, expect a California nonresident return. Ask your tax adviser about timing.
What if you sell before two years?
If you sell before meeting the two-year tests, you may still get a partial exclusion when the main reason for the sale was a work move, a health issue or an unforeseeable event. The IRS lists the qualifying reasons in Pub 523:
- Work-related move. A new job location at least 50 miles farther from the home than your old one. For example, your old job was 15 miles away and the new one is 65 miles away.
- Health-related move. You moved to get or provide care for a disease, illness or injury, for you or a close family member.
- Unforeseeable events. Things like a death in the family, a divorce, a job loss with unemployment, multiple births from one pregnancy, or the home being destroyed or condemned.
The partial exclusion is a fraction of the full amount, based on how many months you met the tests out of 24. Here's an illustration: a single owner who lived in a Hillcrest condo for 12 months, then took a job in Los Angeles that's more than 50 miles farther away, could exclude about 12/24 of $250,000, or $125,000.
That's often enough. A short-hold condo may not have gained much at all.
Special situations: spouses, divorce, military, inherited and gifted homes
Special situations can change your exclusion, your basis or both. These are the ones San Diego sellers ask about most.
Surviving spouse
A surviving spouse can use the full $500,000 if the home sells within two years of the spouse's death, they haven't remarried, and the usual tests are met, counting the late spouse's time (Pub 523). The basis also changes. The late spouse's share takes a new basis equal to its fair market value at death.
California is a community property state, and that can help a lot. When a spouse dies, Pub 523 says the full fair market value of community property becomes the basis of the entire property, including the surviving spouse's half, as long as at least half of the community interest is included in the decedent's estate. For a couple who bought decades ago, that can reduce the gain to almost nothing. How the home was titled matters, so this is a question for an estate attorney and a tax adviser.
Divorce
If you get the home in a divorce, you generally take your former spouse's basis. Pub 523 also lets you count time your ex-spouse lived in the home under a divorce or separation agreement toward your use test, which helps the spouse who moved out.
Military and Foreign Service
If you or your spouse are on qualified official extended duty in the uniformed services, the Foreign Service or the intelligence community, you can suspend the five-year window for up to 10 years (IRS Topic 701). Qualified duty means more than 90 days at a station at least 50 miles from the home, or living in government housing under orders. With Naval Base San Diego and Camp Pendleton nearby, this rule matters for many local owners who kept a home while deployed or reassigned.
Inherited homes
An inherited home gets a stepped-up basis: generally the fair market value on the date of death, per Pub 523. If you sell soon after inheriting, there may be little or no gain. If you hold it, gain from that date on is taxable unless you move in and meet the two-year tests yourself.
Property tax is a separate question. An inherited home may be reassessed unless it qualifies for the parent-child exclusion, which now generally requires the child to live there. Talk to the County Assessor and a tax adviser early.
Gifted homes
A home you received as a gift usually keeps the giver's basis, not today's value. A parent who "gifts" a house bought for $200,000 passes along that $200,000 basis. Compare that with inheriting the same house, and the difference in tax on a later sale can be large. Pub 523 has a table of exceptions.
Homes acquired through a 1031 exchange
If you got the home through a like-kind exchange and later moved in, you can't use the exclusion if you sell within five years of acquiring it, per Pub 523. This catches investors who convert an exchanged rental into a residence and sell too soon.
What if part of your home was a rental or an office?
Rental or business use can shrink your exclusion in two ways: depreciation recapture and "nonqualified use." Both are common in San Diego, where many owners have rented out a home, a unit or a granny flat at some point.
Depreciation recapture. Any depreciation you claimed, or were allowed to claim, after May 6, 1997 can't be excluded (Pub 523). It's taxed at up to 25% federally as "unrecaptured section 1250 gain," per Topic 409. California taxes it as ordinary income like the rest of the gain. A home office inside your living space doesn't require splitting the gain, but the depreciation part still can't be excluded.
Separate structures. If the rental or business space is separate from your living area, such as a detached unit you rented out, Pub 523 may require you to split the sale between the home part and the rental part. The rental part generally doesn't get the exclusion. If you've built or rented an ADU, read our ADU rules guide, and bring your rental records to your tax adviser.
Nonqualified use. Time after 2008 when neither you nor your spouse used the home as your main residence is "nonqualified use." The share of gain tied to those periods can't be excluded (Pub 523). Here's an illustration: you buy a house in 2019, rent it out for two years, then move in for three and sell in 2024. Two of your five years were nonqualified use, so about 2/5 of the gain (not counting depreciation) isn't eligible.
There's an important exception. Renting the home after you move out, within the five-year window, isn't nonqualified use. So if you lived in your North Park house for three years and rented it for two before selling, you can still exclude the gain, minus recapture. Wait longer than three years after moving out, though, and you fail the use test entirely.
How to avoid capital gains tax on a home sale, legally
You avoid capital gains tax on a home sale mostly by qualifying for the full exclusion and keeping your basis as high as the records allow. Beyond that, the options are about timing and structure. Run each one past a tax adviser before you rely on it.
- Hit the two-year mark. If you're at 20 months, waiting four more can be worth tens of thousands. Check the closing date, not the listing date.
- Keep every improvement receipt. Permits, contracts, invoices and cancelled checks prove your basis. Pub 523 says to keep basis records until 3 years after the due date of the return for the year you sell, which for a long-held home can mean decades of paper.
- Don't move out too early. After you leave, you have three years before the use test fails. A rental gap longer than that costs you the whole exclusion.
- Mind the two-year look-back. Selling two homes within two years means only one can use the exclusion, unless a partial exclusion applies.
- Think about how the home is titled. Community property and survivorship titles affect the basis your heirs or surviving spouse receive. That's an attorney conversation.
- Use losses you already have. Capital losses from other investments can offset capital gains, and extra losses carry forward (Topic 409).
- Consider an installment sale in rare cases. If you carry back financing, Topic 701 notes you can report gain over time and still use the exclusion. Few San Diego sellers do this, and it carries real risk.
- For rentals, ask about a like-kind exchange. A 1031 exchange defers tax on investment property. It doesn't apply to a main home, and California tracks the deferred gain if you buy out of state.
What doesn't work: "rolling over" into a more expensive house. Under today's rules, buying a bigger home doesn't defer tax on the one you sold.
How do you report the sale?
You report the sale on your federal return if you get a Form 1099-S or if any gain isn't excluded. Topic 701 says that if you receive a 1099-S, you must report the sale even when the entire gain is excludable.
- Form 8949 and Schedule D (Form 1040) carry the federal numbers.
- California Schedule D (540) is used when your California gain differs from federal (FTB).
- Form 593 shows any California withholding taken at escrow. Keep the copy escrow gives you.
- Estimated tax payments may be due in the quarter you sell if you'll owe, since nobody withholds federal tax on a home sale. Topic 409 points to Publication 505 for the rules.
Escrow files the 1099-S. Whether you get one depends partly on certifications you sign at closing. Our California escrow process guide explains what crosses your desk and when.
Mistakes that cost California sellers money
These are the mistakes that most often turn a tax-free sale into a taxable one, or make a taxable one bigger:
- Losing the receipts. Without proof, a $100,000 remodel adds $0 to your basis.
- Counting from the wrong date. The tests run to the closing date. Being a few days short of 24 months can mean losing the full exclusion.
- Assuming the spouse qualifies. Both spouses must meet the use test for $500,000.
- Forgetting depreciation. If you ever rented the home and claimed depreciation, that part is taxable, even if the rest is excluded.
- Renting too long after moving out. More than three years and the use test fails.
- Treating a gift like an inheritance. A gifted home keeps the giver's low basis.
- Skipping estimated payments. A large gain with no withholding can bring an underpayment penalty.
- Missing the Form 593 exemption. If escrow doesn't get a completed exemption before closing, it withholds. You'll get the money back at filing time, but it's tied up until then.
Perspective: what we tell sellers about capital gains
We tell sellers to get a rough gain number before they set a list price, not after the offers come in. It takes about 15 minutes: your purchase price, a pile of improvement receipts, a realistic sale price and an estimate of selling costs.
If the gain is clearly under your exclusion, you can relax and focus on the sale. If it's close, or over, book time with a tax adviser before you list. They may find timing, basis or title questions that change the answer, and some of those only work before you sign.
We also remind people that a tax bill is not a reason to keep a home that no longer fits. Paying tax on a gain means you made money. The goal is to pay the right amount, not to avoid selling.
And we never give tax advice. We can help with the parts we know: what the home is likely to sell for, what selling costs look like in San Diego, and how the closing date is set. The rest belongs with a CPA or enrolled agent.
Get a realistic sale price before you run the numbers
Every capital gains estimate starts with one number you can't get from a tax form: what your home will actually sell for. A pricing call that respects what your home is really worth makes the rest of the math meaningful.
Start with a free San Diego home value estimate, learn how we approach selling your home, or walk through the listing process. When you're ready to talk, contact Chelsea Almario or call (619) 261-9129.
FAQ
Do you pay capital gains tax on a home sale in California?
Only on gain above the exclusion. If you owned and lived in the home at least two of the last five years, up to $250,000 of gain ($500,000 for most joint filers) is excluded. Anything above that is taxed by both the IRS and California.
What is the capital gains tax rate on a home sale in California?
California taxes the gain as ordinary income, from 1% up to 12.3%, plus 1% on taxable income over $1 million. Federally, long-term gain is taxed at 0%, 15% or 20%, and some sellers also owe the 3.8% net investment income tax.
How can I avoid capital gains tax when selling my house?
The main legal ways are to meet the two-of-five-year tests, keep improvement records to raise your basis, and avoid renting the home more than three years after you move out. For investment property, a 1031 exchange can defer the tax. A tax adviser can check what fits your case.
Does California follow the federal $250,000/$500,000 exclusion?
Generally yes. The FTB says California conforms to the federal tax code as of January 1, 2025, and its withholding rules use the same Section 121 test. If your state and federal gain differ, you file California Schedule D (540).
At what age do you stop paying capital gains tax on a home sale?
There's no age-based exemption in today's federal rules. The same $250,000/$500,000 exclusion and the same two-of-five-year tests apply whether you're 35 or 85.
Do I have to report the sale if all my gain is excluded?
You do if you received Form 1099-S, per the IRS. If you didn't get one and your full gain is excluded, you generally don't report it. Keep your records either way.
Will escrow withhold California tax when I sell my home?
Not if you qualify for the principal residence exemption and complete Form 593 before closing. Otherwise, escrow generally withholds 3 1/3% of the sales price, which counts as a credit on your California return.
Sources
- IRS — Topic No. 701, Sale of Your Home
- IRS — Publication 523, Selling Your Home
- IRS — Topic No. 409, Capital Gains and Losses
- IRS — Topic No. 559, Net Investment Income Tax
- California Franchise Tax Board — Capital gains and losses
- California Franchise Tax Board — 2025 California Tax Rate Schedules
- California Franchise Tax Board — 2025 Form 540 Booklet
- California Franchise Tax Board — Publication 1016, Real Estate Withholding Guidelines
- California Franchise Tax Board — 2025 Instructions for Form FTB 3840
- California Franchise Tax Board — Reporting like-kind exchanges
