Capital Gains Tax Calculator

Estimate federal capital gains tax on investment sales

What is this? This calculator estimates how much tax you'll owe when you sell an investment — stocks, real estate, or crypto. It handles short-term gains (held <1 year, taxed as income) vs. long-term gains (held >1 year, lower tax rates), and shows the effect of tax-loss harvesting.

Who it's for: Investors selling stocks or property, people considering tax-loss harvesting to offset gains, or anyone trying to estimate taxes before making an investment exit.
Sale Details
Your Income (for bracket determination)
Tax-Loss Harvesting (offset gains with losses)
NIIT note: If MAGI + net investment income exceeds $200K (single) or $250K (married), you owe 3.8% NIIT on the lesser of net investment income or the excess over threshold.
Results
Capital Gain
Federal Tax
State Tax
Total Tax
Effective Rate
Net Proceeds

Estimates only. Not tax advice. Consult a CPA or use TurboTax or TaxAct for accurate filing.

Capital Gains & Tax Strategy

Tools that pair well with this calculator — selected by our team.

FreeTaxUSA →
50% off — capital gains reporting, tax-loss harvesting
TurboTax →
$25–$50/sale through Awin — capital gains guidance
ToolBest ForNetwork
FreeTaxUSA50% offDirect
TurboTax$25–$50/sale through AwinAwin

We may earn a commission if you click above. Calculator is free to use.

Frequently Asked Questions

How are capital gains taxed in 2026?

Short-term (<1 year): taxed as ordinary income (10-37%). Long-term (>1 year): 0%, 15%, or 20% depending on taxable income. High earners also pay 3.8% Net Investment Income Tax (NIIT). State taxes add more.

What is tax-loss harvesting?

Selling investments at a loss to offset capital gains and reduce taxes. You can deduct up to $3,000 in losses against ordinary income annually. The wash sale rule prevents buying the same security within 30 days before or after the sale.

How do I calculate cost basis?

Cost basis = purchase price + commissions + acquisition costs. For dividends reinvested, add the reinvested amounts. If you received stock as a gift, cost basis carries over from the giver. Inherited stock gets a step-up in basis to the date of death.

Related Calculators