# Capital Gains Tax Calculator

Canonical: [Capital Gains Tax Calculator](<https://www.cfosilvia.com/financial-calculators/capital-gains-tax>)

Category: [Tax and income calculators](<https://www.cfosilvia.com/financial-calculators#tax-income>)

Built by [Silvia](<https://www.cfosilvia.com/about>). Content updated: 2026-10-19.

Estimate 2026 U.S. federal tax on a short-term or long-term capital gain using sale details, income, filing status, capital losses, and optional NIIT.

Best for: Estimate 2026 U.S. federal tax on short-term or long-term capital gains after basis, losses, income, filing status, and optional NIIT.

This is an educational estimate based on your inputs. Read the formula and assumptions, and check any stated rule year and primary sources before making a financial decision. Open the canonical interactive page to enter a scenario; this Markdown reference contains no visitor inputs or personalized calculation results.

## Inputs

- **Sale price** Units: $.
- **Cost basis** Units: $. Include purchase price and eligible acquisition costs.
- **Selling costs** Units: $.
- **Capital losses applied** Units: $.
- **Annual ordinary income** Units: $. Enter income before the standard deduction and this capital gain.
- **Filing status** Options: Single; Married filing jointly; Head of household.
- **Holding period** Options: Long-term (more than 1 year); Short-term (1 year or less).
- **Include estimated 3.8% NIIT** Options: No; Yes.
- **Estimated MAGI before this gain** Units: $. Used only when NIIT is included.

## Formula, examples, and planning guide

Federal capital gains tax depends on the size of the gain, holding period, taxable income, filing status, capital losses, and whether the net investment income tax applies.

### How the 2026 capital gains tax estimate works

Net capital gain equals sale price minus cost basis, selling costs, and entered capital losses. A gain on an asset held for more than one year is generally modeled at long-term federal rates; a gain held one year or less is modeled as additional ordinary income.

Long-term gains stack on top of taxable ordinary income. This means the gain may cross the 0%, 15%, and 20% bands rather than being taxed at one rate.


### 2026 federal long-term capital gains thresholds

The IRS publishes maximum taxable-income amounts for the 0% and 15% long-term capital gains bands. Gain above the 15% ceiling is generally modeled at 20%.


2026 maximum taxable-income amounts for long-term capital gains rates

| Filing status | 0% band maximum | 15% band maximum |
| --- | --- | --- |
| Single | $49,450 | $545,500 |
| Married filing jointly | $98,900 | $613,700 |
| Head of household | $66,200 | $579,600 |

### Important exclusions from this estimate

Capital-gains rules are transaction-specific. The estimate does not model state tax, depreciation recapture, collectibles, qualified small business stock, wash sales, installment sales, home-sale exclusions, or every netting rule.

- Confirm cost basis, including eligible adjustments, before relying on the result.
- Use the optional NIIT input only as a simplified planning estimate.
- Consult a qualified tax professional for a sale with material tax consequences.

## How to use this calculator

Use this 2026 capital gains tax calculator to estimate federal tax on a sale after basis, eligible losses, other ordinary income, and the standard deduction. Compare short-term and long-term treatment and optionally include Net Investment Income Tax. The result is a planning estimate, not a complete tax return.

1. **Enter sale proceeds and cost basis.** Include eligible basis adjustments and selling expenses when determining the economic gain.
2. **Add holding period, income, and losses.** Classify the gain and enter other ordinary income before the standard deduction, filing status, and available capital losses. The model applies any unused standard deduction to the gain.
3. **Review tax layers separately.** For optional NIIT, enter estimated MAGI before this sale; the model adds the net gain. The standard deduction does not reduce MAGI. Account for state tax separately.

## Worked planning example

### Example: compare a gain at different income levels

**Set up:** Model a long-term gain with expected 2026 ordinary income before the standard deduction and available capital losses.

**Compare:** Lower ordinary income while keeping the gain and filing status unchanged. Both scenarios use 2026 tax rules; this tool does not forecast another tax year.

**Takeaway:** Other taxable income can push part of a long-term gain into a higher rate band, even when the gain itself is unchanged.

## Verify basis and tax-year assumptions before selling

Basis records, loss limitations, holding period, state rules, and special asset rates can materially change actual tax.

- Confirm acquisition dates and adjusted basis.
- Review loss carryforwards and wash-sale rules.
- Model state and local tax separately.

## Calculation methodology and assumptions

Net gain is sale proceeds minus cost basis, selling costs, and entered capital losses, floored at zero. Long-term gains are stacked above ordinary income after its 2026 standard deduction and allocated across the federal 0%, 15%, and 20% bands. Any standard deduction left after ordinary income reduces long-term taxable gains before allocating them to those bands. Short-term tax is the increase in estimated ordinary-income tax after adding the gain. Optional NIIT applies 3.8% to the lesser of the gain and MAGI above the filing-status threshold, treating entered MAGI as excluding this gain. State tax, special assets, exclusions, and loss carryover rules are excluded.

### Primary references

- [IRS 2026 maximum capital gains rate amounts](<https://www.irs.gov/irb/2025-45_IRB>)
- [IRS Topic No. 559: Net investment income tax](<https://www.irs.gov/taxtopics/tc559>)
- [IRS Topic No. 409, Capital Gains and Losses](<https://www.irs.gov/taxtopics/tc409>)
- [IRS Publication 505, capital gains tax worksheet](<https://www.irs.gov/publications/p505>)
- [IRS Revenue Procedure 2025-32, 2026 tax thresholds](<https://www.irs.gov/pub/irs-drop/rp-25-32.pdf>)
- [IRS Net Investment Income Tax](<https://www.irs.gov/individuals/net-investment-income-tax>)

## Frequently asked questions

### How are short-term capital gains taxed?

Net short-term gains are generally taxed at ordinary federal income-tax rates rather than preferential long-term rates.

### Does a long-term gain all use one tax rate?

Not necessarily. After the standard deduction reduces ordinary income and any remaining deduction reduces the gain, taxable long-term gain stacks above taxable ordinary income across the federal 0%, 15%, and 20% bands.

### What does this calculator exclude?

It does not fully model state tax, depreciation recapture, collectibles, qualified small-business stock, home-sale exclusions, or every special rule.

## Related calculators

- [Income Tax Calculator](<https://www.cfosilvia.com/financial-calculators/income-tax/index.md>): Estimate 2026 U.S. federal income tax using filing status, the standard deduction, and taxable income assumptions.
- [Estate Tax Calculator](<https://www.cfosilvia.com/financial-calculators/estate-tax/index.md>): Create a simplified federal estate tax illustration from gross estate, deductions, exemption, and a marginal rate.
- [Investment Calculator](<https://www.cfosilvia.com/financial-calculators/investment/index.md>): Project an investment balance and separate contributions from estimated growth.
- [ROI Calculator](<https://www.cfosilvia.com/financial-calculators/roi/index.md>): Calculate gain, return on investment, and annualized return from beginning and ending values.

Related guide: [Capital gains tax on investments: a practical guide](<https://www.cfosilvia.com/finance/capital-gains-tax-on-investments-a-practical-guide>)

All calculators: [Financial calculator directory](<https://www.cfosilvia.com/financial-calculators/index.md>)

## Put the estimate in context with Silvia

Connect the accounts and assets that shape your income and gains, then ask Silvia to help you track the financial trade-offs throughout the year.

[Try Silvia for free](<https://www.cfosilvia.com/sign-up>)
