You'd owe about $3,000 on a $20,000 long-term gain
That's an effective rate of 15% on the gain, leaving you $17,000. Long-term gains get preferential 0%, 15% or 20% rates based on your total income. Figures use 2025 federal rules.
Estimate the federal tax on an investment sale — short-term vs long-term, with the 3.8% surtax where it applies.
Capital gains tax
$3,000
2025 federal estimate.
For comparison.
That's an effective rate of 15% on the gain, leaving you $17,000. Long-term gains get preferential 0%, 15% or 20% rates based on your total income. Figures use 2025 federal rules.
If you'd sold this at a short-term gain (held one year or less), it would be taxed as ordinary income — about $4,400 instead of $3,000 in federal tax. The one-year holding line is one of the highest-value dates in investing: crossing it can cut the tax on a gain by more than half.
A capital gain raises your total income, which can ripple into other thresholds — IRMAA Medicare surcharges, ACA subsidies, the NIIT. Model your full federal tax with and without the sale to see the complete effect.
Federal income tax calculatorWorked scenarios with the full analysis, so you can see how the numbers move before entering your own.
A single filer selling a long-held investment for a $20,000 profit — most of it taxed at the 15% long-term rate.
Capital gains tax
$3,000
That's an effective rate of 15% on the gain, leaving you $17,000. Long-term gains get preferential 0%, 15% or 20% rates based on your total income. Figures use 2025 federal rules.
If you'd sold this at a short-term gain (held one year or less), it would be taxed as ordinary income — about $4,400 instead of $3,000 in federal tax. The one-year holding line is one of the highest-value dates in investing: crossing it can cut the tax on a gain by more than half.
A capital gain raises your total income, which can ripple into other thresholds — IRMAA Medicare surcharges, ACA subsidies, the NIIT. Model your full federal tax with and without the sale to see the complete effect.
Federal income tax calculatorIdentical sale held one year or less, taxed as ordinary income to show the cost of selling early.
Capital gains tax
$4,400
That's an effective rate of 22% on the gain, leaving you $15,600. Short-term gains are taxed as ordinary income at your marginal rate of 22%. Figures use 2025 federal rules.
This gain is short-term, so it's taxed as ordinary income at your 22% marginal rate — about $4,400. Held for more than a year, the same gain would qualify for long-term rates and cost roughly $3,000. If you're close to the one-year mark, waiting can be worth $1,400.
A capital gain raises your total income, which can ripple into other thresholds — IRMAA Medicare surcharges, ACA subsidies, the NIIT. Model your full federal tax with and without the sale to see the complete effect.
Federal income tax calculatorA lower-income filer whose gain falls partly or fully in the 0% long-term capital gains bracket.
Capital gains tax
$1,748
That's an effective rate of 8.7% on the gain, leaving you $18,253. Long-term gains get preferential 0%, 15% or 20% rates based on your total income. Figures use 2025 federal rules.
If you'd sold this at a short-term gain (held one year or less), it would be taxed as ordinary income — about $3,553 instead of $1,748 in federal tax. The one-year holding line is one of the highest-value dates in investing: crossing it can cut the tax on a gain by more than half.
Long-term gains are taxed at 0% until your total income reaches $48,350. With $40,000 of other income, roughly $8,350 of this gain falls in the 0% band. In lower-income years — early retirement, a gap year, a sabbatical — deliberately realizing gains up to this threshold can reset your cost basis entirely tax-free.
A large sale that pushes total income past the Net Investment Income Tax threshold, adding the 3.8% surtax.
Capital gains tax
$27,440
That's an effective rate of 18.3% on the gain, leaving you $122,560. Long-term gains get preferential 0%, 15% or 20% rates based on your total income. Figures use 2025 federal rules, including the 3.8% Net Investment Income Tax.
If you'd sold this at a short-term gain (held one year or less), it would be taxed as ordinary income — about $49,000 instead of $22,500 in federal tax. The one-year holding line is one of the highest-value dates in investing: crossing it can cut the tax on a gain by more than half.
Because your income plus this gain ($330,000) exceeds the $200,000 threshold for your filing status, $130,000 of the gain is subject to the additional 3.8% NIIT on top of the regular capital gains rate. This surtax catches many people by surprise in a year with a large sale.
How long you hold an asset before selling determines how the profit is taxed. Sell after holding one year or less and the gain is short-term, taxed as ordinary income at your regular marginal rate — up to 37% federally. Hold for more than a year and it becomes long-term, taxed at the preferential 0%, 15% or 20% rates.
That difference is large. For many investors, crossing the one-year mark cuts the tax on a gain by more than half. It's why the holding period is one of the most important — and most overlooked — dates in taxable investing.
Long-term capital gains have a genuine 0% bracket. If your total taxable income — including the gain — stays under the first threshold, that portion of the gain is taxed at nothing. In low-income years, deliberately selling appreciated assets up to this line resets your cost basis entirely tax-free, a strategy known as gain harvesting.
At the other end, high earners face an extra layer: the Net Investment Income Tax adds 3.8% on investment income once modified adjusted gross income passes $200,000 (single) or $250,000 (married). It stacks on top of the regular capital gains rate, so a top-bracket long-term gain can effectively be taxed at 23.8% federally before any state tax.
Capital losses are valuable. They offset capital gains dollar-for-dollar, and if losses exceed gains, up to $3,000 of the excess can reduce your ordinary income each year, with the rest carrying forward indefinitely. Selling losing positions to offset winners — tax-loss harvesting — is a standard year-end move.
The main pitfall is the wash-sale rule: if you buy the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed. Investors usually work around it by buying a similar-but-not-identical fund to stay invested while preserving the deductible loss.
Selling at 11 months turns a long-term gain into a short-term one taxed as ordinary income. If you're close, waiting a few weeks can cut the tax by more than half.
A big gain can push income past the NIIT threshold, adding 3.8% on top of the capital gains rate. Model the surtax before selling.
In a gap year or early retirement, gains up to the threshold can be realized tax-free. Missing that window leaves a valuable, legal reset on the table.
Rebuying the same security within 30 days of selling for a loss disallows the deduction. Use a similar-but-different fund to stay invested.
Most states tax gains as ordinary income with no long-term break. The federal estimate alone understates the total in high-tax states.
It depends on how long you held the asset and your income. Long-term gains (held over a year) are taxed at 0%, 15% or 20% federally. Short-term gains (a year or less) are taxed as ordinary income, up to 37%. High earners may also owe the 3.8% Net Investment Income Tax. Enter your numbers above for a specific estimate using 2025 federal rates.
It's the holding period. Sell an asset after owning it a year or less and the profit is a short-term gain, taxed at your ordinary income rate. Hold it more than a year and it's a long-term gain, taxed at lower preferential rates. The distinction can cut the tax on a gain by more than half, which is why holding past the one-year mark often matters.
Long-term capital gains are taxed at 0% until your total taxable income — including the gain — reaches a threshold ($48,350 for single filers in 2025). Gains that fall within that band are federally tax-free. In low-income years, some investors deliberately realize gains up to the threshold to reset their cost basis at no tax cost.
The NIIT is an additional 3.8% federal tax on investment income — including capital gains — for taxpayers whose modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). It stacks on top of the regular capital gains rate, so a large sale can push you over the threshold and add the surtax unexpectedly.
Usually yes. Most states tax capital gains as ordinary income, with no preferential long-term rate, though a handful — including Texas, Florida and Washington (for most gains) — have no state income tax. This calculator estimates federal tax only; add your state's rate for the full picture.
Common strategies include holding assets over a year for long-term rates, harvesting losses to offset gains, realizing gains in low-income years within the 0% bracket, donating appreciated assets to charity, and holding investments in tax-advantaged accounts like an IRA or 401(k) where gains aren't taxed as they accrue.
The next calculations that usually follow this one.
Bracket-by-bracket breakdown, your effective rate, and what the next dollar costs.
Your headline return is not your return. See what survives fees, taxes and inflation.
Federal tax, FICA, state tax and deductions — see exactly what lands in your account.
See the balance, the split between contributions and growth, and what it actually buys.
See what your contributions and your employer's match grow into — and whether you're leaving free money on the table.
Guides that explain the decisions behind these numbers.
How US federal tax brackets work, the difference between marginal and effective rates, and the deductions and accounts that actually reduce your bill.
Updated January 15, 2026
A beginner's guide to investing in the US: account order, index funds, fees, asset allocation and the behavioral mistakes that cost the most.
Updated January 15, 2026
New tools, guides and the occasional thing that will genuinely save you money. No spam, unsubscribe anytime.
Developer note: this form has no backend. Connect an email provider and add a privacy policy before collecting real addresses.