Capital Gains Calculator

Calculate capital gains taxes on your investments and real estate sales.

Asset Information

Additional Costs & Adjustments

Tax Information

%

The standard deduction ($16,100 for your filing status in 2026) is applied to ordinary income before stacking the gain. MAGI is approximated as ordinary income + taxable gain for the NIIT test.

Capital Gains Results

Capital Gain

$4,200

Long-term (held > 1 year)

Total Tax

$840

20.00% effective rate on gain

Net Gain

$3,360

After all taxes

Gross Proceeds:$14,800
Adjusted Cost Basis:$10,600
Holding Period:730 days (2.0 years)
Taxable Gain:$4,200
Federal Capital Gains Tax:$630
Net Investment Income Tax (3.8%):$0
State Tax:$210
Annualized Return:21.67%

How your long-term gain is taxed (2026 brackets)

0% band: $0
15% band: $4,200
20% band: $0

The gain stacks on top of your taxable ordinary income ($58,900 after the standard deduction) and is split across the 0%/15%/20% long-term bands.

How it works

A capital gain is the profit when you sell an asset for more than you paid. The calculator subtracts your cost basis (purchase price plus costs) from the sale proceeds, then applies the standard deduction to your ordinary income and stacks the gain on top. Holding period decides the treatment: short-term (one year or less) is taxed as ordinary income at your marginal brackets, while long-term (more than one year) is split across the 0%, 15%, and 20% bands. The calculator also adds the 3.8% Net Investment Income Tax for high earners and supports the Section 121 home-sale exclusion and Section 1202 QSBS exclusion.

Capital gain

Gain = sale proceeds − cost basis        Federal tax = gain split across 0/15/20% bands stacked on taxable ordinary income (+ 3.8% NIIT above MAGI thresholds)
cost basis
purchase price + commissions/improvements
sale proceeds
sale price − selling costs
taxable ordinary income
ordinary income − standard deduction

Worked example

  • Single filer with $50,000 of wages and a $30,000 long-term gain (2026)
  • Taxable ordinary income = 50,000 − 16,100 standard deduction = $33,900
  1. 0% band runs to $49,450, so the first 49,450 − 33,900 = $15,550 of gain is taxed at 0%
  2. The remaining 30,000 − 15,550 = $14,450 is taxed at 15% = $2,167.50

$30,000 long-term gain → about $2,168 federal capital gains tax.

Good to know

  • Long-term rates (0/15/20%) are usually well below ordinary income rates — holding more than one year (sale date after the purchase anniversary) can cut the tax sharply.
  • High earners pay an extra 3.8% NIIT on gains once MAGI exceeds $200k single / $250k married filing jointly / $125k married filing separately.
  • Capital losses offset gains, and up to $3,000 of net loss can offset ordinary income each year, with the rest carried forward.
  • Primary-home sales can exclude $250k single / $500k married of gain under Section 121 (2-of-5-year ownership and use test); depreciation recapture is taxed separately at up to 25%.
  • Collectibles gains are taxed at your ordinary rate capped at 28%, and qualified small business stock (Section 1202) can be partially or fully excluded after 3–5 years.

Related Calculators

Frequently Asked Questions

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

A gain is long-term only if you hold the asset for more than one year — sell on or before the one-year anniversary of purchase and it is short-term. Short-term gains are taxed at your ordinary income tax rates (10%–37%), while long-term gains get the preferential 0%, 15%, or 20% rates, so holding past one year and a day can cut the tax dramatically.

What are the 0%, 15%, and 20% long-term capital gains thresholds?

For 2026, the 0% rate applies when taxable income (after deductions, including the stacked gain) is up to $49,450 single or $98,900 married filing jointly; the 15% rate applies up to $545,500 single or $613,700 married filing jointly; income above that is taxed at 20%. The gain stacks on top of your ordinary income, so a large gain can span all three bands.

What is the Net Investment Income Tax (NIIT)?

The NIIT is an extra 3.8% federal tax on net investment income — including capital gains — when modified adjusted gross income exceeds $200,000 (single or head of household), $250,000 (married filing jointly), or $125,000 (married filing separately). It applies on top of the regular capital gains rate, so a high earner can pay 20% + 3.8% = 23.8% federally.

How does the home sale exclusion (Section 121) work?

If you owned and lived in your home as your primary residence for at least 2 of the 5 years before the sale, you can exclude up to $250,000 of gain ($500,000 for married couples filing jointly) from tax. Gain attributable to depreciation claimed during rental use is not excludable and is recaptured at rates up to 25%.

Can capital losses reduce my taxes?

Yes. Capital losses first offset capital gains dollar-for-dollar. If losses exceed gains, up to $3,000 of the net loss ($1,500 if married filing separately) can be deducted against ordinary income each year, and the remainder carries forward indefinitely to future years. This is the basis of tax-loss harvesting.

What is the wash-sale rule?

If you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the wash-sale rule disallows the loss for the current year. The disallowed loss is instead added to the cost basis of the replacement shares, deferring the benefit.