Capital Gains Tax Calculator

Estimate the federal and state capital gains tax on a stock sale at 2026 rates. With a large position in one stock, compare selling it all today with selling at a pace you choose.

A close guess is fine.

Your details

Filing
Held

Assumed other income: $250K

Sell your stock today, or tax-efficiently using Forward

Enter what it’s worth and what you paid.

How to read your result

This capital gains tax calculator starts with the tax on selling every share today, at 2026 federal and state rates. Open “How it’s figured” under the chart to see that bill by layer, from federal tax and the 3.8% NIIT to state and city tax.

The chart starts at your stock's value, the gold dot. Sell today drops by that tax, then grows in an index. Forward sells an equal part each year over the years you pick, and uses direct indexing to seek tax efficiency, harvesting losses on an ongoing basis where appropriate. Under the chart, each way shows its balance, the tax it pays and when it fits best.

Selling today ends your exposure to one stock, at a tax cost you know now. Selling over time leaves every unsold share exposed to that stock. Harvesting also lowers the new portfolio's cost basis, so part of the tax is deferred until you sell the index. More on selling a large position over several tax years and harvesting losses in a direct index.

How to calculate capital gains tax on a stock sale

  1. Find the gain. Subtract your cost basis from the sale proceeds. Shares bought for $50,000 and sold for $150,000 give a $100,000 gain.
  2. Check the holding period. Held more than one year, the gain is long-term and taxed at 0%, 15% or 20%. Held one year or less, it is short-term and taxed at your ordinary income rates, 10% to 37%.
  3. Add the gain to your other income. The gain is taxed as the top layer of your taxable income, so a large one can run through several brackets in one year.
  4. Add the other layers. The 3.8% net investment income tax applies once modified adjusted gross income passes $200,000 for a single filer, or $250,000 for a married couple filing jointly. Then add state tax, and city tax where it applies.

The calculator runs each layer the way your return would:

tax on the sale = tax with the sale, minus tax without it (federal + NIIT + state + local)

Finding your cost basis, including RSUs and ESPP shares

For shares you bought, basis is what you paid, plus commissions. For restricted stock units, basis is the shares' value on the day they vested, which was already taxed as wages on your W-2. If your Form 1099-B shows a basis of $0, or one that leaves the vest value out, you would be taxed on that income twice. Report the correct basis on Form 8949 with adjustment code B. With employee stock purchase plan shares, part of the gain can count as wages; how much depends on how long you held them.

Short-term or long-term: the one-year line

For listed stock, the holding period starts the day after the trade date you bought and ends on the trade date you sell. Buy on March 3, 2025, and a sale on March 3, 2026 is short-term; a sale on March 4 is long-term. Each lot has its own clock, so every RSU vest starts a new one. Waiting past that date is one of the simplest ways to reduce capital gains tax on stocks.

2026 long-term capital gains tax rates and brackets

Which rate applies depends on your taxable income, gain included. In 2026 a single filer pays 0% on long-term gains up to $49,450 of taxable income, 15% up to $545,500 and 20% above that. The table gives the thresholds for every filing status.

2026 federal long-term capital gains rates by filing status (taxable income)
Filing status0% up to15% up to20% above
Single$49,450$545,500$545,500
Married filing jointly$98,900$613,700$613,700
Married filing separately$49,450$306,850$306,850
Head of household$66,200$579,600$579,600

Taxable income is after deductions. Your other income fills the brackets first, and the gain fills them from there. Source: IRS Rev. Proc. 2025-32, §4.03.

How the 0% rate works

A married couple filing jointly with $60,000 of taxable income in 2026 can realize $38,900 of long-term gain at 0%. Gain above that is taxed at 15%. A large sale rarely fits under the ceiling, but a low-income year, such as a year between jobs or after you retire, can leave room to sell some shares at 0%.

Short-term capital gains tax rates for 2026

A short-term gain gets no special rate. It is taxed like wages, at your ordinary brackets from 10% to 37%. Only the federal rate depends on the holding period; the NIIT and most states tax both kinds of gain the same way.

Short-term and long-term gains at a glance
Short-termLong-term
Holding periodOne year or lessMore than one year
Federal rateOrdinary brackets, 10% to 37%0%, 15% or 20%
Net investment income tax3.8% above the threshold3.8% above the threshold
Most statesOrdinary incomeOrdinary income; a few states exclude part (see the state table)

2026 ordinary income brackets

Ranges are taxable income, after deductions.

2026 federal ordinary income tax brackets by filing status (taxable income)
RateSingleMarried filing jointlyMarried filing separatelyHead of household
10%Up to $12,400Up to $24,800Up to $12,400Up to $17,700
12%$12,400 to $50,400$24,800 to $100,800$12,400 to $50,400$17,700 to $67,450
22%$50,400 to $105,700$100,800 to $211,400$50,400 to $105,700$67,450 to $105,700
24%$105,700 to $201,775$211,400 to $403,550$105,700 to $201,775$105,700 to $201,750
32%$201,775 to $256,225$403,550 to $512,450$201,775 to $256,225$201,750 to $256,200
35%$256,225 to $640,600$512,450 to $768,700$256,225 to $384,350$256,200 to $640,600
37%Over $640,600Over $768,700Over $384,350Over $640,600

Source: IRS Rev. Proc. 2025-32, §4.01.

The 3.8% net investment income tax

Once your modified adjusted gross income passes the threshold for your filing status, a 3.8% tax applies to investment income, capital gains included. It is charged on your net investment income or your modified AGI above the threshold, whichever is smaller.

Say a single filer has $180,000 of modified AGI and no investment income, then sells shares for a $50,000 gain. Modified AGI rises to $230,000, which is $30,000 over the line, so the tax is 3.8% of $30,000, or $1,140. The thresholds are fixed in the statute and have not changed since the tax began in 2013.

Net investment income tax thresholds (modified AGI)
Filing statusModified AGI over
Single$200,000
Married filing jointly$250,000
Married filing separately$125,000
Head of household$200,000

Source: 26 U.S.C. §1411; IRS Topic 559.

State capital gains tax rates: all 50 states and DC

Most states tax capital gains as ordinary income, at the same rates as wages. Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas and Wyoming have no income tax, so they do not tax the gain. Washington taxes no wages but taxes long-term gains at 7%, plus 2.9% on taxable gains above $1,000,000. Missouri has exempted individuals' capital gains since 2025.

Some states give long-term gains a break. South Carolina deducts 44% of the gain, Wisconsin deducts 30%, and Hawaii caps the rate at 7.25%. The table has each state's top rate and rule, with a link to its source.

Top 2026 state income tax rate on capital gains, all 50 states and DC
StateTop rate, long-term gainsTop rate, short-term gainsNotes
Alabama5%5%Alabama lets you deduct federal income tax paid, which lowers the state tax on a large gain. That deduction is not modelled, so the Alabama figure is on the high side. taxfoundation.org
AlaskaNoneNoneNo state income tax. taxfoundation.org
Arizona1.875%2.5%Arizona subtracts 25% of a long-term gain on assets acquired after 2011. This assumes your shares were acquired after 2011. taxfoundation.org
Arkansas1.85%3.7%Arkansas taxes half of a net long-term gain and exempts net gain above $10 million. The upper-income rate table is used. arkleg.state.ar.us
California13.3%13.3%California taxes all capital gains as ordinary income, plus 1% on taxable income over $1 million (Mental Health Services Tax). ftb.ca.gov
Colorado4.4%4.4%Gains taxed as ordinary income at a flat rate. taxfoundation.org
Connecticut6.99%6.99%Gains taxed as ordinary income at graduated rates. portal.ct.gov
Delaware6.6%6.6%Gains taxed as ordinary income at graduated rates. taxfoundation.org
District of Columbia10.75%10.75%Gains taxed as ordinary income at graduated rates. taxfoundation.org
FloridaNoneNoneNo state income tax. taxfoundation.org

Rates are the top marginal rate on a gain, after any long-term exclusion and including state surtaxes on high incomes. Local taxes other than New York City's are named in the notes but not included. Rules as of October 13, 2026. Rows marked with an asterisk use a 2025 figure or a secondary source.

If you are moving states

Moving before you sell changes the state tax only if the move is real, and New York audits residency claims closely. Plan around a move only once it is settled.

Worked examples (illustrations, not projections)

Round numbers at 2026 rates, with a share price that does not move. Your own tax depends on your whole return.

Example 1: a $100,000 long-term gain, single filer

Inputs: sale $150,000, basis $50,000, long-term, single, $150,000 taxable income, Texas.

Tax on a $100,000 long-term gain, single filer in Texas
TaxLong-term
Federal$15,000
Net investment income tax$2,512
Texas$0
Total$17,512
Effective rate on the gain17.5%

The whole gain stays in the 15% bracket. But the sale lifts income past the $200,000 NIIT threshold, so $66,100 of the gain also pays 3.8%.

Example 2: a $300,000 gain, sold short-term or long-term

Inputs: sale $400,000, basis $100,000, married filing jointly, $250,000 taxable income, New York City residents. Same shares sold at 11 months and at 13 months.

Tax on a $300,000 gain, short-term and long-term, New York City
TaxSold at 11 months (short-term)Sold at 13 months (long-term)
Federal$84,843$45,000
Net investment income tax$11,400$11,400
New York State$22,926$22,926
New York City$11,628$11,628
Total$130,796$90,954
Effective rate on the gain43.6%30.3%

The whole $39,843 difference is federal. New York State, New York City and the NIIT charge the same tax on both sales.

Example 3: a $1,000,000 sale in one tax year or two

Inputs: sale $1,000,000, basis $200,000, long-term, married filing jointly, $400,000 taxable income, New Jersey. All in December, or half in December and half in January.

Tax on a $1,000,000 sale in one tax year or two, New Jersey
TaxOne tax yearTwo tax years (two equal halves)
Federal$149,315$138,630
Net investment income tax$30,400$30,400
New Jersey$72,720$66,560
Total$252,435$235,590
Effective rate on the gain31.6%29.4%

Across two tax years, more of the gain falls in the 15% federal bracket and less reaches New Jersey's 10.75% bracket, so the total is $16,845 lower. The NIIT does not change. Meanwhile the unsold half stays exposed to the stock for those weeks, and the example assumes its price holds still.

How this capital gains tax calculator works

Inputs. What your shares are worth, what you paid for them (your cost basis), your state and New York City residency, filing status, whether you held them more than a year, and your other taxable income this year before the sale (after deductions, as on Form 1040 line 15; $250,000 unless you change it). The ticker is optional. It labels the chart and plays no part in the math.

Method. Every figure is incremental, the tax on your return with the sale minus the tax without it. The NIIT estimate treats this gain as your only investment income and estimates modified adjusted gross income as taxable income plus the standard deduction. State taxable income is estimated as federal taxable income plus the gain.

With Forward. The calculator assumes equal yearly sales over the years you choose, each with an equal part of the cost basis. 2026 rates and your other income are held the same every year, and shares sold after the first year count as long-term. Each year's sale proceeds go into a direct index, and that year's tax is paid from it at year end. The harvested-loss pattern applies to what the index holds: the full proceeds in the year of sale, what remains after tax in later years. Harvested losses offset that year's gain, then up to $3,000 of ordinary income; the rest carries forward. They also lower the index's cost basis by the same amount, so that tax is deferred until the index is sold. The loss pattern is one figure per year, from the direct indexing simulations in AQR's 2023 study (Liberman, Krasner, Sosner & Freitas, “Beyond Direct Indexing: Dynamic Direct Long-Short Investing,” Journal of Beta Investment Strategies 14(3), Fall 2023, Exhibit 1): average cumulative net capital losses across historical start dates, Russell 1000, 1986–2012. It is not a forecast. Your losses could be larger, smaller or zero. The study's losses come from real market paths with real declines; the chart's steady 10% has none, so losses in a calm market could be smaller. The study's portfolios had a tracking error of 1% a year.

The chart. The chart and the figures under it assume your stock and the index both return 10.0% a year, the S&P 500® compound total return 1928–2025 (Damodaran, NYU Stern). One stock can do far better or worse. Selling today pays the tax now and invests what is left in an index at once; Forward invests each year's proceeds as it sells. Balances are before advisory and investment fees, which reduce returns, and before the tax due on the index's unrealized gain if it is later sold. Real returns vary from year to year and can be negative, and while you still hold your stock, its price can fall. Not a forecast.

At today's price. “How it's figured” also lists each figure with the share price held flat, so no market return is assumed.

What it leaves out. Other gains, losses or carryforwards you already have, the alternative minimum tax, the SALT deduction, deduction and credit phase-outs, wash sales, credits for tax paid to another state, local taxes other than New York City's, and fees. The net investment income tax estimate treats this gain as your only investment income.

Your data. The calculation runs in your browser. What you type is not sent to Forward unless you choose to share it, for example when you ask to talk to an advisor. To fill in your state, the page asks our server for an estimate from your IP address; you can change it, and the estimate is not stored. A copied link keeps your numbers after the # in the link itself, which browsers do not send to servers, and our analytics don't record the amounts, stock or state you enter.

Engine 1.2.0 · Assumptions 2026.1 · 2026 tax year · Updated October 13, 2026

Sources

Ways to lower the tax on a stock sale

Holding past a year, spreading the sale, harvesting losses and giving shares can reduce the tax. Exchange funds and some hedges defer it, and a hedge can itself count as a sale. A few, such as donating shares, avoid tax on the shares given.

Frequently asked questions

How much tax will I pay when I sell stock?

On shares held more than a year, federal tax on the gain is 0%, 15% or 20%, depending on your taxable income. On shares held a year or less, the gain is taxed at your ordinary rate, 10% to 37%. Once modified adjusted gross income passes $200,000 ($250,000 for a married couple filing jointly), the 3.8% net investment income tax is added. Most states then tax the gain as ordinary income.

How much capital gains tax would I pay on $100,000 or $300,000 of gain?

Under this page’s assumptions at 2026 rates, a single Texas filer with $150,000 of other taxable income would owe about $17,500 on a $100,000 long-term gain. A New York City couple with $250,000 of other taxable income would owe about $91,000 on a $300,000 long-term gain, and more if it were short-term. Your own figure depends on income, filing status, state and holding period.

When do you pay capital gains tax on stocks?

On your return for the year you sell, due the following April. The gain belongs to the tax year of the trade date, so a sale on December 31 counts for that year. A large gain may mean you owe estimated tax during the year. You generally owe no underpayment penalty if you paid at least 100% of last year’s tax in time, or 110% if last year’s adjusted gross income was over $150,000.

Do I pay tax on stock I have not sold?

No. A rise in a stock’s price is not taxed until you sell the shares or otherwise dispose of them. Dividends are taxed in the year you receive them, even if you reinvest them.

If I sell stock and reinvest the money, do I still owe tax?

Yes. The sale realizes the gain, and the tax is owed for that year whatever you do with the money. Buying other stocks, funds or a home does not defer it. One exception is a qualified opportunity fund, which can defer the gain. A Section 1031 like-kind exchange applies only to real property held for business or investment, and has not covered stock since 2018.

Can stock losses offset my gains?

Yes. Capital losses offset capital gains in full. Beyond that, up to $3,000 a year ($1,500 if married filing separately) offsets ordinary income, and the rest carries forward. The wash-sale rule disallows a loss if you, your spouse or your IRA buys substantially identical stock within 30 days before or after the sale.

What is the cost basis of stock I inherited or was given?

Inherited stock generally takes a basis equal to its value on the date of death, so the gain built up before then is not taxed to you, and a sale counts as long-term. Stock you were given usually keeps the giver’s basis and holding period, so their gain becomes yours.

Are stocks sold inside an IRA or 401(k) taxed as capital gains?

No. Sales inside an IRA, 401(k) or other qualified retirement plan are not taxed when they happen. Withdrawals from a traditional account are generally taxed as ordinary income; qualified Roth withdrawals are not taxed. This calculator is for shares in a regular taxable account.

Do I owe state tax if I sell after moving to another state?

Generally, the state where you live on the day of the sale taxes the gain. New York does not tax a nonresident’s gain on publicly traded stock unless the shares are used in a New York business. But it can still treat you as a resident if New York remains your domicile, or if you keep a permanent home in New York for substantially all of the year and spend more than 183 days there.

How does a capital gains tax calculator work?

It figures your tax twice, once with the sale and once without, and the difference is the tax on the sale. That puts the gain in the brackets it actually reaches. This one does it at 2026 rates for federal tax, the 3.8% NIIT, your state and New York City. “How this capital gains tax calculator works” above lists its assumptions and what it leaves out.

What do I need to use a capital gains calculator for stocks?

Start with what the shares are worth (or what you sold them for) and what you paid for them, your cost basis. Then add your state, your filing status, whether you held the shares more than a year, and your other taxable income for the year. Your broker’s statement or Form 1099-B shows the sale amount and usually the basis.

Talk to an advisorRun another scenario

Disclosures

  1. The calculator and worked examples are hypothetical illustrations for education only. The calculator's chart and balances assume a 10.0% annual return for your stock and the index, which is not a forecast; the same figures at a flat share price are under “How it's figured”. None of it is tax advice or a recommendation, and none of it reflects any client account. No tax outcome is guaranteed.
  2. Tax-loss harvesting may reduce or defer tax; it does not remove it. Harvested losses lower the new portfolio's cost basis, so tax on that gain is owed when the portfolio is sold. Wash-sale rules and other limits apply.
  3. The harvested-loss pattern follows the direct indexing simulations in AQR’s 2023 study (Liberman, Krasner, Sosner & Freitas, Journal of Beta Investment Strategies, Fall 2023, Exhibit 1): average cumulative net capital losses across historical start dates, Russell 1000, 1986–2012. It is an assumption drawn from that study and not a result Forward has achieved. Results will vary. Russell 1000® is a trademark of Frank Russell Company; Forward is not affiliated with FTSE Russell.
  4. Balances are before advisory and investment fees, which reduce returns and may exceed any harvesting benefit, and before the tax due on unrealized gains if the index is later sold. S&P 500® is a product of S&P Dow Jones Indices LLC; Forward is not affiliated with S&P.
  5. CFP Board owns the certification marks CFP®, CERTIFIED FINANCIAL PLANNER®, and CFP® (with plaque design) in the U.S.
  6. Figures use 2026 federal rules (IRS Rev. Proc. 2025-32) and each state's 2026 rules as of October 13, 2026. Tax laws may change. Consult your own tax adviser about your situation.