What is Capital Gains Tax Calculator?
Free capital gains tax calculator using IRC § 1(h) long-term rates (0/15/20%) per IRS Rev. Proc. 2024-40 § 3.03, plus NIIT 3.8% (IRC § 1411). Shows short-term vs long-term comparison and tax savings from holding to long-term. No signup required.
Cap Gains runs entirely in your browser using JavaScript (browser). Your data never leaves your device.
Free Capital Gains Tax Calculator
Compute federal capital gains tax on any sale: short-term gains (≤365 days) taxed as ordinary income via bracket walk, long-term gains (≥366 days) taxed at preferential 0/15/20% rates under IRC § 1(h). LTCG stacks on top of ordinary income for bracket placement. NIIT 3.8% applied automatically when AGI exceeds $200k single / $250k MFJ. "Hold to long-term" scenario shows exact tax savings from waiting until day 366.
The sale
More than 365 days = long-term (preferential rate). 365 or fewer = short-term (ordinary rate).
Your tax context
LTCG stacks above this — your bracket depends on the total.
NIIT 3.8% applies above $200k single / $250k MFJ (IRC § 1411).
Tax owed
$4,500
Effective rate: 15.0% of the $30,000 gain.
Holding period
long-term
Tax owed
$4,500
long-term · effective 15.0%
Tax
$4,500
Net
$45,500
Short-term vs long-term — the holding period that changes everything
The single biggest lever in capital-gains tax is whether you held the asset for more than one year(long-term) or one year or less (short-term). Short-term gains are taxed as ordinary income — same as wages — at your marginal bracket of 10–37%. Long-term gains get preferential rates of 0%, 15%, or 20% under IRC § 1(h). For a high earner in the 32% bracket, holding 1 day longer to convert short-term to long-term can save 17 percentage points of tax. On a $50,000 gain, that's $8,500 just for waiting a day.
2025 LTCG brackets
Per IRS Rev. Proc. 2024-40 § 3.03:
- Single: 0% up to $48,350; 15% from $48,350 to $533,400; 20% above
- MFJ: 0% up to $96,700; 15% to $600,050; 20% above
- HoH: 0% up to $64,750; 15% to $566,700; 20% above
LTCG stacks ON TOP of ordinary income for bracket placement. If you have $50k of wages and $30k of LTCG as a single filer, the wages fill brackets up to $50k, then the $30k LTCG starts at $50k. Since $50k is already above the $48,350 zero-bracket cap, the LTCG is in the 15% bracket — total tax on the LTCG = $30k × 15% = $4,500.
Net Investment Income Tax (3.8%)
Per IRC § 1411, single filers with AGI above $200,000 (or $250,000 MFJ) pay an additional 3.8% Net Investment Income Tax on the lesser of (a) net investment income or (b) AGI over the threshold. So a single filer with $230k AGI and a $30k LTCG pays NIIT on min($30k, $230k − $200k) = $30k × 3.8% = $1,140 — on top of the 15% federal LTCG. Effective rate becomes 18.8%, not just 15%.
Common capital-gains mistakes
- Selling on day 365. The IRS counts FROM the day after acquisition — so a stock bought Jan 1 must be sold Jan 2 of the following year or later to qualify as long-term. One day off, and the entire gain is short-term.
- Forgetting the wash-sale rule. If you sell at a loss and buy back the same security (or a substantially identical one) within 30 days before or after, the loss is disallowed under IRC § 1091. Common trap with tax-loss harvesting.
- Not adding commissions to basis. Brokerage commissions, fees, and reinvested dividends add to your cost basis. Forgetting them inflates your reported gain and overpays tax.
- Ignoring step-up at death. Inherited assets get a basis step-up to FMV at date of death (IRC § 1014). If you sell shortly after, gain is computed from that stepped-up basis — often near-zero. A massively underused planning tool for highly-appreciated assets held by the elderly.
- Forgetting state tax. Federal LTCG rates are nice, but most states tax capital gains as ordinary income (CA, NY, NJ, MA, etc. all do). The 15% federal rate becomes ~22% effective once you add state.
- Wash-sale on crypto. Wash-sale rules technically don't apply to crypto under current IRS guidance (IRS treats crypto as property, not securities). But this is actively being legislated; check current status.
Frequently Asked Questions
What's the difference between short-term and long-term capital gains?+
Short-term gains (held 365 days or fewer) are taxed at your ordinary income rate (10/12/22/24/32/35/37%). Long-term gains (held more than 365 days) are taxed at preferential rates of 0/15/20% under IRC § 1(h). For high earners, the gap can be 22+ percentage points — a major reason to hold investments at least 366 days.
When does the holding period start?+
The day AFTER you acquire the asset. So a stock bought on January 1 must be sold on January 2 of the following year or later to be long-term. The IRS published this rule in Rev. Rul. 66-7 and it's been law for decades. One day off and the gain is short-term.
What are the 2025 LTCG brackets?+
Per IRS Rev. Proc. 2024-40: Single: 0% to $48,350, 15% to $533,400, 20% above. MFJ: 0% to $96,700, 15% to $600,050, 20% above. HoH: 0% to $64,750, 15% to $566,700, 20% above. MFS uses single thresholds at 0% and 15% but 20% kicks in lower.
How does LTCG bracket stacking work?+
Your ordinary income fills the LTCG brackets from the bottom up. With $50k ordinary income and $30k LTCG as a single filer, the $50k consumes the 0% bracket (which ends at $48,350); the $30k LTCG falls entirely in the 15% bracket = $4,500 tax. If your ordinary income were $20k instead, $28,350 of the LTCG would be in 0% and $1,650 in 15%.
What is NIIT?+
Net Investment Income Tax — an additional 3.8% surtax on investment income for high-AGI filers (IRC § 1411). Applies to single filers above $200k AGI / $250k MFJ. Tax base = lesser of (a) net investment income or (b) AGI over threshold. Effective LTCG rate becomes 18.8% for many high earners (15% federal + 3.8% NIIT), not just 15%.
How do capital losses work?+
Capital losses offset capital gains dollar-for-dollar. If losses exceed gains in a year, up to $3,000 of net loss can offset ordinary income (single or MFJ); the rest carries forward indefinitely under IRC § 1212(b). Strategic tax-loss harvesting at year-end is a major planning tool.
What's the wash-sale rule?+
If you sell at a loss and buy back the same security (or a "substantially identical" one) within 30 days before or after the sale, the loss is disallowed under IRC § 1091. The disallowed loss adds to the basis of the replacement security. Wash-sale traps tax-loss harvesters frequently. Note: under current IRS guidance, wash-sale rules do NOT apply to crypto (treated as property, not securities), though this is actively being legislated.
Is my data stored?+
No. All math runs in your browser. Your sale details and income never leave your device.
You might also like
Browse all 4 Taxes tools →Paycheck Calculator
Calculate your take-home pay after taxes instantly
ISO / NQSO Stock Option Tax Calculator
Compare NQSO, ISO qualifying, and ISO disqualifying dispositions side-by-side with AMT modeling
RSU Tax Calculator
See the RSU under-withholding gap — supplemental withholding vs your true marginal rate, plus FICA, Medicare, and state