Tax
Capital Gains Tax Calculator
Estimate the federal tax on selling at a gain, short-term or long-term, and what holding past one year would save.
Federal tax only, 2026 figures. Your state may tax the gain too. Collectibles and real estate depreciation follow different rules and aren’t covered.
Heads up: the 2026 federal figures in this tool (the brackets, the standard deduction and the long-term capital gains thresholds) are still waiting on our CPA’s check against the IRS tables. Read the results as approximate until this note is gone.
What this means
On a $6,000 gain, the federal tax comes to about $780, or 13% of the gain. Held a year or less, it's taxed like a paycheck, on top of your other income, so it lands at your highest rates (up to 22% here).
Holding it past the one-year mark would drop the tax to about $233: $548 less. If the date is close, waiting can be worth more than whatever the price does in the meantime. It can also move against you, so that is a judgment call, not a rule.
This is an estimate of federal tax, not tax advice. Gains and losses from other sales this year net against this one.
These are estimates to help you think, not personalized legal, tax, or investment advice, and not a promise of any result.
This calculator estimates the federal tax on selling a stock, fund or other investment at a gain. Enter your other taxable income, what you paid, what you sold for and how long you held it, and it shows the gain, the tax, the effective rate on the gain, and what holding past the one-year mark would save.
Why it matters: the same gain can be taxed very differently depending on how long you held it. Held a year or less, it's taxed like wages. Held longer, it gets lower rates, and at modest incomes part or all of it can be taxed at 0%. Knowing the difference before you sell can be worth real money.
How to use it
Enter your other taxable income
Your income after deductions, without this sale. For most people that's total income minus pre-tax deductions minus the standard deduction. It matters because the gain stacks on top of it.
Enter what you paid and what you got
What you paid is your cost basis (purchase price plus fees), shown on your brokerage's tax forms. What you sold for is after selling fees. A sale below what you paid is a loss, and the calculator shows how that offsets other income.
Pick the holding period
One year or less is short-term; more than one year is long-term. The result shows the tax both ways, so you can see what waiting would be worth.
Behind the numbers
Short-term is taxed like a paycheck
A gain on something held a year or less is ordinary income. It's added on top of your other income and taxed at your regular bracket rates, usually your highest ones.
Long-term gains stack on top
Long-term gains have their own rates of 0%, 15% and 20%, but the thresholds count your other income first. Your wages fill the 0% band before the gain does, so only what's left of that band shelters the gain. That stacking is why two people with the same gain can owe very different tax.
The extra 3.8% at higher incomes
Above set income levels, a 3.8% net investment income tax applies to investment gains on top of the regular rates, whether short-term or long-term. Those thresholds are set in law and are not adjusted for inflation.
The math behind it
The gain is the sale price minus what you paid. Short-term: figure your tax with the gain added to your other taxable income, and subtract your tax without it. Long-term: stack the gain on top of your other taxable income and see how much of it falls under the 0% threshold, how much in the 15% band, and how much above it at 20%. Then, if your income is high enough, add 3.8% of the smaller of the gain or the amount your income is over the net investment income tax threshold.
Worked example
A single filer with $45,000 of other taxable income sells for $14,000 something bought for $8,000: a $6,000 gain. Short-term, it's taxed as income: $5,400 at 12% and $600 at 22%, $780 in all. Long-term, the 0% band covers taxable income up to about $49,450 this year, so $4,450 of the gain is taxed at 0% and $1,550 at 15%: about $233. Waiting past the one-year mark would save about $548. (The federal figures behind this example are still waiting on our CPA's check against the IRS tables; read them as approximate.)
Check the calendar before you sell
If a sale with a gain is a few weeks short of the one-year mark, look at the long-term number before you sell. The difference is often a third or more of the tax. Then weigh it against the risk of the price moving while you wait.
Common questions
How much tax will I pay on a capital gain?
Held a year or less, the gain is taxed at your ordinary income rates. Held more than a year, it's taxed at 0%, 15% or 20% depending on your taxable income including the gain, plus 3.8% net investment income tax at higher incomes. The calculator runs your numbers both ways.
Can I pay 0% on capital gains?
Yes, on long-term gains, if your taxable income including the gain stays under the 0% threshold for your filing status. Part of a gain can be at 0% and the rest at 15%, which the calculator shows.
What if I sold at a loss?
A loss first offsets other capital gains. Beyond that, it can offset other income, with a yearly limit of $3,000, and the rest carries forward to future years. Buying the same investment within 30 days before or after the sale can disallow the loss under the wash-sale rule.
Does this include state tax?
No. It's federal only. Most states with an income tax tax capital gains as regular income, so add your state's rate on top for a fuller picture.
Sources & references
Go deeper
The calculator gives you a number. The Investing Brick teaches you what to do with it, in plain English. And if you’re not sure where to start, the free BrickScore Assessment checks your whole foundation in about 5 minutes.
first the number, then the move