Capital Gains Tax Calculator
When you sell a stock for more than you paid, the profit is a capital gain, and how long you held the shares decides how the IRS treats it. This calculator takes your sale proceeds, cost basis, holding period, filing status and taxable income, classifies the gain as short-term or long-term, and estimates the federal tax using the 2026 thresholds from IRS Revenue Procedure 2025-32. Everything runs in your browser; nothing you type is sent anywhere.
How the Capital Gains Tax Calculator Works
The gain is your proceeds minus your cost basis. If you held the shares for one year or less, the gain is short-term: it is added to your ordinary income and taxed through the regular 2026 federal brackets, which run from 10% to 37%. If you held for more than one year, it is long-term and runs through the separate 0%, 15% and 20% schedule instead. In both cases the calculator stacks the gain on top of the taxable income you enter and taxes only the layers it fills, which is how the IRS actually computes it - so a large gain can straddle two rates and the effective rate on the gain lands in between. A sale below your cost basis is a capital loss: it owes nothing, and on a real return losses first offset gains, then up to $3,000 of ordinary income per year.
Why the One-Year Line Matters So Much
Holding a winner for one year and a day instead of eleven months can cut the federal rate on the gain by a third or more at typical incomes - a 22% or 24% ordinary rate becomes a 15% long-term rate, and at lower incomes it can become 0%. For the 2026 tax year the long-term thresholds are $49,450 and $545,500 of taxable income for single filers, $98,900 and $613,700 married filing jointly, and $66,200 and $579,600 for heads of household: below the first number the long-term rate is 0%, between them 15%, above the second 20%. Short-term trading gives up that discount entirely, which is a real, quantifiable cost of rapid trading that beginners rarely price in. For the fuller picture - wash sales, tax-loss harvesting, cost basis records and the 1099-B - read the guide on tax basics for the move from paper to real trading.
Frequently Asked Questions
More than one year, measured from the day after you buy to the day you sell. A holding period of exactly one year or less makes the gain short-term, which is taxed at the same federal rates as your salary. Crossing the one-year line moves the gain into the long-term schedule of 0%, 15% or 20%, which is lower at almost every income level.
For the 2026 tax year, long-term gains are taxed at 0% for taxable income up to $49,450 (single) or $98,900 (married filing jointly), at 15% up to $545,500 (single) or $613,700 (married filing jointly), and at 20% above those amounts. Heads of household have their own thresholds of $66,200 and $579,600. High earners may also owe an additional 3.8% net investment income tax.
Yes, and the order matters. Long-term gains stack on top of your ordinary taxable income, so your wages and other income fill the brackets first and the gain is taxed in whatever long-term bracket it lands in above them. That is why the same $10,000 gain can be taxed at 0% for one person and 15% or 20% for another - the rate depends on total taxable income, not on the gain alone.