US capital gains tax calculator

US Capital Gains Tax Calculator

Estimate short-term or long-term capital gains tax using sale price, cost basis, selling expenses, loss carryover, filing status, income, and optional NIIT.

Country: United StatesUpdated: 2026 tax year

Capital gains estimate

Short + Long Term

Gain, tax, and after-tax result

Long-term rates0% / 15% / 20%
Short-term gainsOrdinary rates
NIIT optionIncluded

Enter capital gains details

Estimate short-term or long-term capital gains tax using sale price, cost basis, selling expenses, capital loss carryover, filing status, and other taxable income.

Capital gains tax note

Long-term gains use long-term capital gains brackets. Short-term gains are estimated by comparing ordinary income tax with and without the gain.

Capital gains tax estimate

Total capital gains tax

$8,550

After-tax gain: $48,450

Holding period

Long-term capital gain

Filing status

Single

Net capital gain

$57,000

Effective tax rate

15.00%

Gain calculation

Sale price$150,000
Cost basis$90,000
Selling expenses$3,000
Realized gain before losses$57,000
Capital loss carryover used$0
Net capital gain$57,000

Tax calculation

Regular capital gains tax$8,550
Net Investment Income Tax$0
Total capital gains tax$8,550
After-tax gain$48,450
Marginal capital gains rate15.00%

Applied tax bands

15% long-term capital gains bracket$57,000

Rate: 15.00% · Over $49,450 to $545,500

This is a simplified capital gains tax estimate. Actual tax may differ because of qualified dividends, capital losses, wash sales, real estate exclusions, depreciation recapture, NIIT, state taxes, AMT, and complete return calculations.

ItemAmount
Sale priceAmount received from the sale.$150,000
Cost basisOriginal cost or adjusted basis entered by the user.$90,000
Selling expensesBroker fees, closing costs, or selling expenses entered by the user.$3,000
Realized gain before lossesSale price minus cost basis and selling expenses.$57,000
Capital loss carryover usedLoss carryover entered by the user to offset gain.$0
Net capital gainCapital gain remaining after loss carryover.$57,000
Other taxable incomeTaxable income before this capital gain.$85,000
Taxable income including gainOther taxable income plus net capital gain.$142,000
Regular capital gains taxEstimated using long-term capital gains brackets.$8,550
Net Investment Income TaxNIIT not included.$0
Total capital gains taxRegular capital gains tax plus optional NIIT estimate.$8,550
After-tax gainNet gain remaining after estimated capital gains tax.$48,450

Current net capital gain used in this estimate: 57,000 USD.

IRS reference

Capital gains tax depends on holding period and income level

This calculator estimates short-term and long-term capital gains tax using sale price, basis, expenses, loss carryover, filing status, other taxable income, and optional Net Investment Income Tax. It is designed for planning, not final filing.

Key features

  • Estimates short-term and long-term capital gains tax.
  • Uses sale price, cost basis, selling expenses, and loss carryover.
  • Includes filing status and other taxable income for rate stacking.
  • Shows regular capital gains tax and optional NIIT.
  • Calculates after-tax gain and effective capital gains tax rate.
  • Useful for stocks, crypto, real estate, and investment planning.

How to use this calculator

  1. 1

    Select filing status and holding period.

  2. 2

    Enter sale price, cost basis, and selling expenses.

  3. 3

    Add capital loss carryover if applicable.

  4. 4

    Enter other taxable income before this gain.

  5. 5

    Choose whether to include Net Investment Income Tax.

  6. 6

    Review net gain, capital gains tax, NIIT, after-tax gain, and applied tax bands.

US Capital Gains Tax Calculator for Short-Term and Long-Term Investment Gains

In simple words

This free calculator estimates the tax on profits from selling investments, whether you held them short-term or long-term.

Capital gains are profits you make when you sell an asset for more than you paid. The US Capital Gains Tax Calculator estimates the tax on those gains. It works for stocks, crypto, real estate, and other investments. You enter the sale price, cost basis, expenses, and losses.

Cost basis is what you paid for the asset. Selling expenses include broker fees and closing costs. The calculator subtracts these from the sale price. The result is your realized gain.

A loss carryover is a past loss you can use against this year's gains. The calculator subtracts it from the realized gain. If the result is zero or negative, no taxable gain is shown.

Holding period is the big factor. A short-term gain comes from an asset held one year or less. It is taxed at ordinary income rates. A long-term gain comes from an asset held more than one year. Long-term gains may get lower rates.

Long-term rates are 0%, 15%, or 20%. Your rate depends on your income and filing status. The calculator shows how much gain falls into each band.

Short-term gains can be costly. They stack on top of your other income. A high earner may pay more on a short-term sale. The calculator compares your tax with and without the gain.

Other taxable income matters. Wages, business income, and interest can push gains into a higher bracket. That is why the calculator asks for other income. Capital gains do not work alone.

You can add an optional Net Investment Income Tax estimate. NIIT is an extra 3.8% tax for higher-income investors. It applies when your income passes the threshold. The calculator uses a simplified method.

Use this tool before you sell. Compare short-term and long-term timing. Test different sale prices. See how other income changes your rate.

This is a planning estimate, not a tax return. Wash sales, exclusions, and other rules can change the final tax. Check with tax software or a professional before you file.

Frequently asked questions

How does the US capital gains tax calculator work?

It subtracts cost basis and selling expenses from sale price, applies loss carryover, determines net capital gain, then estimates short-term or long-term capital gains tax.

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

Short-term gains are generally from assets held one year or less and are estimated at ordinary income rates. Long-term gains are generally from assets held more than one year and may receive preferential rates.

What is cost basis?

Cost basis is the original cost or adjusted tax basis of the asset. It reduces the gain when calculating capital gains tax.

Do selling expenses reduce capital gains?

Yes. In this simplified calculator, selling expenses reduce the realized gain.

What is capital loss carryover?

Capital loss carryover is a prior capital loss that may offset current capital gains. This calculator subtracts the amount entered from the realized gain.

Why does other taxable income matter?

Other taxable income can push capital gains into higher tax brackets, especially for long-term capital gains.

Does this calculator include Net Investment Income Tax?

Yes. You can choose to include a simplified 3.8% NIIT estimate for higher-income taxpayers.

Does this calculator include state capital gains tax?

No. This calculator focuses on federal capital gains tax and optional NIIT. State tax may also apply depending on your state.

Why can actual capital gains tax differ from this estimate?

Actual tax can differ because of wash sales, depreciation recapture, real estate exclusions, collectibles, qualified dividends, AMT, NIIT details, state tax, and complete return calculations.

Is this an official IRS capital gains calculator?

No. This is an independent planning calculator and does not replace IRS forms, tax software, or professional tax advice.

Related calculators

Disclaimer: This US capital gains tax calculator is for education and planning only. It uses simplified calculations and does not replace IRS forms, tax software, broker tax documents, or professional tax advice. Actual capital gains tax can differ because of capital losses, wash sales, basis adjustments, real estate exclusions, depreciation recapture, collectibles rates, qualified dividends, NIIT details, AMT, state taxes, and complete tax return calculations.