How to Use This Tool
Enter the gain and your other taxable income. If you have the dates, put those in too and the holding-period question answers itself.
One year and a day
A gain is long-term if the asset was held for more than one year. The counting starts the day after purchase and includes the day of sale, so buying on 15 March and selling on the following 15 March is exactly one year — still short-term. Sell on 16 March and it is long-term.
That single day is worth a great deal. On $20,000 of gain for a single filer with $40,000 of other taxable income:
- Long-term: $1,582.50 — $9,450 of the gain falls in the 0% band, the rest at 15%.
- Short-term: $3,360 — taxed as ordinary income at 12% and 22%.
- Difference: $1,777.50.
It is worth checking the exact date before selling anything close to the boundary. Note also that the trade date governs, not the settlement date.
The 0% band is wider than people think
Long-term gains have their own rate schedule: 0%, 15% and 20%. For 2026 a single filer pays 0% on long-term gains until total taxable income reaches $49,450, and a married couple filing jointly until $98,900.
Because it is total taxable income that matters, a low-income year — a sabbatical, a career break, early retirement before pensions start — can let a substantial gain be realised at no federal tax at all. Deliberately realising gains up to the top of the 0% band, then rebuying, resets your cost basis for free. There is no wash-sale rule on gains, only on losses.
The gain stacks on your income
Long-term gains are taxed last, sitting on top of your ordinary income. Your other income therefore determines which band the gain falls into, and a single gain can span two bands.
With $40,000 of other taxable income and a $20,000 gain, $9,450 of the gain fits below the $49,450 threshold and is taxed at 0%, while the remaining $10,550 is taxed at 15%. Neither the whole gain at 0% nor the whole gain at 15% would be right.
The 3.8% that sits on top
The net investment income tax adds 3.8% on the smaller of your net investment income or the amount by which MAGI exceeds $200,000 single, $250,000 married filing jointly, or $125,000 married filing separately.
Those thresholds are written into statute and are not indexed for inflation. They have not moved since 2013, so each year a little more of the population crosses them. It means the real top rate on long-term gains is 23.8%, not 20%.
What this leaves out
- State tax. Most states tax capital gains as ordinary income with no preferential rate, which can swamp the federal difference entirely.
- Collectibles at up to 28%, and unrecaptured section 1250 gain on depreciated real estate at up to 25%.
- Losses. Capital losses offset gains, and up to $3,000 of net loss offsets ordinary income each year, with the rest carried forward.
- The wash sale rule, which disallows a loss if you rebuy substantially identical securities within 30 days either side. It applies to losses only, not gains.
- Qualified dividends, taxed on the same schedule as long-term gains.
Figures are for tax year 2026. This is arithmetic, not tax or investment advice — and tax is only one input into whether to sell something.
