How much tax will I pay if I sell, and how much gain can I realize at 0%?
See the 2026 federal tax on selling an investment at a long-term gain, and how much gain fits in the 0% band this year given the rest of your income.
Filing status
You are 65 or older by December 31, 2026
Adds the extra standard deduction and, through 2028, the senior deduction.
TAX ON THIS SALE
$3,000
As a single filer with $145,000 of income ($4,350 of it in pre-tax accounts), taking the standard deduction, a $20,000 long-term gain costs $3,000 of federal income tax ($20,000 at 15%). None of your gain fits in the 0% band this year: ordinary taxable income is already above $49,450.
Gain you can realize at 0%
$0
Federal tax
$3,000
Effective rate
15.0%
UNDERSTAND YOUR RESULT
Tax on the sale, by size of the gain
No long-term gain fits in the 0% band at this income, so each dollar costs 15 cents or more. A $20,000 sale costs $3,000.
Where this gain is taxed
0%
$0
15%
$20k
20%
$0
Of the $20,000 gain, $0 falls in the 0% band, $20,000 in the 15% band and $0 in the 20% band. The 0% band ends at $49,450 of taxable income and the 15% band at $545,500.
What different sales cost
| Long-term gain | Federal tax | Investment income tax | State tax | Total | Rate |
|---|---|---|---|---|---|
| $5,000 | $750 | $0 | $0 | $750 | 15.0% |
| $10,000 | $1,500 | $0 | $0 | $1,500 | 15.0% |
| $20,000 (yours) | $3,000 | $0 | $0 | $3,000 | 15.0% |
| $25,000 | $3,750 | $0 | $0 | $3,750 | 15.0% |
| $50,000 | $7,500 | $0 | $0 | $7,500 | 15.0% |
| $100,000 | $15,000 | $1,545 | $0 | $16,545 | 16.5% |
| $250,000 | $37,500 | $7,245 | $0 | $44,745 | 17.9% |
Every row uses the same $145,000 of other income. The rate is the total tax divided by the gain.
What moves the needle
Each row re-runs the calculation with one change. Click to apply.How it's computed
FORMULA
Taxable income = income − pre-tax contributions − deduction (standard, itemized, or plus the senior deduction), with the gain stacked on top
0% on gain up to the 0% ceiling ($49,450 single, $98,900 joint, $66,200 head of household in 2026), 15% up to the 15% ceiling, 20% above
Net Investment Income Tax = 3.8% × the smaller of the gains and the amount your income is over $200,000 (single or head of household) or $250,000 (joint)
Room at 0% = the most gain you can add before any federal tax, found by adding gain until the federal tax first rises
- The gain is a long-term gain, on something held more than a year. Short-term gains are taxed as ordinary income, so put them in income instead.
- Rates and dollar limits are the 2026 ones from Rev. Proc. 2025-32. The Net Investment Income Tax thresholds ($200,000 single, $250,000 joint) are set by statute and not adjusted for inflation. Only the gains are counted as investment income; interest, dividends and rent would add to it.
- The 0% band is measured on taxable income, after the deduction. For a single filer with no other adjustments, income of about $65,550 is still in the band.
- Credits, the alternative minimum tax, collectibles and real-estate depreciation (taxed at higher rates) and qualified small business stock are not modelled.
- A sale also raises income measures other rules use, such as the premium tax credit for marketplace health insurance, Medicare premium brackets two years later and financial-aid formulas. This page prices the tax, not those effects.
WORKED EXAMPLE · SAMPLE NUMBERS
$145,000 of income less $4,350 pre-tax leaves $140,650 of ordinary income before the deduction. The 0% band ends at $49,450 of taxable income, and $0 of gain fits under it. Your $20,000 gain is taxed $0 at 0%, $20,000 at 15% and $0 at 20%: $20,000 × 15% + $0 × 20% = $3,000 of federal tax. Total $3,000.
SOURCES
[1]Rev. Proc. 2025-32: 2026 inflation-adjusted tax items (brackets, standard deduction, capital-gains amounts)Internal Revenue Service, 2025[2]Topic no. 409: Capital gains and lossesInternal Revenue Service[3]Topic no. 559: Net investment income taxInternal Revenue Service[4]Publication 550: Investment Income and Expenses (wash sales)Internal Revenue ServiceHSBuilt by Hussain Sehorewala · checked against worked examples · Sep 29, 2026
Keep this number honest as your life changes.
Put it on your Money Map and it re-runs as you change the seven numbers. It stays in this browser, and the calculator stays free.
Questions about this result
For 2026, long-term gains are taxed at 0% to the extent your taxable income, gains included, is at or below $49,450 for a single filer, $98,900 for a married couple filing jointly or $66,200 for a head of household. Taxable income is after the deduction, so with no other adjustments a single filer can have about $65,550 of income and still be in the band, a couple about $131,100 and a head of household about $90,350.
Selling an investment that has gone up in a year when part of the gain fits in the 0% band, and buying it back, so the cost basis resets higher and less of the gain is taxable later. The wash-sale rule, which disallows a loss when you buy back within 30 days, applies to losses and not to gains, so you can sell and buy back right away. What it saves depends on the rate you would otherwise pay later.
Yes. The 3.8% Net Investment Income Tax applies to the smaller of your net investment income and the amount your income is over $200,000 (single or head of household) or $250,000 (married filing jointly). Those thresholds are set by statute and are not adjusted for inflation. The page adds it when your income is over the line.
The gain counts as income for other rules: the premium tax credit for marketplace health insurance can shrink, Medicare premiums can rise two years later, and financial-aid formulas and some credits and deductions can be reduced. Check those before you realize a large gain in a year that matters to them.
Most states with an income tax treat a capital gain as ordinary income, a few have their own rates for it, and some states have no income tax. Enter a flat rate if you want it counted; a state with brackets is not modelled.
Something you held for more than one year before selling. If you held it one year or less the gain is short-term and taxed as ordinary income, so put it in income rather than in the gain field.
THE LEDGER · 20 minTax Loss Harvesting: Save Thousands Legally in 2026
THE LEDGER · 12 minThe $70K Tax Loophole: Mega Backdoor Roth and Advanced Retirement Strategies for 2026
GUIDE · $29Tax Moves for W-2 Earners