Capital Gains Tax Calculator (US Federal)
Estimate federal capital gains tax on investments by holding period and income bracket.
What this calculates
Federal capital gains rules are simple: held under a year, gains are taxed as ordinary income. Held over a year, you get preferential long-term rates of 0%, 15%, or 20% based on income. This calculator estimates the tax on a sale; state taxes vary and aren't included.
Formula & how it works
Gain = sale − basis. Short-term (≤1 yr): taxed at ordinary marginal rate. Long-term (>1 yr): 0% if income low, 15% mid, 20% high. NIIT 3.8% above $200k single / $250k joint.
Worked example
Sold stock for $25,000, basis $10,000, held 18 months, single filer with $90k income. Long-term gain $15,000 × 15% = $2,250 federal tax.
Frequently asked questions
How is the holding period counted?
From the day after purchase to the day of sale. One year exactly = short-term.
Crypto?
Same federal treatment as stocks. Each disposal is a taxable event.
Losses?
Capital losses offset gains. Net loss up to $3,000/yr offsets ordinary income; rest carries forward.
Disclaimer: Federal estimate only — consult a tax professional for state and complex situations.
Related calculators
- Tax BracketsEstimate US federal income tax owed for 2026 using the official IRS brackets. Marginal vs effective rate shown.
- Crypto P&LCalculate cryptocurrency profit, loss, and ROI from entry price, exit price, position size, and trading fees.
- ROICalculate return on investment as a percentage and annualized return. Compare investments fairly by adjusting for the holding period.