# How much capital gains tax will I pay?

Estimates the 2026 federal capital gains tax on a sale of stock, a home you do not exclude, or other property: short-term at ordinary rates, long-term at 0%, 15%, or 20%, plus the 3.8% net investment income tax.

- Page: https://www.acalculator.org/finance/capital-gains-tax-calculator
- JSON spec: https://www.acalculator.org/finance/capital-gains-tax-calculator.json
- Version: a9906e7f85bd

## Default answer

Example with the default inputs (Purchase price (cost basis) $30,000.00, Sale price $50,000.00, Held for More than 1 year, Filing status Single, Other income $60,000.00, Tax year 2,026): Selling for $50,000.00 what cost $30,000.00 gives a $20,000.00 gain and $2,167.50 of federal tax.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| basis | Purchase price (cost basis) | What you paid for the asset, plus buying costs and improvements. |
| sale | Sale price | What you received for the asset, less selling costs. |
| held | Held for | How long you owned the asset: more than one year is long-term. |
| status | Filing status | Your federal filing status for the year. |
| income | Other income | Your other income for the year before deductions: wages, interest, and so on. |
| year | Tax year | The tax year of the sale. A year with no published rates uses the latest year this site has. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| tax | Tax on the gain | Federal tax with the sale minus the tax without it; negative when a loss saves tax. |
| gain | Gain or loss | Sale price minus cost basis. |
| rate | Rate on the gain | The tax on the gain as a percent of the gain. |
| niit | Net investment income tax part | The 3.8% net investment income tax the sale adds. |
| afterTax | Gain after tax | The gain minus the tax on it. |
| taxWith | Total tax with the sale | Federal tax after credits with the sale. |
| taxWithout | Total tax without the sale | Federal tax after credits without the sale. |
| ratesYear | Rates of tax year | The tax year whose rates were used. |
| notice | Note | A note when another year’s rates were used. |

## Method

Gain = sale price − basis. Tax on the gain = Form 1040 tax with the gain − Form 1040 tax without it, both with the standard deduction: a long-term gain at 0%, 15%, or 20% by the Qualified Dividends and Capital Gain Tax Worksheet, a short-term gain at the ordinary rates, a loss limited to $3,000 ($1,500 separately), plus the 3.8% net investment income tax.

## Assumptions

- An estimate for tax year 2026 (IRS Rev. Proc. 2025-32), not tax advice.
- Other income is ordinary income such as wages, with the standard deduction and no credits; it is not earned income for the earned income credit.
- Not modelled: the 25% rate on unrecaptured section 1250 gain (depreciation on real estate), the 28% rate on collectibles, the home sale exclusion ($250,000 or $500,000), carryover losses from earlier years, the alternative minimum tax, and state tax on the gain.

## Worked examples

1. basis = $30,000.00, sale = $50,000.00, held = long, status = single, income = $60,000.00 gives gain = $20,000.00, taxWithout = $5,023.00, taxWith = $7,190.50, tax = $2,167.50, rate = 10.8375%.
2. basis = $30,000.00, sale = $50,000.00, held = short, status = single, income = $60,000.00 gives tax = $3,753.00, taxWith = $8,776.00.
3. basis = $100,000.00, sale = $200,000.00, held = long, status = mfj, income = $250,000.00 gives tax = $18,800.00, niit = $3,800.00, taxWithout = $37,468.00. Source: 15% on $100,000 plus the 3.8% net investment income tax on AGI over $250,000 (Form 8960).
4. basis = $15,000.00, sale = $10,000.00, held = short, status = single, income = $40,000.00 gives gain = -$5,000.00, tax = -$360.00.

## FAQ

### What are the 2026 long-term capital gains tax rates?

0%, 15%, and 20%. The 0% rate covers taxable income up to $49,450 single ($98,900 married filing jointly, $66,200 head of household). The 15% rate runs to $545,500 single ($613,700 jointly, $579,600 head of household, $306,850 separately). Above that, 20%. Source: IRS Rev. Proc. 2025-32 section 4.03.

### What is the difference between short-term and long-term gains?

A gain on something you held one year or less is short-term and is taxed like wages, at 10% to 37%. Held more than one year, it is long-term and gets the 0%, 15%, or 20% rates.

### Why does my other income matter?

The gain sits on top of your other taxable income. The part of the gain that fits under the 0% limit is taxed at 0%, the next part at 15%, and so on. So the same gain can cost nothing for one person and 20% for another.

### What is the net investment income tax?

An extra 3.8% on investment income, gains included, when your modified AGI is over $200,000 single or $250,000 married filing jointly ($125,000 separately). It is on Form 8960, and the calculator adds it.

### What if I sold at a loss?

A loss first offsets other gains, then up to $3,000 of other income a year ($1,500 married filing separately). The rest carries over to later years. The calculator shows the tax you save this year as a negative number.

### How is the cost basis figured?

Basis is what you paid plus buying costs (commissions) and, for property, the cost of improvements, less depreciation you took. Subtract selling costs from the sale price. Your broker reports basis for most stock on Form 1099-B.

### What does this calculator leave out?

The 25% rate on depreciation recapture of real estate, the 28% rate on collectibles, the home sale exclusion, loss carryovers, the alternative minimum tax, and state tax. It is an estimate, not tax advice.

## Sources

- IRS, Rev. Proc. 2025-32 (Internal Revenue Bulletin 2025-45), sections 4.01 (rate tables), 4.03 (capital gains breakpoints), and 4.14 (standard deduction). https://www.irs.gov/irb/2025-45_IRB
- IRS, 2025 Instructions for Form 1040: Qualified Dividends and Capital Gain Tax Worksheet (line 16). https://www.irs.gov/instructions/i1040gi
- IRS, Topic no. 409, Capital gains and losses. https://www.irs.gov/taxtopics/tc409
- IRS, Instructions for Form 8960, Net Investment Income Tax. https://www.irs.gov/instructions/i8960
