TickerCalc

Capital Gains Tax Calculator

Estimate the tax on a stock sale — short-term vs long-term, federal plus state — and see your after-tax profit, net proceeds and effective rate.

Advertisement
%
Short-term gains are taxed as ordinary income — use your top bracket.
%
Estimated total tax
Capital gain
After-tax profit
Effective tax rate
Net proceeds
You keep Tax
Estimate for U.S. stocks. Ignores the 3.8% net investment income tax, deductions, losses carried over and other rules.
Advertisement

How to use it

  1. Enter your buy price, sell price and number of shares.
  2. Choose long-term (held over a year) or short-term (a year or less).
  3. For long-term, pick the federal rate (0/15/20%); for short-term, enter your marginal income rate.
  4. Add an optional state rate and read your estimated tax and after-tax profit.

How the tax is estimated

Your capital gain is the sale value minus what you paid. Long-term gains (assets held over a year) get preferential U.S. federal rates of 0%, 15% or 20%; short-term gains are taxed at your ordinary income rate.

A capital loss (selling below cost) means no gain to tax, and may offset other gains — see a tax professional.

What capital gains tax is

When you sell a stock for more than you paid, the profit is a capital gain, and governments tax it. How much depends mainly on one thing: how long you held the shares. This calculator gives a quick, simplified estimate of U.S. federal tax (plus optional state tax) so you can see your real, after-tax profit before you sell.

Short-term vs long-term

The single biggest lever is the holding period. Sell within one year and the gain is short-term, taxed at your ordinary income rate — the same as your salary, which can be 22%, 32%, 37% or more. Hold for more than a year and it becomes long-term, taxed at a preferential federal rate of just 0%, 15% or 20%. Crossing that one-year line can cut your tax bill dramatically, which is why patient investors pay close attention to it.

Which long-term rate applies

The long-term rate you pay depends on your taxable income for the year. Lower incomes can qualify for 0%, most middle-income investors pay 15%, and high earners pay 20%. Because the brackets shift each year, treat the 0/15/20 choice as an estimate and confirm the current thresholds with the IRS or your accountant.

State tax and other rules

Many U.S. states tax capital gains as ordinary income; a few have no income tax at all. Add your state rate in the optional field for a fuller picture. Note that this tool deliberately ignores the 3.8% net investment income tax on high earners, the wash-sale rule, loss carryovers and deductions — real returns can be more complex.

A quick example

You buy 100 shares at 100 (10,000) and sell at 160 (16,000), a 6,000 gain. If long-term at 15%, federal tax is 900, leaving 5,100 of after-tax profit. If short-term at a 32% bracket, the tax jumps to 1,920 — over double — for the exact same trade. That gap is the cost of selling too soon.

Final word

Taxes should inform, not dictate, your decisions — never hold a bad investment purely to dodge tax. But understanding the short- vs long-term difference, harvesting losses thoughtfully, and using tax-advantaged accounts are among the highest-value habits an investor can build. When real money is at stake, confirm the numbers with a qualified professional.

2026 federal long-term capital gains brackets

Long-term rates (assets held more than one year) for tax year 2026, per the IRS inflation adjustments:

RateSingle (taxable income)Married filing jointly
0%up to $49,450up to $98,900
15%$49,451 – $545,500$98,901 – $613,700
20%over $545,500over $613,700

Short-term gains (held one year or less) get no special rate at all — they're stacked on top of your wages and taxed at ordinary income rates of 10–37%.

The one-year line is worth real money

Sell a $20,000 gain after 11 months in the 24% bracket and you owe about $4,800. Wait past the one-year mark and the same gain at 15% costs $3,000 — $1,800 saved by holding a few more weeks. The clock starts the day after you buy and the holding period is measured to the day you sell; when a position approaches a year with a large unrealized gain, checking the calendar before selling is one of the highest-hourly-rate tasks in investing.

What else can change the bill

Net Investment Income Tax: an extra 3.8% applies when modified AGI exceeds $200,000 (single) / $250,000 (married filing jointly) — these thresholds are not inflation-indexed. State taxes: most states tax capital gains as ordinary income (California up to 13.3%), nine states have no income tax at all, and Washington uniquely levies a 7% excise on large gains. The 0% bracket is real: retirees and low-income years can realize long-term gains entirely tax-free up to the threshold — a strategy known as gain harvesting.

Legal ways to shrink capital gains tax

Hold past one year — the single biggest lever. Tax-loss harvesting: realized losses offset gains dollar-for-dollar, plus up to $3,000 of ordinary income per year, with the rest carried forward (mind the 30-day wash sale rule). Choose lots when selling: instructing your broker to sell the highest-cost shares first can cut the realized gain — pair with our average cost calculator to see your lots. Use sheltered accounts: gains inside IRAs and 401(k)s aren't taxed as they occur. Step-up at death and charitable donation of appreciated shares avoid the gain entirely.

What this calculator does and doesn't do

It estimates federal tax on a single stock sale using the 2026 brackets, comparing the short-term vs long-term outcome. It doesn't model state tax, NIIT, the stacking of gains across brackets with your other income, or special assets (collectibles at 28%, Section 1202 stock, crypto with different holding facts). For a full return, use tax software or a professional — for the buy/sell decision in front of you, this is the fast answer.

Sources: IRS Topic 409 — Capital Gains and Losses · Kiplinger — 2026 capital gains brackets. Updated for tax year 2026 (July 9, 2026).

Related calculators

Frequently asked questions

Is this calculator free?

Yes — completely free, runs in your browser, no account.

What is the difference between short- and long-term?

In the U.S., assets held one year or less are short-term and taxed as ordinary income; held more than a year, they are long-term and taxed at 0%, 15% or 20% federally.

Which long-term rate applies to me?

It depends on your taxable income: roughly 0% at low incomes, 15% in the middle, and 20% for high earners. Check current IRS brackets for the exact thresholds.

Does it include state tax or the 3.8% NIIT?

State tax is optional input; the 3.8% net investment income tax and other surtaxes are not modeled. This is a simplified estimate.

What if I sold at a loss?

There is no gain to tax. Capital losses can offset capital gains and, within limits, ordinary income — consult a tax professional.

⚠️ Educational estimate only — NOT tax advice. Tax depends on your full situation, income, residency and current law. Consult a qualified tax professional before acting.
Advertisement