Federal And State Capital Gains Tax Calculator

Federal and State Capital Gains Tax Calculator

Estimate your federal and state capital gains taxes in minutes

Use this interactive calculator to estimate long term or short term capital gains tax, compare common state tax rates, and visualize how much of your gain may go to taxes versus after tax proceeds.

Original cost basis before improvements and fees.
Gross amount you expect to sell the asset for.
Add value increasing improvements to basis.
Commissions, closing costs, and other sale expenses.
Estimated taxable income excluding this gain.
Override the default estimated state tax rate if needed.

Estimated total tax

$0

After tax proceeds

$0

Your estimate will appear here

Enter your asset details, income, filing status, and state to estimate federal capital gains tax, possible NIIT, and state tax.

How a federal and state capital gains tax calculator helps you make better decisions

A federal and state capital gains tax calculator gives investors, homeowners, business owners, and anyone selling appreciated assets a fast way to estimate tax exposure before a sale. Capital gains taxes can be deceptively complex because the final number depends on more than just the gain itself. Your holding period, filing status, taxable income, state of residence, selling costs, and whether the 3.8% Net Investment Income Tax applies can all change the outcome. A good calculator lets you bring these moving parts together in one place so you can evaluate whether selling now makes sense or whether delaying the sale could reduce your total tax burden.

At the federal level, the United States taxes short term and long term gains differently. Short term capital gains are generally taxed at ordinary income tax rates, which means they can be expensive for high earners. Long term capital gains, by contrast, usually receive preferential rates of 0%, 15%, or 20%, depending on your taxable income and filing status. On top of this, some taxpayers owe the Net Investment Income Tax, commonly called NIIT, which adds 3.8% in certain situations. Then state taxes enter the picture. Some states have no individual income tax at all, while others tax capital gains as ordinary income or at a flat rate.

The practical value of a calculator is planning. You can compare tax outcomes across multiple sale prices, test whether harvesting losses could help offset gains, and estimate the effect of moving from one state to another. While no calculator replaces a tax professional, it can make you dramatically more informed before talking to a CPA, enrolled agent, or financial planner.

Important: This calculator is an estimate tool for educational planning. Actual tax treatment can differ due to exclusions, depreciation recapture, AMT interactions, carryforward losses, entity structure, residency rules, and tax law changes.

What this calculator estimates

  • Adjusted cost basis using purchase price plus improvements
  • Net sales proceeds after selling costs and fees
  • Capital gain or loss from the transaction
  • Federal tax based on short term or long term treatment
  • Estimated state capital gains tax using a common state rate assumption
  • Potential 3.8% NIIT where income thresholds suggest it may apply
  • Total taxes and after tax proceeds

Core capital gains formula

The starting point is simple:

  1. Adjusted basis = purchase price + capital improvements
  2. Net sale amount = sale price – selling costs
  3. Capital gain = net sale amount – adjusted basis

Once the gain is determined, federal and state tax rates are applied according to the type of gain and the taxpayer profile. If the result is a loss, taxes may be reduced or zero for that transaction, though separate tax rules govern how losses may offset other gains or ordinary income.

Federal capital gains tax basics

Federal capital gains tax treatment depends first on how long you held the asset. If you held it for one year or less, the gain is generally short term and taxed like ordinary income. If you held it for more than one year, the gain is generally long term and eligible for favorable rates. This distinction is one of the most important tax planning variables because a sale delayed by just a few weeks can sometimes shift the applicable federal tax rate substantially.

Short term vs long term gains

  • Short term gains: Usually taxed at ordinary federal income tax rates.
  • Long term gains: Usually taxed at lower federal capital gains rates.
  • Losses: Can offset gains, subject to annual and carryforward rules.

2024 long term federal capital gains thresholds

Filing status 0% rate up to 15% rate up to 20% rate above
Single $47,025 $518,900 $518,900
Married filing jointly $94,050 $583,750 $583,750
Head of household $63,000 $551,350 $551,350

These federal thresholds are useful reference points for estimating long term capital gains tax, but remember that your total taxable income matters. A long term gain can partially span multiple capital gains brackets if your ordinary income plus the gain crosses a threshold. That is why this calculator uses taxable income as an input rather than applying a single flat rate to all gains.

Net Investment Income Tax threshold reference

Filing status NIIT threshold Potential NIIT rate
Single $200,000 MAGI 3.8%
Married filing jointly $250,000 MAGI 3.8%
Head of household $200,000 MAGI 3.8%

NIIT applies to the lesser of net investment income or the amount by which modified adjusted gross income exceeds the threshold. For planning purposes, many calculators estimate NIIT using the capital gain amount and your income. That is helpful for directional decisions, but your actual NIIT can differ once your full return is prepared.

How state capital gains taxes differ

State taxation of capital gains is far less uniform than federal treatment. Many states simply tax capital gains as ordinary income. Some use a flat income tax, which means gains are effectively taxed at that same rate. A few have special rules or deductions. Others, including several states with no broad individual income tax, may impose no state tax on typical capital gains at all. Because residency and sourcing rules can be nuanced, a state estimate should be seen as a planning tool rather than a final answer.

Examples of estimated common state treatment

  • California: Taxes capital gains as ordinary income, with high top marginal rates.
  • New York: Generally taxes gains through the state income tax system.
  • Illinois: Uses a flat income tax structure.
  • Pennsylvania: Uses a flat state income tax rate on many forms of taxable income.
  • Texas and Florida: No broad state individual income tax on wage income and generally no typical state tax on capital gains.
  • Washington: Has a state level capital gains tax in certain circumstances, but it is not the same as a broad general income tax.

Moving between states can change your tax outcome meaningfully, but timing matters. A sale completed before a change in domicile may still be taxed based on your prior residency or the location and type of asset sold. Real estate often follows different sourcing rules than marketable securities. If the dollar amount is significant, review your facts with a tax professional.

Why using a calculator with state inputs matters

An investor might focus on the federal 15% long term rate and forget that state taxes can add several percentage points. On a large gain, that difference may represent thousands or even tens of thousands of dollars. A federal and state capital gains tax calculator makes this more visible by separating the estimated federal amount from the estimated state amount and showing the after tax proceeds. This is especially useful for rental property sales, business exits, stock liquidation, and concentrated position diversification.

Step by step example of a capital gains estimate

Suppose you bought an investment asset for $100,000, spent $5,000 on capital improvements, paid $3,000 in selling costs, and sold it for $175,000. Your adjusted basis would be $105,000. Your net sale amount would be $172,000. The capital gain would be $67,000.

If you held the asset for more than one year and your taxable ordinary income was $85,000 as a single filer, some or all of the gain would likely be taxed at the federal long term capital gains rate of 15% based on current thresholds. If you live in a state that taxes gains at an estimated 9.3%, your state burden may be material. If your income is high enough, NIIT may also apply. This is precisely why a combined calculator is useful: it converts abstract tax rules into a concrete estimate.

Inputs that can change your result significantly

  1. Holding period: One day can change a gain from short term to long term treatment.
  2. Taxable income: Long term rate brackets depend on your total income level.
  3. State: State rates vary from zero to relatively high levels.
  4. Selling costs: Fees lower your taxable gain by reducing net proceeds.
  5. Improvements and basis adjustments: A higher basis means a lower gain.
  6. NIIT exposure: High earners may face an extra 3.8% layer.

Common mistakes people make

  • Using gross sale price instead of net sale price after selling costs
  • Forgetting to add eligible capital improvements to basis
  • Assuming long term rates apply to a short holding period
  • Ignoring state taxes when comparing sale scenarios
  • Forgetting that losses and carryforwards may offset gains elsewhere
  • Not accounting for special property rules such as depreciation recapture

When this calculator is most useful

This type of calculator is especially valuable before major financial decisions. If you are selling stock from a concentrated employer position, you can estimate whether staggering sales across tax years may reduce the marginal rate on gains. If you are exiting real estate, you can preview how selling costs and improvements affect the final tax number. If you are considering a move, you can compare states before finalizing residency. And if you are deciding whether to hold or sell, a side by side estimate can help clarify the true after tax economics.

Good planning scenarios

  • Selling appreciated stocks, ETFs, mutual funds, or crypto assets
  • Evaluating a real estate investment sale
  • Planning around retirement income and bracket changes
  • Comparing sale timing in December versus January
  • Estimating tax before a business asset sale or liquidity event

When to seek professional advice

You should strongly consider professional guidance if your transaction includes depreciation recapture, installment sale terms, QSBS issues, trust taxation, inherited assets with stepped up basis questions, multi state sourcing complexity, residency changes, or very large gains that may affect estimated tax payments. These issues often go beyond what a general planning calculator can handle.

Authoritative resources

Final thoughts on using a federal and state capital gains tax calculator

A federal and state capital gains tax calculator is not just a convenience tool. It is a planning framework. By breaking the estimate into adjusted basis, gain amount, federal tax, NIIT, state tax, total tax, and after tax proceeds, you can make clearer decisions about whether to sell now, wait for long term treatment, spread gains over time, or revisit your basis records. For many taxpayers, the biggest mistake is not the tax itself, but failing to estimate it before acting.

Use this calculator to model multiple scenarios. Try different filing statuses if your situation may change next year. Compare a short term sale with a long term sale. Test your current state against a low tax state. Evaluate whether your income level may trigger NIIT. The more intentional your planning, the less likely you are to be surprised by taxes after the transaction closes.

Finally, remember that tax law evolves. Federal bracket thresholds adjust over time, states can update rates, and some asset classes have special rules. Treat this tool as a high quality estimate engine and pair it with current official guidance and personalized tax advice when the stakes are high.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top