GainsCalc

Capital gains tax calculator

This free calculator estimates the total tax on a capital gain by combining three pieces: the federal long-term rate (0/15/20%, located from your filing status and taxable income), the 3.8% NIIT if your income is over the statutory threshold, and your state's capital-gains tax. Choose long-term or short-term and one of 51 jurisdictions. Everything runs in your browser. It is a labelled estimate, not tax advice - verify with the IRS, your state authority, or a professional.

Source: IRS Revenue Procedure 2025-32. Data as of June 2026.

Estimate only - not tax advice. It uses your total taxable income to locate the federal long-term bracket, applies the 3.8% NIIT when modified AGI exceeds the statutory threshold, and adds one representative state rate. It ignores deductions, AMT, the gain stacking precisely on top of income, and most state brackets. See methodology; verify with the IRS, your state tax authority, or a tax professional.

How the estimate is built

The calculator adds three components, all transparent:

total tax = gain x federal rate + gain-over-threshold x 3.8% NIIT + gain x state rate

For long-term gains the federal rate is the 0/15/20% bracket your total taxable income falls into; for short-term gains it is your ordinary federal bracket. The NIIT only applies to the part of your income above the threshold. The state rate is your state's effective top long-term rate (or its ordinary rate for short-term gains). See the methodology for every assumption.

Frequently asked questions

How does the capital gains tax calculator work?

You enter your filing status, other taxable income, the gain amount, the holding period (long or short), and your state. For long-term gains it locates your federal 0/15/20% bracket from your total taxable income, adds the 3.8% NIIT if your modified AGI is over the statutory threshold, and adds your state's effective top long-term capital-gains rate. For short-term gains it uses your ordinary federal bracket plus the state's ordinary rate. The result is the estimated total tax on the gain.

Is this calculator accurate enough to file my taxes?

No. It is a labelled estimate. It simplifies in several ways: it uses your total taxable income to find the federal bracket (in reality the gain stacks on top of ordinary income), it applies a single state rate rather than each state's full brackets, and it ignores deductions, AMT, the additional Medicare tax and carry-forward losses. Use it for a quick directional figure, then confirm with the IRS, your state tax authority, or a tax professional.

Does it include the 3.8% Net Investment Income Tax?

Yes. When your modified AGI exceeds the statutory threshold ($200,000 single / $250,000 married filing jointly / $125,000 married filing separately - these are not inflation-indexed), the tool applies the 3.8% NIIT to the portion of the gain above the threshold. See the dedicated NIIT page for the details.

Why does my state rate look like an effective rate, not the headline rate?

Several states give long-term capital gains a special rate or a partial exclusion (for example South Carolina excludes 44% of long-term gains, Arizona subtracts 25%). For those states the tool uses the resulting effective top long-term rate, not the headline ordinary rate, so the estimate is closer to reality. The exact treatment is shown on each state page.

Go deeper

Federal figures from IRS Topic 409. Not tax advice.

Last updated: 2026-06-21