Capital Gains Tax Calculator
Estimate US federal tax on a capital gain, and see the difference between short-term and long-term treatment.
Last updated: October 13, 2026. The 0% and 15% thresholds for 2025 and 2026 were compared with IRS Rev. Proc. 2024-40 and Rev. Proc. 2025-32 on that date (see Sources). Page text and examples were checked against the calculator code.
This is a US federal income tax estimate for education, not tax advice. It ignores the Net Investment Income Tax (an extra 3.8% that can apply above certain income thresholds), state tax, and other credits or adjustments. Nothing you type is sent anywhere.
How this is calculated
Gains on an asset held one year or less are short-term and taxed as ordinary income, at the same brackets as wages. Gains on an asset held more than one year are long-term and taxed at preferential 0%, 15% or 20% federal rates. Long-term gains "stack" on top of your other taxable income: the calculator adds the gain to your other income to see how much of it falls in each capital gains bracket, then taxes only the part in each bracket at that bracket's rate.
Frequently asked questions
Why does "other taxable income" matter for the rate?
Because the 0/15/20% capital gains brackets are based on your total taxable income including the gain, a large enough gain (or high enough other income) can push part of the gain from the 15% band into the 20% band.
Do capital losses offset gains?
Yes, generally you net gains and losses of the same type first (short-term against short-term, long-term against long-term), then net the totals against each other; up to $3,000 of net losses can offset ordinary income each year, with the rest carried forward. This calculator does not model losses.
Worked example
A single filer in 2026 has $60,000 of other taxable income and sells shares for a $20,000 gain. The 0% long-term band ends at $49,450 and the 15% band runs to $545,500, so with $60,000 of other income the whole $20,000 lands in the 15% band. Long-term tax is $3,000, an effective rate of 15%. If the shares were held one year or less, the gain is taxed as ordinary income: the 22% bracket covers the whole slice from $60,000 to $80,000, which gives $4,400. Holding for over a year saves $1,400 in this case.
Compare a filer with only $20,000 of other taxable income and the same $20,000 gain. Total income is $40,000, still under $49,450, so the long-term gain falls entirely in the 0% band and the federal tax on it is zero.
Methodology and sources
The calculator uses the stacking idea from the IRS worksheet for qualified dividends and capital gains. It computes the 0/15/20% tax on (other taxable income plus gain) and subtracts the same tax on other taxable income alone; the difference is the tax caused by the gain. The short-term figure is the ordinary bracket tax on (other income plus gain) minus the ordinary bracket tax on other income. Thresholds by filing status and year are the long-term capital gains tables from IRS Rev. Proc. 2024-40 (2025) and Rev. Proc. 2025-32 (2026), and the ordinary brackets are the same tables used on the other pages of this site.
Sources
- IRS Rev. Proc. 2025-32 (2026 inflation adjustments) (section 4.03: 2026 maximum zero rate and 15% rate amounts)
- IRS Rev. Proc. 2024-40 (2025 inflation adjustments) (section 3.03: 2025 amounts)
- IRS Topic 409, Capital gains and losses (holding period, 0/15/20% rates, $3,000 net loss limit)
Limitations and assumptions
This is an educational estimate and not tax advice. It assumes a plain gain on an asset such as shares. Collectibles, depreciation recapture, home sale exclusions, wash sales, carried-over losses, the net investment income tax and state tax are not modelled, and you must work out the holding period yourself. Enter taxable income after deductions, not gross income. Confirm figures with the Schedule D instructions or a tax professional.
Related: the tax bracket calculator and the retirement tools.