MonyPulseBusiness history, sourced

Capital Gains Tax Calculator

Enter what you paid, what you sold for, how long you held it and your other income to estimate the tax on a capital gain. The calculator applies the 2026 or 2027 long-term rates, short-term rates, the 3.8% net investment income tax and your state rate.

Updated November 12, 2026Figures for the 2026 and 2027 tax yearsFree, no sign-upYour numbers stay in your browser

Capital Gains Tax Calculator: enter your numbers

What you paid, including commissions and improvements.

Commissions, closing costs.

Held for

Wages and other income before deductions, not counting this sale.

More options

Most states tax capital gains as regular income.

Owned and lived in for at least 2 of the last 5 years: up to $250,000 of gain is tax-free ($500,000 for most joint returns).

Your result

Tax on the gain

$2,250

15% of the gain

Profit after tax

$12,750

Long-term gain

$15,000

2026, held more than a year

Capital gain$25,000 net sale − $10,000 basis
$15,000
Federal income tax on the gainlong-term rates: 0%, 15% or 20%
$2,250
Part of the gain taxed at 0%
$0
0% rate applies to taxable income up to15% up to $545,500, 20% above
$49,450
Total tax on the gain
$2,250
If you had held it a year or lessshort-term gains are taxed like wages
$3,300
  • Long-term (yours)$2.3K
  • If short-term$3.3K
Tax on this gain: long-term vs short-term

An estimate from your numbers and the assumptions below, for education. Not financial, tax or legal advice.

How the Capital Gains Tax calculator works

Capital gain

Gain = Sale price − selling costs − cost basis

Tax on the gain

Tax = federal income tax with the gain − federal income tax without it + net investment income tax + state tax

Long-term (held more than a year)
0%, 15% or 20%, depending on taxable income
Short-term (a year or less)
taxed at your ordinary income tax rates

Net investment income tax

NIIT = 3.8% × the smaller of investment income and modified AGI above $200,000 ($250,000 joint)

Worked example

You sell shares for $25,000 that you bought for $10,000 more than a year ago: a $15,000 long-term gain. With $80,000 of other income as a single filer, your taxable income is already above the 0% limit, so the whole gain is taxed at 15%.

The tax on the gain is $2,250, 15% of it, leaving $12,750 after tax. Had you sold within a year, the gain would be short-term and taxed at your 22% bracket, about $3,300.

Timeline from purchase to sale with the one-year mark: selling a $15,000 gain within a year costs about $3,300 in federal tax, holding over a year $2,250.
Long-term gains get lower rates than wages; the one-year mark decides which applies.

How is capital gains tax calculated?

Subtract your cost basis, what you paid plus buying and selling costs, from the sale price to get the gain. If you held the asset more than one year, the gain is long-term and taxed at 0%, 15% or 20% depending on your taxable income; held one year or less, it is short-term and taxed as ordinary income at 10% to 37%. Higher earners can also owe the 3.8% net investment income tax, and many states tax gains as regular income.

  1. Gain = sale price − (purchase price + costs to buy and sell)
  2. Holding period: more than one year is long-term; one year or less is short-term.
  3. Rate: long-term gains stack on top of your other taxable income, so the 0%, 15% and 20% thresholds below are measured on your total taxable income, not on the gain alone.
  4. Extra taxes: the 3.8% net investment income tax above $200,000 of modified AGI ($250,000 joint), plus any state tax.

The worked example above runs each step with real numbers.

Long-term vs short-term

How long you hold an investment is the biggest factor you control. A sale one day after the one-year mark can cut the federal rate on the gain from your income tax bracket to 15%, or even to 0% for people with lower taxable income. The chart compares the two for your sale.

Capital gains tax rates for 2026 and 2027

2026 long-term capital gains tax rates (returns filed in 2027)
Filing status0% rate up to20% rate above
Single$49,450$545,500
Married filing jointly$98,900$613,700
Married filing separately$49,450$306,850
Head of household$66,200$579,600
2027 long-term capital gains tax rates (returns filed in 2028)
Filing status0% rate up to20% rate above
Single$51,050$563,200
Married filing jointly$102,100$633,600
Married filing separately$51,050$316,800
Head of household$68,350$598,400

Taxable income between the two limits pays 15%. The limits count your whole taxable income with the gain stacked on top. A 3.8% net investment income tax applies above $200,000 of modified AGI ($250,000 joint). Source: IRS.

Who pays 0%?

Long-term gains are stacked on top of your other taxable income. The part of the gain that fits under the 0% limit, $49,450 of taxable income for single filers and $98,900 for married couples filing jointly in 2026, is tax-free federally. Retirees and people between jobs often have room to realize gains at 0%.

Selling your home

If you are selling your main home, turn on This is the sale of my main home under More options. You can exclude up to $250,000 of the gain from income, or up to $500,000 if you file a joint return, as long as you owned the home and lived in it for at least 2 of the 5 years before the sale and didn’t exclude gain on another home in the previous 2 years. Only the gain above the exclusion is taxed, at long-term rates. Count the cost of improvements in what you paid, and agent commissions and other selling costs in the costs field; both shrink the gain.

Losses

If the sale is a loss, the calculator shows the tax saved by deducting up to $3,000 of it from other income this year, and the amount you can carry forward to future years.

To work out the gain itself, with commissions and dividends, use the stock profit calculator. For your average cost after several purchases, use the stock average calculator, and for your whole tax return, the income tax calculator.

Assumptions and limits

  • One sale in the year; other gains and losses are not netted. Losses offset gains first, then up to $3,000 of other income a year.
  • Your other income is treated as wages taxed at ordinary rates, with the standard deduction.
  • Collectibles, the taxable part of gains on real estate depreciation and qualified small business stock follow special rules not modeled here.
  • The main home option assumes you meet the 2-out-of-5-year ownership and use tests and haven't excluded gain on another home in the past 2 years. Partial exclusions and depreciation recapture are not modeled; see IRS Publication 523.

Frequently asked questions

How much is capital gains tax on stocks?

For shares held more than a year, the federal rate is 0%, 15% or 20% depending on your taxable income; most people pay 15%. For shares held a year or less, the gain is taxed like wages, at 10% to 37%. High earners may also owe the 3.8% net investment income tax.

What are the 2026 long-term capital gains brackets?

For single filers, 0% on taxable income up to $49,450, 15% up to $545,500 and 20% above. For married couples filing jointly, 0% up to $98,900, 15% up to $613,700 and 20% above.

How can I pay less capital gains tax?

Hold investments more than a year, sell losing investments to offset gains, time sales for lower-income years when the 0% rate may apply, and use tax-advantaged accounts such as IRAs and 401(k)s, where trades aren't taxed.

Do I pay capital gains tax on crypto?

Yes. The IRS treats cryptocurrency as property, so selling, trading or spending it at a gain is taxed like a stock sale, short- or long-term depending on how long you held it.

Do I pay capital gains tax when I sell my house?

Usually not on the first $250,000 of gain, or $500,000 for married couples filing jointly, if you owned the home and lived in it as your main home for at least 2 of the 5 years before the sale. Only gain above that is taxed, at long-term rates. Turn on the main home option to see the tax.

Is the capital gains tax calculated on the whole sale price?

No, only on the gain: the sale price minus your cost basis and selling costs. Your basis is generally what you paid, including commissions.

Sources and method

Formulas and figures checked against these sources on November 12, 2026. The calculator runs entirely in your browser; nothing you type is sent to us or stored. Results are estimates for education, not financial, tax or legal advice, and MonyPulse is not a lender, tax preparer or investment adviser. Found an error? Tell us. See how we build and test our calculators and our editorial standards.

Related calculators

The numbers in real business history

More tax calculators

All 6 categories of calculators →