How much capital gains tax will I pay?
Type what you paid, what you sold for, how long you held it, and your other income. The answer is the extra federal tax the sale adds to your 2026 return.
- Tax on the gain
- $2,167.50
Selling for $50,000.00 what cost $30,000.00 gives a $20,000.00 gain and $2,167.50 of federal tax.
- Gain or loss
- $20,000.00
- Rate on the gain
- 10.84%
- Net investment income tax part
- $0.00
- Gain after tax
- $17,832.50
- Total tax with the sale
- $7,190.50
- Total tax without the sale
- $5,023.00
- Rates of tax year
- 2,026
Tax on the gain: $2,167.50. Selling for $50,000.00 what cost $30,000.00 gives a $20,000.00 gain and $2,167.50 of federal tax.
How much of the gain do you keep?
Tax on the gain by other income
The results are estimates for information only. They are not financial, tax, or legal advice. Check the numbers with your lender or a qualified professional before you decide. Terms of use
How to calculate
Estimates the 2026 federal capital gains tax on a sale of stock, a home you do not exclude, or other property: short-term at ordinary rates, long-term at 0%, 15%, or 20%, plus the 3.8% net investment income tax.
Example with the default inputs (Purchase price (cost basis) $30,000.00, Sale price $50,000.00, Held for More than 1 year, Filing status Single, Other income $60,000.00, Tax year 2,026): Selling for $50,000.00 what cost $30,000.00 gives a $20,000.00 gain and $2,167.50 of federal tax.
Method: Gain = sale price − basis. Tax on the gain = Form 1040 tax with the gain − Form 1040 tax without it, both with the standard deduction: a long-term gain at 0%, 15%, or 20% by the Qualified Dividends and Capital Gain Tax Worksheet, a short-term gain at the ordinary rates, a loss limited to $3,000 ($1,500 separately), plus the 3.8% net investment income tax.
- An estimate for tax year 2026 (IRS Rev. Proc. 2025-32), not tax advice.
- Other income is ordinary income such as wages, with the standard deduction and no credits; it is not earned income for the earned income credit.
- Not modelled: the 25% rate on unrecaptured section 1250 gain (depreciation on real estate), the 28% rate on collectibles, the home sale exclusion ($250,000 or $500,000), carryover losses from earlier years, the alternative minimum tax, and state tax on the gain.
Worked examples
Each example is checked against the calculator on every build.
- Purchase price (cost basis) $30,000.00, Sale price $50,000.00, Held for More than 1 year, Filing status Single, Other income $60,000.00 gives Gain or loss $20,000.00, Total tax without the sale $5,023.00, Total tax with the sale $7,190.50, Tax on the gain $2,167.50, Rate on the gain 10.8375%.
- Purchase price (cost basis) $30,000.00, Sale price $50,000.00, Held for 1 year or less, Filing status Single, Other income $60,000.00 gives Tax on the gain $3,753.00, Total tax with the sale $8,776.00.
- Purchase price (cost basis) $100,000.00, Sale price $200,000.00, Held for More than 1 year, Filing status Married filing jointly, Other income $250,000.00 gives Tax on the gain $18,800.00, Net investment income tax part $3,800.00, Total tax without the sale $37,468.00.Source: 15% on $100,000 plus the 3.8% net investment income tax on AGI over $250,000 (Form 8960)
- Purchase price (cost basis) $15,000.00, Sale price $10,000.00, Held for 1 year or less, Filing status Single, Other income $40,000.00 gives Gain or loss -$5,000.00, Tax on the gain -$360.00.
How it works
The tax on the gain is the difference between two federal returns for tax year 2026: one with the sale and one without it. Both take the standard deduction ($16,100 single or separate, $32,200 jointly or surviving spouse, $24,150 head of household) and no credits, and treat the other income as ordinary non-wage income.
- Gain = sale price − cost basis (negative for a loss).
- A long-term gain is added as net long-term capital gain; a short-term gain as a short-term gain. A net loss counts against other income only down to −$3,000 (−$1,500 separately).
- Each return's tax on taxable income follows Form 1040 line 16: the Tax Table below $100,000 (the rate schedule at the middle of the $50 row, rounded to whole dollars) or the rate schedule above, with the long-term gain taxed by the Qualified Dividends and Capital Gain Tax Worksheet: ordinary income first, then the gain at 0% up to the 0% limit, 15% up to the 15% limit, and 20% above.
- Each return adds the 3.8% net investment income tax on the lesser of investment income (the gain, if positive) and AGI above $200,000 ($250,000 jointly or surviving spouse, $125,000 separately).
- Tax on the gain = total tax with the sale − total tax without it. Rate = tax ÷ gain. Gain after tax = gain − tax.
The tax year field keeps 2026 rates until the IRS publishes the next year's, and says so.
Worked examples by hand
Single, $60,000 of other income, a $20,000 long-term gain. Without the sale: taxable income 60,000 − 16,100 = $43,900; Tax Table (row middle $43,925) 1,240 + 12% × 31,525 = $5,023. With it: taxable income $63,900, of which $43,900 ordinary ($5,023). The 0% rate covers up to $49,450: $5,550 of the gain at 0%; the other $14,450 at 15% = $2,167.50. Tax on the gain = $2,167.50, 10.84% of the gain.
The same gain, short-term. Taxable income $63,900 is all ordinary: row middle $63,925 gives 1,240 + 4,560 + 22% × 13,525 = 8,775.50, rounded to $8,776. Tax on the gain = 8,776 − 5,023 = $3,753.
Married filing jointly, $250,000 of other income, a $100,000 long-term gain. Without: taxable income $217,800, tax 2,480 + 9,120 + 24,332 + 24% × 6,400 = $37,468. With: the ordinary part is still $217,800, above the 0% limit ($98,900), so the whole gain is at 15% = $15,000. AGI $350,000 is $100,000 over $250,000, so the net investment income tax is 3.8% × 100,000 = $3,800. Tax on the gain = $18,800.
Single, $40,000 of other income, a $5,000 short-term loss. Only $3,000 counts this year. Taxable income falls from $23,900 to $20,900; the Tax Table gives $2,623 and $2,263. Tax saved $360 (12% × 3,000).
Other questions people ask
What are the 2026 long-term capital gains tax rates?
0%, 15%, and 20%. The 0% rate covers taxable income up to $49,450 single ($98,900 married filing jointly, $66,200 head of household). The 15% rate runs to $545,500 single ($613,700 jointly, $579,600 head of household, $306,850 separately). Above that, 20%. Source: IRS Rev. Proc. 2025-32 section 4.03.
What is the difference between short-term and long-term gains?
A gain on something you held one year or less is short-term and is taxed like wages, at 10% to 37%. Held more than one year, it is long-term and gets the 0%, 15%, or 20% rates.
Why does my other income matter?
The gain sits on top of your other taxable income. The part of the gain that fits under the 0% limit is taxed at 0%, the next part at 15%, and so on. So the same gain can cost nothing for one person and 20% for another.
What is the net investment income tax?
An extra 3.8% on investment income, gains included, when your modified AGI is over $200,000 single or $250,000 married filing jointly ($125,000 separately). It is on Form 8960, and the calculator adds it.
What if I sold at a loss?
A loss first offsets other gains, then up to $3,000 of other income a year ($1,500 married filing separately). The rest carries over to later years. The calculator shows the tax you save this year as a negative number.
How is the cost basis figured?
Basis is what you paid plus buying costs (commissions) and, for property, the cost of improvements, less depreciation you took. Subtract selling costs from the sale price. Your broker reports basis for most stock on Form 1099-B.
What does this calculator leave out?
The 25% rate on depreciation recapture of real estate, the 28% rate on collectibles, the home sale exclusion, loss carryovers, the alternative minimum tax, and state tax. It is an estimate, not tax advice.