Free calculator · no signup

Capital gains tax calculator

Estimate the federal tax on your investment gains. Long-term gains get preferential 0/15/20% rates that stack on your ordinary income — so part of your gain may be taxed at 0%.

Your numbers
$
$
Estimated federal tax on this gain
$4,995
An effective rate of 10.0%. You keep $45,005 of the $50,000 gain.
How your gain is taxed
$16,700 taxed at0%
$33,300 taxed at15%
Part of your gain falls in the 0% bracket — that portion is federally tax-free. Low-income years are prime opportunities to harvest gains.
Federal estimate using 2026 brackets. Excludes state tax and the 3.8% net investment income tax. This is an estimate, not tax advice.
Time your gains across retirement
Gains interact with ACA subsidies, IRMAA, and Roth conversions. planbend models your brokerage sales in the context of your whole tax picture, year by year — free to start.

Long-term gains get a real tax break

Hold an investment more than a year before selling and the profit qualifies as a long-term capital gain, taxed at 0%, 15%, or 20% rather than your ordinary income rate. These preferential rates are one of the biggest advantages in the tax code for patient investors. Sell within a year and the gain is short-term, taxed as ordinary income — often a much higher rate.

The stacking effect

Long-term gains sit on top of your ordinary income when determining the rate. If your ordinary income is low, part or all of your gain can fall in the 0% bracket and escape federal tax entirely. As your income rises, gains push into the 15% and eventually 20% bands. The calculator shows exactly how your gain splits across these brackets.

Why timing matters in retirement

Realizing gains in a low-income year — common in early retirement before Social Security and RMDs — can mean paying 0% on a chunk of them, a strategy known as gain harvesting. But gains also raise your adjusted gross income, which can shrink ACA subsidies and, later, raise Medicare premiums. Seeing the whole picture before you sell is what separates a smart sale from a costly one.

planbend is a planning tool, not a tax advisor. This calculator estimates federal tax using 2026 brackets and excludes state tax and the net investment income tax. For your situation, the Resources page can help you find a licensed professional.

Common questions

How are long-term gains taxed?
At 0%, 15%, or 20% depending on total income. Gains stack on your ordinary income, so where they land sets the rate. Many people pay 0% on at least part.
Short-term vs long-term?
Short-term (held a year or less) is taxed as ordinary income. Long-term (over a year) gets the lower 0/15/20% rates. Holding longer can cut the tax substantially.
How can I pay 0%?
If total taxable income including the gain stays under the 0% threshold, long-term gains are federally tax-free. Low-income years are ideal for harvesting gains.
Do gains affect anything else?
Yes — they raise AGI, which can reduce ACA subsidies and push you into a higher Medicare IRMAA tier two years later. Worth seeing in your whole tax picture.