No file uploadsNo tracking of inputsNo account requiredWorks offline after first load

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.

Tax year

Use 2026 for current-year planning; switch to 2025 for a sale you report on the return you file in early 2026.

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

long-term · effective 15.0%

Free to embed on your website · No signup required

Tax

$4,500

Net

$45,500

📐 Open methodology, sources & limitations

Formula

Gain or loss = sale proceeds − cost basis
Holding period = long-term if days held > 365, else short-term

Short-term: gain taxed as ordinary income.
  tax = bracket walk(other income + gain) − bracket walk(other income)

Long-term (IRC §1(h)): preferential 0% / 15% / 20% rates.
  LTCG stacks ON TOP of ordinary income for bracket placement,
  filling the 0/15/20% bands per the selected-year LTCG thresholds.

NIIT (IRC §1411) = max(0, min(gain, AGI − NIIT threshold)) × 3.8%
  applies only when AGI exceeds the threshold.

Total tax owed = capital gains tax + NIIT
Net proceeds   = sale proceeds − total tax owed
Long-term scenario savings = short-term tax − long-term tax (when short-term)

Assumptions

  • Long-term treatment requires more than 365 days held; 365 days or fewer is short-term.
  • LTCG breakpoints follow the selected tax year. 2025 (Rev. Proc. 2024-40): single 0% to $48,350 / 15% to $533,400 / 20% above; MFJ 0% to $96,700 / 15% to $600,050. 2026 (Rev. Proc. 2025-32): single 0% to $49,450 / 15% to $545,500; MFJ 0% to $98,900 / 15% to $613,700.
  • Long-term capital gain stacks above the ordinary income you enter for bracket placement.
  • Net Investment Income Tax of 3.8% applies on the lesser of the gain or AGI over $200,000 (single) / $250,000 (MFJ).
  • Cost basis is taken as entered; you should include commissions and fees in it yourself.

Sources

  • IRC §1(h) — Maximum capital gains rate (0/15/20%)§1(h)
  • IRC §1411 — Net Investment Income Tax (3.8%)§1411
  • IRC §1091 — Loss from wash sales of stock or securities§1091
  • IRS Rev. Proc. 2024-40 — 2025 inflation-adjusted LTCG thresholds§3.03
  • IRS Rev. Proc. 2025-32 — 2026 inflation-adjusted LTCG thresholds§3.03
  • IRS Topic No. 409 — Capital Gains and Losses

This tool does NOT model:

  • Collectibles 28% maximum rate (IRC §1(h)(4))
  • Section 1250 unrecaptured depreciation taxed at 25%
  • Qualified small business stock exclusion (IRC §1202)
  • Wash-sale loss disallowance (IRC §1091)
  • State and local capital gains taxes
  • Alternative Minimum Tax interaction

Last reviewed: 2026-06-12 · Tax year modeled: 2025 & 2026 (selectable)

This methodology section exists so you can verify the math. We show our formulas because you deserve to know how a number was calculated. This is calculation transparency, not financial advice.

What changed for 2026

The long-term capital gains rates are still 0%, 15%, and 20% for 2026 — only the income breakpoints between them moved, per the IRS inflation adjustments in Rev. Proc. 2025-32. The 0% band widens slightly, so a retiree or low-income year can absorb a bit more gain tax-free in 2026. The 3.8% Net Investment Income Tax thresholds ($200,000 single / $250,000 MFJ) are set by statute and never adjust for inflation, so each year more filers cross them. The more-than-one-year holding-period rule is unchanged. Pick the year you plan to sell in the calculator above.

Figure20252026
0% LTCG bracket top — single$48,350$49,450
0% LTCG bracket top — married filing jointly$96,700$98,900
15% LTCG bracket top — single$533,400$545,500
15% LTCG bracket top — married filing jointly$600,050$613,700
NIIT threshold — single / MFJ (statutory)$200,000 / $250,000$200,000 / $250,000

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%; to see where a gain lands inside your whole return, run the federal income tax calculator. 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%. Also note that a large gain with no withholding behind it can require quarterly estimated tax payments to avoid an underpayment penalty.

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 and 2026 LTCG brackets?+

For 2025 (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. For 2026 (Rev. Proc. 2025-32): Single: 0% to $49,450, 15% to $545,500; MFJ: 0% to $98,900, 15% to $613,700; HoH: 0% to $66,200, 15% to $579,600. Use the year toggle in the calculator to switch. 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.