Capital Gains Tax Calculator - 2026 Investment Tax Estimate

Estimate short-term and long-term federal capital gains tax with correct 2026 income stacking, adjusted basis and possible 3.8% NIIT.

Updated 2026
Formula verified
No login needed
Mobile friendly
Instant results
Key Summary

Selling $45,000 with $25,000 purchase price and $500 selling costs plus $0 improvements gives a $19,500 long-term gain. With $75,000 of taxable ordinary income as single, the $19,500 stacks above $75,000, so $30,700 of the 0% band is unused and the entire $19,500 falls in the 15% band for $2,925 federal tax and an effective 15% on the gain. The same $19,500 as short-term at 22% marginal is $4,290 federal, $1,365 more. According to IRS Revenue Procedure 2025-32, the 0% ceiling in 2026 is $49,450 single and $98,900 joint, so stacking matters. Enter your sale and income below.

Capital Gains Tax Calculator

Enter your details for an instant result

Your details

$
$
$
$
$

After deductions, before this gain

Your entries are used only to calculate this result. No account is required. · Share this calculator

How to Use the Capital Gains Tax Calculator

1

Enter Purchase Price and Improvements

Enter the $25,000 purchase plus any $0 improvements that increase basis. Basis is the amount already invested that is not taxed again.

2

Enter Sale Price and Selling Costs

Enter the $45,000 proceeds and $500 in commissions that reduce the gain. Gain is $45,000−$500−$25,000=$19,500 before income stacking.

3

Choose Holding Period

Select more than 1 year for 0%/15%/20% long-term bands or 1 year or less for ordinary rates. Long-term saves $1,365 on the $19,500 example at 22% marginal.

4

Enter Taxable Ordinary Income Before Gain

Enter $75,000 of taxable income after the $16,100 single standard deduction. The $19,500 long-term gain sits on top of that $75,000, determining how much of the 0% and 15% bands remain.

5

Review Federal Tax and NIIT

Check long-term tax $2,925 at 15% versus short-term $4,290 at 22%, plus any 3.8% NIIT if MAGI exceeds $200,000 single or $250,000 joint.

The formula
Adjusted basis = Purchase price + Improvements | Amount realized = Sale price − Selling costs | Capital gain = Amount realized − Adjusted basis | Tax = gain taxed progressively after stacking above ordinary taxable income, plus 3.8% NIIT on lesser of NII or excess MAGI
Adjusted basis
Purchase cost plus eligible additions like commissions and capital improvements, with depreciation and return-of-capital adjustments.
Amount realized
Sale proceeds minus selling costs such as commissions and transfer fees.
Short-term
Held 1 year or less: taxed at ordinary federal rates 10% to 37% in 2026.
Long-term
Held more than 1 year: taxed at preferential 0%, 15% or 20% bands plus possible 28% collectibles / 25% unrecaptured §1250.
NIIT
3.8% on the lesser of net investment income or MAGI above $200,000 single / $250,000 joint, $125,000 separate.

Federal Tax on $19,500 Gain by Ordinary Income and Holding Period, Single 2026

Ordinary taxable before gainLong-term tax on $19,500Short-term tax on $19,500*Saving long vs short
$30,000 (12% marginal)$0 (0% band unused $19,450)$3,350 (12%)$3,350
$50,000 (12% marginal)$2,925 (15% band)$4,290 (22%)$1,365
$75,000 (22% marginal)$2,925 (15%)$4,290 (22%)$1,365
$110,000 (22% marginal)$3,900 (20% on part)$4,680 (24%)$780
$200,000 (32% marginal)$5,460 (28% collectibles/20%+NIIT)$6,240 (32%)$780
$30,000 joint (12%)$0 (0% band $68,900 unused)$3,350$3,350
$550,000 (35% bracket)$6,825 (35% on gain)$6,825$0
*Short-term taxed at ordinary marginal on that income slice (12% to 32% examples). Long-term uses 0%/15%/20% stacking; 0% through $49,450 single / $98,900 joint and 15% through $545,500 single / $613,700 joint per IRS Rev. Proc. 2025-32. Federal only — state income tax not included. NIIT 3.8% not included in table unless MAGI exceeds threshold. Source: Internal Revenue Service, Revenue Procedure 2025-32 — irs.gov/pub/irs-drop/rp-25-32.pdf
Reference Provenance: Internal Revenue Service (2026)Official parameters verified for 2026

How Is My Capital Gain Actually Calculated?

Gain is amount realized minus adjusted basis. For a stock or fund, basis starts at purchase price plus commissions, with reinvested dividends increasing basis and return of capital decreasing it. Selling costs reduce amount realized. In the example $45,000 sale minus $500 commission is $44,500 realized, minus $25,000 purchase plus $0 improvements is $19,500 gain before any income stacking. Missing a $2,000 reinvested dividend overstates the gain by $2,000 and overstates long-term tax by $300 at 15%.

The holding period decides the rate set: more than one year is generally long-term at 0%/15%/20% and one year or less is short-term at 10% to 37% ordinary. Verify brokerage cost-basis records before trusting the calculator, and keep the $75,000 ordinary taxable income figure after the $16,100 single standard deduction distinct from $75,000 gross.

Long-Term vs Short-Term: How Much Do I Really Save by Holding More Than a Year?

Long-term bands are preferential, but the saving depends on ordinary income stacking. With $30,000 ordinary taxable single, the 0% band to $49,450 leaves $19,450 unused, so $19,500 gain uses $19,450 at 0% and $50 at 15% for $8 total, while short-term at 12% marginal is $2,340, saving $2,332. With $75,000 ordinary taxable single, the 0% band is already filled, so the entire $19,500 is 15% for $2,925, while short-term at 22% is $4,290, saving only $1,365, about half.

Ordinary taxable before gainLong-term on $19,500Short-term on $19,500
$30,000 (12% marg.)$8$2,340
$75,000 (22% marg.)$2,925$4,290

The longer you hold past one year, the more ordinary income can also rise into higher brackets, so the classic “hold one year” rule helps most when ordinary income is modest. Use the Income Tax Calculator to find your marginal before adding the gain.

When Does the 3.8% Net Investment Income Tax Hit My Gain?

NIIT is 3.8% of the lesser of net investment income (which includes the gain) or modified adjusted gross income above $200,000 single or head of household, $250,000 joint and $125,000 separate. With $75,000 ordinary taxable plus $19,500 gain, MAGI is far below the thresholds, so NIIT is $0. With $190,000 ordinary taxable single plus $19,500 gain, MAGI is $209,500, $9,500 above $200,000, and net investment income is $19,500, so NIIT is 3.8% on $9,500 = $361, added to the $2,925 long-term tax for $3,286 total.

NIIT stacks after the gain is already taxed at 15% or 20%, so it can turn a 15% gain into 18.8% and a 20% gain into 23.8%. The thresholds are not indexed, so they bite more each year as nominal incomes rise. Check net investment income carefully for home-sale exclusions and business participation (Source: IRS, irs.gov/taxtopics/tc310).

Should I Harvest Losses or Sell in Two Tax Years?

Losses first net against gains by type, then up to $3,000 per year offsets ordinary income with the rest carried forward. Realizing a $5,000 loss in the same year as the $19,500 gain nets to $14,500 gain, cutting long-term tax from $2,925 to $2,175, a $750 saving at 15%. Spreading a large $100,000 gain into two $50,000 sales can help only if the 0% band is unused: at $30,000 ordinary single, two $19,500 sales use $19,450 of 0% each year for $8+$8=$16 total versus $8 on one $19,500, no benefit; at $30,000, one $39,000 gain straddles 0% and 15% for $2,933 total, while two $19,500 sales total $16, so spreading saves $2,917.

Wash-sale rules defer losses if substantially identical securities are repurchased within 30 days before or after the sale, including in an IRA. Model the loss and the replacement purchase together and see the loss carryforward with the Income Tax Calculator and state impact via your state agency.

Capital Gains Tax Calculator - Frequently Asked Questions