How to Avoid Capital Gains Tax in California: Legal Strategies Explained

how to avoid capital gains tax in california
Written by
Uploaded on
Share

California is one of the most expensive states to sell an asset. The state is known to tax capital gains as regular income, with no discount for holding assets long-term. If you want to avoid capital gains tax in California, you need a plan before the sale.

In this blog, we break down each IRS- and FTB-approved method to avoid capital gains tax in California legally, who qualifies, and where most investors lose money by waiting too long.

Understanding Capital Gains Tax in California

A capital gain is the profit from selling an asset for more than you paid. The IRS defines two types:

  • Short-term gains: From assets held less than one year. Taxed as ordinary income federally and at the state level.
  • Long-term gains: From assets held more than one year. Taxed at 0%, 15%, or 20% federally, depending on your income bracket.

California capital gains tax applies your regular income tax rate to both types. California does not offer any preferential rate for long-term holdings. That is a major difference from federal law.

Why Capital Gains Taxes Are High in California

California’s top income tax rate is at 13.3%, which applies to income over $1 million. That rate is the highest state income tax rate in the country.

Combined with the federal long-term rate of 20% and the 3.8% Net Investment Income Tax (NIIT) for high earners, the total tax on a large capital gain can reach 37.1%. That is why more California investors are looking for legal ways to avoid capital gains tax in California before any sale closes.

  • The California capital gains tax rate ranges from 1% to 13.3%, based on total taxable income
  • California applies this rate to all capital gains, including long-term, with zero exceptions
  • The 3.8% federal NIIT applies when modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly)
  • California does not impose its own NIIT, but the state income tax applies to the same investment income

When Capital Gains Tax Applies to California Residents

California residents owe the state capital gains tax on worldwide income. Non-residents owe it on California-source income. Selling a California rental property after moving to Texas still triggers California tax, confirmed by the California Franchise Tax Board.

Capital gains tax applies when you sell

  • Stocks, ETFs, or mutual funds held in taxable brokerage accounts
  • Real estate that does not qualify for the primary residence exclusion
  • Business ownership interests or business assets
  • Cryptocurrency (the IRS treats it as property; California follows this)
  • Collectibles, artwork, or other investment-grade assets

Use a 1031 Exchange to Defer Capital Gains Tax

A 1031 exchange lets real estate investors sell one investment property and buy another while deferring the capital gains tax. California conforms to IRS Section 1031, so the state tax defers, too.

But under California Revenue and Taxation Code Section 18032, if you exchange a California property for an out-of-state property, California tracks the deferred gain. When that out-of-state property eventually sells, California taxes the original deferred gain even if you no longer live in California.

The key 1031 deadlines:

  • Identify the replacement property within 45 days of the sale
  • Close on the replacement property within 180 days of the sale
  • The replacement must be of equal or greater value to defer all gain
  • A qualified intermediary must hold the sale proceeds throughout

1031 exchange California real estate investors use this to build larger portfolios without triggering a tax bill. It is one of the most powerful tools to avoid capital gains tax in California on investment property, as long as the clawback rule is understood and planned for.

Primary Residence Exclusion Rules in California

The IRS allows homeowners to exclude up to $250,000 of home sale profit from taxable income. Married couples filing jointly can exclude up to $500,000. California conforms to this rule under IRC Section 121.

To qualify for the primary residence exclusion tax rule:

  • You must have owned the home for at least 2 years within the last 5 years before selling
  • You must have lived in the home as your primary residence for at least 2 of those 5 years
  • You cannot have used this exclusion within the past 2 years on another home

A partial exclusion is available if you sell due to a job relocation, a health issue, or an unforeseen event, even if you do not fully meet the 2-year rule. The partial exclusion is calculated as a fraction of the full amount based on how long you actually lived there.

Real estate tax planning for homeowners in California starts with this exclusion. It is the simplest, most direct way to avoid capital gains tax in California on a home sale.

Offset Gains With Capital Loss Harvesting

If you sell one investment at a profit, selling another at a loss in the same tax year offsets that gain dollar for dollar. The IRS and California FTB both allow this, and California follows federal rules on loss carryovers.

If your total losses exceed your total gains, you can deduct up to $3,000 of the net loss against ordinary income per year. The remaining loss carries forward to future tax years, letting you reduce capital gains tax in those years too.

The capital loss harvesting strategy works well in volatile markets. If a stock you hold has dropped 30%, selling it to offset a gain elsewhere turns a bad investment into a tax advantage.

The IRS wash-sale rule: you cannot buy the same or substantially identical security within 30 days before or after the sale.

The capital loss harvesting strategy requires year-end coordination. Waiting until December to review your portfolio gives you time to match gains with losses before the tax year closes.

Invest Through Opportunity Zone Programs

The federal Opportunity Zone program under IRC Section 1400Z-2 allows investors to defer capital gains by reinvesting gains into a Qualified Opportunity Fund within 180 days of a sale.

California does not conform to the federal Opportunity Zone rules. The FTB confirmed this position. California residents still owe state income tax on the original gain in the year of the sale, with no state-level deferral.

The federal opportunity zone tax benefits remain valuable despite this. Federal tax on the original gain is deferred until the earlier of the date the Opportunity Fund investment is sold or December 31, 2026. Appreciation on the Opportunity Fund investment held for 10 or more years is excluded from federal capital gains tax entirely.

High-income investors should still weigh the federal opportunity zone tax benefits carefully, knowing California will tax the original gain immediately.

Use Tax-Advantaged Retirement Accounts for Investments

Investing through a 401(k), traditional IRA, or Roth IRA shields gains from capital gains tax while the money grows. This is one of the most underused investment tax strategies California residents have access to.

  • Traditional IRA and 401(k): Gains grow tax-deferred. You pay income tax on withdrawals in retirement, but no capital gains tax while invested.
  • Roth IRA: Contributions go in after tax. Qualified withdrawals in retirement are tax-free at both the federal and California state levels. California does not tax qualified Roth IRA distributions.
  • Solo 401(k) or SEP-IRA: Self-employed individuals can contribute significantly more than a standard IRA allows, sheltering more gains from tax each year.

Moving high-growth assets into a Roth IRA is one of the best legal ways to avoid capital gains tax in California over the long term.

Strategic Tax Planning for High-Value Asset Sales

Selling a business, a large real estate portfolio, or concentrated stock requires planning months or years before the actual sale date. Timing, ownership structure, and income in the surrounding years all change the tax outcome significantly.

Strategies that work before the sale:

  • Installment sales (IRC Section 453): Receive sale payments over multiple years instead of all at once. California conforms to installment sale rules. Spreading income across years keeps each year’s income in a lower bracket.
  • Charitable remainder trusts (CRT): Transfer an appreciated asset to a CRT before the sale. The trust sells the asset without recognizing immediate capital gain, pays you income for a set term, and gives the remainder to charity. You receive a partial charitable deduction in the year of transfer.
  • Stepped-up basis at death: Assets inherited by heirs receive a stepped-up cost basis equal to the fair market value at the date of death. Heirs owe zero capital gains tax on all prior appreciation. California conforms to this federal rule under IRC Section 1014.
  • Gifting appreciated assets to lower-income family members: Gifts to family members in a lower tax bracket shift the capital gain to someone who pays a lower rate.

Long-term capital gains planning requires professional tax advice before any large sale closes. Hopkins CPA Firm is built for exactly this situation.

For California investors planning a high-value sale, that depth of real-world knowledge is the difference between keeping your profit and writing a six-figure check to the state. Book a discovery call before your sale closes.

Common Mistakes That Increase Capital Gains Tax in California

Selling first and reviewing tax options afterward is the most expensive mistake. Once the sale closes, your options to avoid capital gains tax in California are almost gone. Planning must happen before the transaction.

Costly mistakes to stop making:

  • Ignoring cost basis improvements: Home renovations, closing costs, and capital improvements increase your cost basis. A higher basis means lower taxable gain. Sellers who skip this step pay tax on gains that the numbers do not actually support.
  • Missing the partial home exclusion: If you sold your home due to a job change, health condition, or unforeseen circumstance before meeting the full 2-year requirement, a partial exclusion still applies. Most sellers do not claim it.
  • Mishandling employer stock options: ISO exercise timing and ESPP holding periods directly determine whether gains are short-term or long-term. Getting this wrong costs thousands.
  • Assuming a 1031 exchange into another state fully ends California tax: It does not. California’s clawback provision follows the deferred gain across state lines.
  • Not tracking prior-year loss carryovers: Unused capital losses from prior years carry forward indefinitely. Investors who do not track this leave real tax offsets on the table.

These mistakes all reduce capital gains tax savings that were legally available before the sale.

When to Work With a Tax Professional for Capital Gains Planning

A simple stock sale in a taxable account rarely needs a CPA. Most brokerage platforms report cost basis correctly. But these situations almost always do:

  • Selling real estate worth more than $500,000
  • Doing a 1031 exchange, especially one involving out-of-state replacement property
  • Selling a business or a partial ownership interest
  • Holding incentive stock options, RSUs, or ESPP shares with complex vesting and holding rules
  • Moving into or out of California in the same year as a large sale
  • Having capital loss carryovers from prior years you have never used

California-specific rules on real estate, trusts, and business sales do not follow federal law cleanly.

Hopkins CPA Firm Cuts Your California Tax Bill

Once an asset sells, most legal options to reduce what you owe are gone. The strategies that actually work all require action before the sale closes.

Hopkins CPA Firm brings a team of former IRS agents, advanced tax strategists, and California-experienced professionals with 150+ years of cumulative IRS expertise. We have a former IRS Appeals Agent and former California State Agent on our team who know how the FTB operates and where legal tax reduction opportunities exist before your sale closes.

Do not let California take more than it is legally owed. Contact Hopkins CPA Firm today and protect what you earned.

FAQs

The California capital gains tax rate runs from 1% to 13.3%, based on total taxable income. California taxes all gains as ordinary income, with no long-term discount. Add the federal rate (up to 20%) and the 3.8% NIIT, and total tax can hit 37.1% for high-income earners.

Yes. Legal ways to avoid capital gains tax in California include the $250K/$500K primary residence exclusion, 1031 exchanges on investment property, Roth IRA investing, capital loss harvesting, installment sales, and charitable remainder trusts. Each has specific eligibility conditions set by the IRS and California FTB.

Yes, California conforms to IRS Section 1031 for California real estate transactions that are 1031 exchanges. Both federal and state tax deferral. However, under California Revenue and Taxation Code Section 18032, if the replacement property is outside California, the FTB tracks and taxes the deferred gain when that property eventually sells.

The primary residence exclusion tax rule under IRC Section 121 excludes up to $250,000 (single) or $500,000 (married) of home sale profit from taxable income. You must own the home and live in it as your primary residence for at least 2 of the 5 years before the sale date.

Keep purchase contracts, closing disclosures, receipts for all capital improvements, records of selling costs, and brokerage statements showing original cost basis. For real estate, every documented improvement raises your basis and cuts your taxable gain dollar for dollar. Missing records force you to use the lower original purchase price as your basis.

Table of Contents

Form Title
To tackle your IRS Notice smartly.
Author

Joe has 30+ years as a Certified Public Accountant licensed in the State of Texas and solving IRS problems. Current member with the American Institute of Certified Public Accountants (AICPA), Texas Society of CPA’s (TSCPA), National Society of Accountants (NSA), Bachelor’s degree in accounting (BBA), Master’s degree in Business Administration (MBA) at Texas A&M Corpus Christi. Experience in a variety of industries as Controller, CFO and tax resolution issues for both business and personal tax cases. 

At Hopkins CPA Firm, we adhere to a stringent editorial policy emphasizing factual accuracy, impartiality and relevance. Our content, curated by experienced industry professionals. A team of experienced editors reviews this content to ensure it meets the highest standards in reporting and publishing.

More Similar Posts
Author

Joe has 30+ years as a Certified Public Accountant licensed in the State of Texas and solving IRS problems. Current member with the American Institute of Certified Public Accountants (AICPA), Texas Society of CPA’s (TSCPA), National Society of Accountants (NSA), Bachelor’s degree in accounting (BBA), Master’s degree in Business Administration (MBA) at Texas A&M Corpus Christi. Experience in a variety of industries as Controller, CFO and tax resolution issues for both business and personal tax cases. 

casinos canada 2026 kasinot ilman rekisteröitymistä