Capital Gains Tax Calculator

Estimate your 2026 federal capital gains tax on stocks, crypto, real estate, or any investment — long-term or short-term — including the 3.8% Net Investment Income Tax and your state’s rate. See your total tax and net after-tax profit.

Updated Jul 18, 2026 Reviewed by the BSF CPA Editorial Team Source: IRS Rev. Proc. 2025-32 11 min read
Quick Answer

A single filer with $100,000 of other taxable income who sells a long-term asset at a $50,000 gain owes about $7,500 in federal capital gains tax (the 15% rate) — plus any state tax. Held one year or less, that same gain is short-term, taxed as ordinary income at a 24% marginal rate — roughly $11,900. Holding for one more day is often the single most valuable tax decision an investor makes.

2026 Capital Gains Tax Calculator

Your sale

Educational estimate using 2026 IRS figures. Federal + NIIT + a flat state estimate. Excludes losses/carryforwards, the qualified-dividend interaction, AMT, depreciation recapture, and state-specific rules. Not tax advice.

Your 2026 estimate

Long-term · Single
Total tax on this gain
$7,500
Effective rate
15.0%
Net after-tax gain
$42,500
Federal capital gains tax
$7,500
Net Investment Income Tax
$0
State tax (est.)
$0
Rate applied
15%
Rate bandGain taxed hereTax
What your result means

Because this is a long-term gain and stacks above your other income, it’s taxed at the preferential 15% federal rate rather than your ordinary bracket — a meaningful saving over a short-term sale.

What this calculator does

A capital gains tax calculator estimates what you’ll owe when you sell an investment for a profit. This one uses the 2026 federal figures from IRS Revenue Procedure 2025-32. It takes your gain, how long you held the asset, your filing status, your other taxable income, and your state rate, then returns four numbers that matter: your federal capital gains tax, any Net Investment Income Tax, your estimated state tax, and your net profit after tax.

Capital gains are different from wages in one crucial way: long-term gains get their own, lower set of rates. Understanding whether your sale is long-term or short-term — and how the gain stacks on top of your income — is the difference between paying 0%, 15%, 20%, or your full ordinary rate.

Who should use it

Investors selling stock or crypto, founders and employees with vesting RSUs or exercised options, real-estate investors modeling a sale, and anyone doing year-end tax planning who wants to see the after-tax result before they click “sell.”

Scope & limits

This models federal tax on a single realized gain plus NIIT and a flat state estimate. It does not net capital losses or carryforwards, handle depreciation recapture on real estate (taxed up to 25%), the qualified-dividend interaction, collectibles (28%), Section 1202 QSBS exclusions, or every state’s specific rules. For a complex sale, work with a CPA.

Long-term vs. short-term — the distinction that drives everything

If you held the asset more than one year, your gain is long-term and taxed at the preferential rates of 0%, 15%, or 20%. If you held it one year or less, it’s short-term and taxed as ordinary income — the same brackets as your salary, up to 37%.

The one-year clock starts the day after you acquire the asset and ends on the day you sell. Crossing that line can cut the federal rate on a $50,000 gain from 24% (ordinary) to 15% — a swing of thousands of dollars for a single day of patience.

Long-term rates aren’t a flat percentage on the whole gain, either. Your gain stacks on top of your other taxable income, and each slice that lands in the 0%, 15%, or 20% band is taxed at that band’s rate. Someone with modest income can have part of a gain taxed at 0% and the rest at 15%.

The formula

Long-term gain — stacked on your other taxable income: Federal tax = (gain in 15% band × 15%) + (gain in 20% band × 20%) Short-term gain — taxed as ordinary income: Federal tax = OrdinaryTax(other income + gain) − OrdinaryTax(other income) Then, for higher earners: NIIT = 3.8% × min(gain, MAGI − NIIT threshold)  |  State = gain × your state rate

The calculator fills each long-term band in order, exactly the way the IRS worksheet does, then adds NIIT and state tax to show your true total and your net after-tax gain.

2026 long-term capital gains rates

Long-term rates are set by your total taxable income including the gain. Official 2026 breakpoints from IRS Rev. Proc. 2025-32:

RateSingleMarried Filing JointlyHead of Household
0%$0 – $49,450$0 – $98,900$0 – $66,200
15%$49,451 – $545,500$98,901 – $613,700$66,201 – $579,600
20%$545,501+$613,701+$579,601+

Married filing separately: 15% starts at $49,450 and 20% at $306,850. Short-term gains use the ordinary 2026 brackets (10%–37%) instead of the table above.

The 3.8% Net Investment Income Tax

On top of the rates above, high earners pay an extra 3.8% surtax on investment income. It applies once your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), and it’s charged on the lesser of your net investment income or the amount you’re over the threshold. These thresholds are set by statute and are not adjusted for inflation, so more taxpayers cross them each year.

Worked examples

📈

Example 1 — Long-term stock sale, California ($50,000 gain)

Single, $100,000 other taxable income, 9.3% state rate.

The gain stacks from $100,000 to $150,000 — entirely inside the 15% long-term band — so federal tax is $50,000 × 15% = $7,500. MAGI is under $200,000, so no NIIT. California taxes gains as ordinary income at roughly 9.3%, adding about $4,650. Total tax ≈ $12,150, leaving a net gain near $37,850. The same sale in Texas or Florida would keep the full $42,500.

⏱️

Example 2 — Short-term crypto flip, Texas ($50,000 gain)

Single, $100,000 other taxable income, no state income tax.

Held under a year, this is ordinary income. Adding $50,000 to $100,000 pushes through the 22% and 24% brackets, producing about $11,900 in federal tax — roughly $4,400 more than if the same position had been held one more day to qualify for long-term treatment. That gap is the pure cost of impatience.

🏡

Example 3 — Low-income year, long-term sale ($30,000 gain)

Single, $30,000 other taxable income, no state tax.

Stacking from $30,000, the first $19,450 of the gain fills the 0% band (up to $49,450) and is taxed at nothing; the remaining $10,550 is taxed at 15% = $1,583. Total federal tax is just $1,583 — an effective rate of 5.3%. This is why selling appreciated assets in a low-income year (a sabbatical, early retirement, a gap year) is one of the most powerful moves in tax planning.

How to interpret your results

Effective rate vs. the headline rate

Your effective rate is total tax divided by the gain. For a pure long-term sale it will land at or below your top band; when part of the gain sits in the 0% or 15% band, it can be far lower. If NIIT or a high state rate applies, it climbs. The effective rate is the honest number to compare a “sell now” decision against.

The highest-leverage move

Timing. Pushing a sale from short-term to long-term, or into a lower-income year, routinely saves more than any other lever. On a $50,000 gain, the long-term vs. short-term choice alone is often worth $4,000–$6,000 — for doing nothing but waiting.

Watch the NIIT and bracket cliffs

A large gain can push your MAGI past the $200k/$250k NIIT threshold, adding 3.8% to the investment income above it, and can spill into the 20% long-term band. Spreading a big sale across two tax years, or pairing it with tax-loss harvesting, can keep you under those lines.

Investor & business uses

Founders, RSUs & stock options

Equity compensation is where the long-term/short-term line bites hardest. RSUs are taxed as ordinary income when they vest; any further gain after vesting is capital gain, long-term only if you hold the shares more than a year. For ISOs, holding long enough for a qualifying disposition converts the entire spread to long-term rates — but watch the AMT interaction.

Real estate investors

A rental sale mixes long-term capital gain with depreciation recapture taxed up to 25% — this tool covers the gain portion; model recapture separately. A 1031 exchange can defer the tax entirely, and the primary-residence exclusion shields up to $250,000 (single) / $500,000 (married) of gain.

Crypto traders

Every disposal — selling, swapping one token for another, or spending crypto — is a taxable event. Frequent trading generates short-term gains at ordinary rates. This calculator lets you see the after-tax reality of a flip before you make it.

Common mistakes

  • Miscounting the one-year holding period. It must be more than one year — a sale on the exact anniversary is still short-term. The clock starts the day after purchase.
  • Assuming long-term rates are flat. A gain can straddle the 0%, 15%, and 20% bands depending on your income. Only the slice in each band is taxed at that rate.
  • Forgetting the 3.8% NIIT. High earners owe it on top of the capital gains rate — it’s easy to overlook and turns a 20% rate into 23.8%.
  • Ignoring state tax. Most states tax gains as ordinary income; California and New York add close to 10%+. A few (TX, FL, WA, NV, TN) add nothing.
  • Not harvesting losses. Capital losses offset capital gains dollar-for-dollar, and up to $3,000 of net loss offsets ordinary income each year, with the rest carried forward.
  • Using the wrong cost basis. Reinvested dividends and wash-sale adjustments change your basis. Getting basis wrong overstates or understates the gain.

Best practices

A CPA’s checklist

Hold winners past the one-year mark whenever practical · Harvest losses before year-end to offset gains · Sell in low-income years to capture the 0%/15% bands · Spread very large gains across two tax years to dodge the NIIT and the 20% band · Track cost basis meticulously, including reinvested dividends · Consider donating appreciated long-term assets to charity — you skip the gain entirely and deduct fair market value · Use tax-advantaged accounts (IRA, 401(k), HSA) where gains grow untaxed.

Frequently asked questions

What are the 2026 long-term capital gains tax rates?
0%, 15%, or 20%, based on your total taxable income including the gain. For 2026 (IRS Rev. Proc. 2025-32) the 0% rate applies up to $49,450 (single) or $98,900 (married filing jointly); 15% applies up to $545,500 (single) or $613,700 (MFJ); and 20% applies above those levels. High earners also pay the 3.8% NIIT.
What’s the difference between long-term and short-term capital gains?
Long-term gains come from assets held more than one year and get preferential 0%/15%/20% rates. Short-term gains come from assets held one year or less and are taxed as ordinary income at your regular bracket, up to 37%. The distinction usually changes the tax bill more than anything else.
What is the 3.8% Net Investment Income Tax?
An extra 3.8% surtax on investment income — including capital gains — for taxpayers whose modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). It’s charged on the lesser of your net investment income or the amount you’re over the threshold. These thresholds aren’t inflation-adjusted.
How can I pay 0% on capital gains?
If your total taxable income including the gain stays under $49,450 (single) or $98,900 (married filing jointly) in 2026, your long-term gains in that band are taxed at 0%. This is achievable in low-income years — a career break, early retirement, or a year with business losses — making timing extremely powerful.
Do I owe state tax on capital gains?
Usually yes. Most states tax capital gains as ordinary income; high-tax states like California (up to ~13.3%) and New York add significantly. A handful — Texas, Florida, Washington (on wages), Nevada, Tennessee — have no state income tax. Enter your rate above to include it.
Can capital losses reduce my tax?
Yes. Losses offset gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 against ordinary income per year ($1,500 if married filing separately) and carry the remainder forward indefinitely. Harvesting losses late in the year is a common, legitimate strategy.
How are gains on my home taxed?
If it’s your primary residence and you’ve lived there two of the last five years, you can exclude up to $250,000 of gain ($500,000 married filing jointly). Gain above the exclusion is taxed at long-term rates. Investment property doesn’t qualify and also faces depreciation recapture.
How is cryptocurrency taxed?
The IRS treats crypto as property, so each sale, swap, or purchase with crypto is a taxable disposal. Held over a year, gains are long-term; a year or less, short-term (ordinary income). This calculator handles both — just pick the holding period.
Does this include depreciation recapture on real estate?
No. Recapture on prior depreciation is taxed separately at up to 25% and needs its own calculation. This tool estimates the capital-gain portion of a sale. For a rental property sale, consult a CPA to combine both.
What is the cost basis and why does it matter?
Cost basis is what you paid, adjusted for things like reinvested dividends, commissions, and improvements (for property). Your gain is sale price minus basis, so an accurate basis is essential — overstating it understates your gain and risks an IRS adjustment.
Should I hold just to get the long-term rate?
Often, but not blindly. The tax saving from long-term treatment is real, but don’t let a tax tail wag the investment dog — if a position has become risky, the tax saving may not justify holding. Use this calculator to weigh the actual dollar difference.
Is this a substitute for tax advice?
No. It’s an educational estimate using simplified 2026 assumptions. For an equity event, a property sale, or any large or complex transaction, consult a licensed CPA or tax advisor.

Keep exploring

Explore the Business Skill Forge ecosystem