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
- 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.
- 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%.
- 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.
- 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.
| Filing status | 0% up to | 15% up to | 20% 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 | Long-term | |
|---|---|---|
| Holding period | One year or less | More than one year |
| Federal rate | Ordinary brackets, 10% to 37% | 0%, 15% or 20% |
| Net investment income tax | 3.8% above the threshold | 3.8% above the threshold |
| Most states | Ordinary income | Ordinary income; a few states exclude part (see the state table) |
2026 ordinary income brackets
Ranges are taxable income, after deductions.
| Rate | Single | Married filing jointly | Married filing separately | Head of household |
|---|---|---|---|---|
| 10% | Up to $12,400 | Up to $24,800 | Up to $12,400 | Up 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,600 | Over $768,700 | Over $384,350 | Over $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.
| Filing status | Modified 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.
| State | Top rate, long-term gains | Top rate, short-term gains | Notes |
|---|---|---|---|
| Alabama | 5% | 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 |
| Alaska | None | None | No state income tax. taxfoundation.org |
| Arizona | 1.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 |
| Arkansas | 1.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 |
| California | 13.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 |
| Colorado | 4.4% | 4.4% | Gains taxed as ordinary income at a flat rate. taxfoundation.org |
| Connecticut | 6.99% | 6.99% | Gains taxed as ordinary income at graduated rates. portal.ct.gov |
| Delaware | 6.6% | 6.6% | Gains taxed as ordinary income at graduated rates. taxfoundation.org |
| District of Columbia | 10.75% | 10.75% | Gains taxed as ordinary income at graduated rates. taxfoundation.org |
| Florida | None | None | No state income tax. taxfoundation.org |
| Georgia | 4.99% | 4.99% | Gains taxed as ordinary income at a flat rate. gov.georgia.gov |
| Hawaii | 7.25% | 11% | Hawaii caps the rate on long-term gains at 7.25%; short-term gains are taxed at ordinary rates up to 11%. files.hawaii.gov |
| Idaho | 5.3% | 5.3% | 2025 figure or secondary source Gains taxed as ordinary income at a flat rate. tax.idaho.gov |
| Illinois | 4.95% | 4.95% | Gains taxed as ordinary income at a flat rate. taxfoundation.org |
| Indiana | 2.95% | 2.95% | Indiana counties add a local income tax of roughly 0.5% to 3% that applies to capital gains; it is not included. taxfoundation.org |
| Iowa | 3.8% | 3.8% | Iowa school-district surtaxes (a percentage of state tax) are not included. taxfoundation.org |
| Kansas | 5.58% | 5.58% | Gains taxed as ordinary income at graduated rates. taxfoundation.org |
| Kentucky | 3.5% | 3.5% | Gains taxed as ordinary income at a flat rate. taxfoundation.org |
| Louisiana | 3% | 3% | Gains taxed as ordinary income at a flat rate. taxfoundation.org |
| Maine | 9.15% | 9.15% | Gains taxed as ordinary income at graduated rates. maine.gov |
| Maryland | 8.5% | 6.5% | Maryland adds 2% on the whole net long-term gain once federal AGI passes $350,000. Maryland county income tax (2.25% to 3.3%) also applies to capital gains and is not included. marylandcomptroller.gov |
| Massachusetts | 9% | 12.5% | 2025 figure or secondary source Massachusetts taxes long-term gains at 5% and short-term gains at 8.5%, plus a 4% surtax on income over $1,107,750 (one threshold per return, joint or single). mass.gov |
| Michigan | 4.25% | 4.25% | City income taxes in Detroit and some other Michigan cities also apply to capital gains and are not included. taxfoundation.org |
| Minnesota | 10.85% | 10.85% | Minnesota adds 1% on net investment income over $1 million; only this sale’s gain is counted. revenue.state.mn.us |
| Mississippi | 4% | 4% | Gains taxed as ordinary income at a flat rate. dor.ms.gov |
| Missouri | None | None | Missouri exempts individuals’ capital gains from state income tax from 2025. dor.mo.gov |
| Montana | 4.1% | 5.65% | Montana taxes long-term gains at 3% or 4.1%, lower than its ordinary rates. revenue.mt.gov |
| Nebraska | 4.55% | 4.55% | Gains taxed as ordinary income at graduated rates. revenue.nebraska.gov |
| Nevada | None | None | No state income tax. taxfoundation.org |
| New Hampshire | None | None | No state income tax. taxfoundation.org |
| New Jersey | 10.75% | 10.75% | New Jersey taxes gains as ordinary income and does not let capital losses carry forward or offset other income. nj.gov |
| New Mexico | 5.9% | 5.9% | New Mexico deducts up to $2,500 of net long-term gain ($1,250 if married filing separately; the $2,500 figure is used). nmlegis.gov |
| New York | 10.9% | 10.9% | New York taxes gains as ordinary income. Above $107,650 of income it phases out the benefit of its lower brackets, so high earners pay close to their top rate on all income. nysenate.gov |
| North Carolina | 3.99% | 3.99% | Gains taxed as ordinary income at a flat rate. taxfoundation.org |
| North Dakota | 1.5% | 2.5% | North Dakota excludes 40% of a net long-term gain. tax.nd.gov |
| Ohio | 2.75% | 2.75% | Some Ohio school districts tax capital gains; those taxes are not included. codes.ohio.gov |
| Oklahoma | 4.5% | 4.5% | Oklahoma exempts gains on stock of companies headquartered in Oklahoma held two years or more; that deduction is not modelled. taxfoundation.org |
| Oregon | 9.9% | 9.9% | Portland-area taxes (Metro 1%, Multnomah County up to 3%) also apply to capital gains and are not included. oregon.gov |
| Pennsylvania | 3.07% | 3.07% | Pennsylvania does not let capital losses carry forward or offset other income. taxfoundation.org |
| Rhode Island | 5.99% | 5.99% | Gains taxed as ordinary income at graduated rates. tax.ri.gov |
| South Carolina | 2.918% | 5.21% | South Carolina deducts 44% of a net long-term gain. dor.sc.gov |
| South Dakota | None | None | No state income tax. taxfoundation.org |
| Tennessee | None | None | No state income tax. taxfoundation.org |
| Texas | None | None | No state income tax. taxfoundation.org |
| Utah | 4.45% | 4.45% | Gains taxed as ordinary income at a flat rate. taxnews.ey.com |
| Vermont | 8.75% | 8.75% | 2025 figure or secondary source Vermont excludes up to $5,000 of capital gain; its 40% exclusion does not cover publicly traded stock. 2025 brackets are used until 2026 figures are published. taxsim.nber.org |
| Virginia | 5.75% | 5.75% | Gains taxed as ordinary income at graduated rates. taxfoundation.org |
| Washington | 9.9% | None | 2025 figure or secondary source Washington has no income tax but taxes long-term gains at 7% above a $278,000 deduction (2025 figure; one deduction per household) and 9.9% on taxable gains over $1 million. Short-term gains are not taxed by Washington. dor.wa.gov |
| West Virginia | 4.58% | 4.58% | Gains taxed as ordinary income at graduated rates. code.wvlegislature.gov |
| Wisconsin | 5.355% | 7.65% | Wisconsin excludes 30% of a net long-term gain. revenue.wi.gov |
| Wyoming | None | None | No 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 | Long-term |
|---|---|
| Federal | $15,000 |
| Net investment income tax | $2,512 |
| Texas | $0 |
| Total | $17,512 |
| Effective rate on the gain | 17.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 | Sold 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 gain | 43.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 | One tax year | Two 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 gain | 31.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
- IRS Rev. Proc. 2025-32: 2026 brackets, thresholds and standard deductions
- 26 U.S.C. §1411: net investment income tax
- 26 U.S.C. §1211 and §1212: capital loss limits and carryforwards
- Tax Foundation, State Individual Income Tax Rates and Brackets, 2026: state rules. State rows link to each state's revenue department or the Tax Foundation's 2026 table.
- New York State Department of Taxation and Finance: New York City rates
- AQR's 2023 study, direct indexing simulations (Exhibit 1): harvested-loss pattern
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.