Capital Gains Tax Calculator
This capital gains tax calculator estimates the federal tax on selling stock, funds, crypto, property or other investments in the 2026 tax year. Enter what you paid, what you sold for, your buying and selling costs, how long you held the asset and your other taxable income, and it shows your gain, the tax on it and your effective rate.
Short-term gains are taxed as ordinary income, so the tool works out the extra tax the gain adds at your bracket. Long-term gains get the 0%, 15% and 20% rates, stacked on top of your other income, and higher earners may also owe the 3.8% net investment income tax. Figures come from IRS Rev. Proc. 2025-32. Estimate only, not tax advice.
Capital Gains Tax Calculator
How to Use the Capital Gains Tax Calculator
- 1
Choose the holding period
Select Long-term if you owned the asset for more than one year before selling, or Short-term if you held it one year or less.
- 2
Enter the sale
Type the purchase price (your cost basis), the sale price and any buying and selling costs such as commissions, fees or, for property, closing costs and capital improvements.
- 3
Enter your other income
Pick your filing status and enter your other taxable income for the year, after the standard or itemized deduction, without this sale.
- 4
Review the tax and the comparison
Read the capital gain, regular tax, net investment income tax, total and effective rate, plus what the same gain would cost under the other holding period.
How capital gains tax is calculated
Your gain is the sale price minus your cost basis minus the costs of buying and selling. If you held the asset one year or less, the gain is short-term and is added to your ordinary income, so it is taxed at your regular bracket rates. The calculator finds the tax on your other income with and without the gain and reports the difference.
If you held it more than one year, the gain is long-term. It is stacked on top of your other taxable income, and the part that falls below the 0% breakpoint is tax-free, the next part is taxed at 15% and anything above the upper breakpoint at 20%. The 3.8% net investment income tax (Form 8960) applies to the smaller of your investment income and the amount your modified AGI exceeds $200,000 single or head of household, or $250,000 married filing jointly.
Gain = sale price - purchase price - costs; Short-term tax = tax(other income + gain) - tax(other income); Long-term tax = 0% / 15% / 20% on the gain layered above other income; NIIT = 3.8% x min(gain, MAGI - threshold), with MAGI approximated as other taxable income + gainWorked examples
- Single filer, $60,000 of other taxable income, shares bought for $10,000 and sold for $25,000: the gain is $15,000. Held more than a year, the whole gain lands in the 15% band (other income is already above $49,450), so tax is $2,250. Held a year or less, it is taxed at 22% for $3,300. Waiting saved $1,050.
- Single filer, $30,000 of other taxable income and a $15,000 long-term gain: taxable income is $45,000, all below the $49,450 breakpoint, so the gain is taxed at 0%. The same gain short-term would cost $1,800.
- Married couple, $240,000 of other taxable income, sells for $100,500 an asset bought for $50,000 with $500 of costs: the gain is $50,000. Long-term tax is 15%, or $7,500. Estimated MAGI of $290,000 is $40,000 over the $250,000 threshold, so NIIT is 3.8% of $40,000, or $1,520. Total $9,020, an effective 18.0% of the gain. Short-term it would be $13,520.
2026 long-term capital gains tax brackets
Breakpoints apply to total taxable income, including the gain (IRS Rev. Proc. 2025-32). Short-term gains use the ordinary brackets, from 10% to 37%.
| Filing status | 0% rate | 15% rate | 20% rate |
|---|---|---|---|
| Single | Up to $49,450 | $49,450 – $545,500 | Over $545,500 |
| Married filing jointly | Up to $98,900 | $98,900 – $613,700 | Over $613,700 |
| Head of household | Up to $66,200 | $66,200 – $579,600 | Over $579,600 |
Legal ways to lower capital gains tax
- Hold for more than one year. Long-term rates are much lower than ordinary rates for most people, as the $3,300 vs $2,250 example shows.
- Harvest losses. Selling investments that are down lets those losses offset your gains. Net losses beyond your gains can offset a limited amount of ordinary income each year (see the Schedule D instructions) and the rest carries forward. Avoid the wash-sale rule: buying the same or a substantially identical security within 30 days before or after the sale disallows the loss.
- Time sales for low-income years. In a gap year, early retirement or a year with a business loss, more of your gain may fit in the 0% band ($49,450 single, $98,900 joint taxable income). Some investors deliberately realize gains then to reset their basis.
- Give appreciated stock to charity instead of cash. If you have held it more than a year, you generally deduct its fair market value when you itemize and never pay tax on the gain. Deductions for gifts of appreciated property are limited to a percentage of AGI.
- Lower your taxable income with pre-tax savings. Contributions to a 401(k) (up to $24,500 in 2026, $32,500 at 50+) or an HSA ($4,400 self-only, $8,750 family) can pull more of a gain into a lower bracket and reduce MAGI for the NIIT.
- Use tax-advantaged accounts for active trading. Gains inside a 401(k) or IRA are not taxed when they occur. Always report every sale: brokers send the IRS Form 1099-B, and leaving gains off your return leads to penalties and interest.
What this calculator simplifies
MAGI for the NIIT is approximated as your other taxable income plus this gain. Real MAGI starts from AGI, before the standard or itemized deduction, so the tool can understate the NIIT when you are near the threshold. It treats this sale as your only investment income and gain for the year, and your other income as fully ordinary.
It does not model collectibles or unrecaptured real estate depreciation, which have their own maximum rates, the home-sale exclusion, depreciation recapture on business property, wash sales, installment sales, Opportunity Zone deferral, the alternative minimum tax or state tax. Married filing separately is not supported. Report actual sales on Form 8949 and Schedule D, and talk to a CPA or enrolled agent before a large sale.
Features
- Gain = sale price minus purchase price minus buying and selling costs
- Short-term gains taxed as ordinary income at your bracket (the extra tax the gain adds)
- Long-term gains taxed at 0%, 15% and 20%, stacked on top of your other taxable income
- Estimates the 3.8% net investment income tax above the MAGI threshold
- Compares short-term vs long-term tax on the same gain
- Table of the 2026 0% / 15% / 20% breakpoints for each filing status
Frequently Asked Questions
What are the capital gains tax rates for 2026?
Short-term gains, on assets held one year or less, are taxed at ordinary income rates from 10% to 37%. Long-term gains are taxed at 0% up to $49,450 of taxable income for single filers ($98,900 joint, $66,200 head of household), 15% up to $545,500 ($613,700 joint, $579,600 head of household) and 20% above that. Higher earners may also owe the 3.8% net investment income tax.
How much tax will I pay on $50,000 of long-term capital gains?
It depends on your other income. A single filer with $100,000 of other taxable income pays 15%, or $7,500, and no NIIT because estimated MAGI of $150,000 is under $200,000. A married couple with $240,000 of other taxable income pays $7,500 plus $1,520 of NIIT, for $9,020. With little other income, part or all of the gain can fall in the 0% band.
How long do I have to hold a stock to get long-term rates?
More than one year. The holding period starts the day after you buy and includes the day you sell, so an asset bought on March 10, 2025 must be sold on March 11, 2026 or later to qualify. Sell a day early and the whole gain is short-term, taxed at your ordinary bracket. Inherited assets are treated as long-term regardless of how long you held them.
Can I pay 0% tax on capital gains?
Yes, if your taxable income including the gain stays within the 0% band: $49,450 single, $98,900 married filing jointly or $66,200 head of household for 2026. The breakpoints apply to taxable income, after the standard deduction, so a married couple with $80,000 of other taxable income can realize $18,900 of long-term gains at 0%. Gains above the breakpoint are taxed at 15%, not the whole gain.
What is the 3.8% net investment income tax?
It is an extra federal tax on investment income, including capital gains, dividends, interest and rents, for people with modified AGI above $200,000 single or head of household, or $250,000 married filing jointly. It applies to the smaller of your net investment income and the amount your MAGI exceeds the threshold. Those thresholds are set in law and do not rise with inflation. It is reported on Form 8960.
Are crypto gains taxed the same way?
Yes. The IRS treats cryptocurrency as property, so selling, swapping one coin for another or spending crypto is a taxable disposal. Gains held one year or less are short-term, and longer holdings get long-term rates, exactly as this calculator applies them. Keep records of your cost basis and fees for each lot, since exchanges now report sales on Form 1099-DA.
Last reviewed