California and Federal Capital Gains Tax Calculator
Estimate your capital gains tax across federal and California rules with a premium calculator built for investors, homeowners, and business owners. This tool uses progressive tax logic for short-term and long-term gains and provides a clear chart of your projected tax breakdown.
Your estimated results
Enter your details and click Calculate Capital Gains Tax to see your federal tax, California tax, optional NIIT, and after-tax proceeds.
How to calculate capital gains tax in California and at the federal level
If you are trying to calculate capital gains tax California and federal, the biggest mistake is assuming there is one single tax rate. In reality, a capital gain can be affected by your holding period, filing status, total taxable income, potential selling expenses, and whether the federal Net Investment Income Tax applies. California adds another important layer because the state does not offer a special lower long-term capital gains rate. Instead, California generally taxes capital gains as ordinary income.
This calculator is designed to give you an advanced estimate for both systems at the same time. It starts by determining your net capital gain, which is usually your sale price minus your cost basis minus eligible selling expenses. Then it applies federal rules based on whether the gain is short-term or long-term. Finally, it estimates your California state tax by treating the gain as ordinary income and calculating the increase in your progressive California tax liability.
Important: this tool is an estimate, not legal or tax advice. It does not handle every special case such as depreciation recapture, Section 1202 stock exclusions, installment sales, Opportunity Zone treatment, wash sale impacts, primary residence exclusions, passive loss carryforwards, or business entity level adjustments.
Step 1: Find your net capital gain
The starting point in almost every calculation is the net gain. For many taxpayers, the formula looks like this:
- Net capital gain = Sale price – Cost basis – Selling expenses
- Cost basis often includes the original purchase price plus improvements, acquisition costs, and certain adjustments
- Selling expenses can include commissions, legal fees, escrow fees, and transfer costs
For example, if you sell an asset for $500,000, your adjusted cost basis is $300,000, and selling expenses total $20,000, your gain would be $180,000. That is the amount potentially exposed to federal and California tax.
Step 2: Determine whether the gain is short-term or long-term
Federal tax law gives favorable rates to many long-term capital gains, but only if you held the asset for more than one year. If you held it for one year or less, it is generally treated as short-term and taxed at ordinary income rates. That distinction can create a very large tax difference.
Short-term capital gains
Short-term gains are usually taxed at your ordinary federal income tax rates. If your base taxable income is already high, an additional short-term gain can be taxed at a high marginal rate. California also treats the gain as ordinary income, so there is no special state discount.
Long-term capital gains
Long-term gains may qualify for federal rates of 0%, 15%, or 20%, depending on your filing status and taxable income. California still taxes the gain at ordinary income tax rates, which means many California residents owe significant state tax even when the federal rate is relatively favorable.
2024 federal long-term capital gains thresholds
The following table summarizes commonly referenced 2024 federal long-term capital gains thresholds. These thresholds are a critical part of any effort to calculate capital gains tax California and federal accurately because your gain can span more than one federal capital gains bracket.
| Filing status | 0% rate | 15% rate | 20% rate |
|---|---|---|---|
| Single | Up to $47,025 | $47,026 to $518,900 | Over $518,900 |
| Married filing jointly | Up to $94,050 | $94,051 to $583,750 | Over $583,750 |
| Married filing separately | Up to $47,025 | $47,026 to $291,850 | Over $291,850 |
| Head of household | Up to $63,000 | $63,001 to $551,350 | Over $551,350 |
These are federal thresholds only. They do not include California, and they do not automatically include the 3.8% Net Investment Income Tax. That is why a proper estimate needs multiple layers.
How California taxes capital gains
California is different from the federal system in one major respect: the state generally does not provide a lower tax rate for long-term capital gains. Whether your gain is long-term or short-term, California typically treats it as ordinary income. That means the gain is added to your other taxable income and taxed through the state’s progressive rate structure.
For high earners, California can create a substantial state tax burden. This is especially important for stock sales, real estate investments, business exits, and concentrated equity positions. A taxpayer may focus on the federal 15% long-term gain rate and underestimate how much California tax still applies.
California ordinary income tax rate summary
California uses a progressive system with rates ranging from 1% to 12.3%, plus an additional 1% mental health services tax on taxable income above $1,000,000. The exact bracket thresholds vary by filing status and year, but the rate structure below explains why state tax can materially increase the total burden on an asset sale.
| California rate layer | General meaning | Planning implication |
|---|---|---|
| 1% to 8% | Lower and middle taxable income ranges | Smaller gains may still create meaningful state tax |
| 9.3% | Common upper middle income rate | Often a key planning threshold for professionals and investors |
| 10.3% to 11.3% | Higher income levels | Large gains can quickly push more income into these bands |
| 12.3% | Top ordinary income rate | High earners may face substantial state tax on gains |
| Additional 1% | Income above $1,000,000 | Effective top California rate can reach 13.3% |
When the federal Net Investment Income Tax can apply
Many taxpayers forget the Net Investment Income Tax, or NIIT. This federal surtax is generally 3.8% and can apply when your modified adjusted gross income exceeds certain thresholds. Capital gains are often included in net investment income, so a large sale can trigger NIIT even if your basic federal long-term capital gains rate seems manageable.
- Single and head of household: threshold generally starts at $200,000
- Married filing jointly: threshold generally starts at $250,000
- Married filing separately: threshold generally starts at $125,000
The surtax applies to the lesser of net investment income or the amount your modified adjusted gross income exceeds the threshold. In practical terms, if your gain pushes you over the line, part or all of the gain may be subject to an extra 3.8% federal layer.
Why your base taxable income matters
Two people can have the same $100,000 capital gain and owe very different amounts of tax. The reason is that tax rates are applied in the context of all your other income. If one taxpayer already has high taxable income, more of the gain may land in higher federal ordinary brackets, higher California brackets, or a higher long-term capital gain band. That is why this calculator asks for taxable income excluding the gain.
For long-term gains, your ordinary taxable income effectively fills up the lower federal capital gains bands first. If your base taxable income is already above the 0% threshold, the gain starts in the 15% band. If your total taxable income is already high enough, part of the gain may spill into the 20% band. California adds a separate progressive system on top.
Example calculation
Suppose you are a California resident filing single, with $120,000 of taxable income before the sale, $150,000 of modified AGI, and a long-term capital gain of $180,000. A rough estimate could look like this:
- Calculate the gain: $500,000 sale price – $300,000 basis – $20,000 selling expenses = $180,000 gain
- Federal long-term treatment: because your base taxable income is already above the 0% federal threshold for a single filer, most or all of the gain may be taxed at 15%
- California treatment: the full gain is added to your taxable income and taxed through California’s ordinary income brackets
- NIIT estimate: if modified AGI plus the gain exceeds the NIIT threshold, some of the gain may be subject to an additional 3.8%
The result is often much higher than taxpayers expect when they only look at the federal capital gains rate.
Common scenarios where planning matters
Investment real estate
Rental property sales often involve not only capital gains tax but also depreciation recapture, which this calculator does not separately model. In real life, that can make federal tax higher than a simple capital gain estimate. If you own investment property, consider whether a like-kind exchange, installment sale, or timing strategy could help.
Stocks and concentrated positions
Employees and founders often hold appreciated stock for years, then discover that California tax still applies heavily even when the federal gain qualifies for long-term treatment. Spreading sales over multiple tax years or pairing gains with harvested losses can materially change the result.
Business sale or partnership exit
A sale of a business interest can involve asset classification issues, ordinary income recharacterization, state sourcing, and entity level implications. The headline gain number may not equal the amount taxed at capital gains rates. Professional modeling is especially valuable here.
Primary residence sales
Many homeowners can exclude some gain under the home sale exclusion rules, but only if they meet ownership and use tests. If your gain exceeds the exclusion, or if the property was partly rented or used for business, you may still owe federal and California tax on a portion of the sale.
Ways to reduce or manage capital gains taxes
- Hold assets longer: moving from short-term to long-term treatment can reduce the federal rate significantly
- Increase adjusted basis where allowed: improvements, acquisition costs, and certain fees can reduce gain
- Harvest capital losses: realized losses can offset realized gains
- Manage timing: closing a sale in a lower income year can change both federal and California results
- Review NIIT exposure: surtax planning can matter for high-income households
- Consider installment or entity planning: advanced strategies may spread recognition or alter tax treatment
Authoritative sources for further research
If you want to verify the current rules directly, review these official sources:
- IRS Tax Topic No. 409 on Capital Gains and Losses
- California Franchise Tax Board guidance on capital gains and losses
- IRS Q&A on the Net Investment Income Tax
Final takeaway
To calculate capital gains tax California and federal correctly, you need more than a single percentage. You need to identify the net gain, determine whether the gain is short-term or long-term, account for your filing status, add your base taxable income, evaluate California’s ordinary income treatment, and check whether NIIT applies. When all those layers are combined, the total tax burden can be much different from what a simple federal capital gains chart suggests.
This calculator gives you a practical estimate that is useful for planning a sale, comparing scenarios, or deciding whether to change timing. If the transaction is large, complex, or involves real estate, stock compensation, or a business interest, consider working with a CPA or tax attorney to model the transaction precisely before you close.