Capital gains tax calculator
Use this capital gains tax calculator: enter the gain you made, your other income for the year, how long you held the asset and your state. The result shows the federal tax, the 3.8% investment income tax, your state tax and what is left. For example: $42,500 kept from a $50,000 gain; 15.0% goes to tax.
Single filer, 2026 rates, standard deduction. An estimate, not tax advice.
How capital gains are taxed
A capital gain is the difference between what you sold an asset for and what it cost you, including buying and selling costs. Shares, funds, crypto, land, a rental building and a business are all capital assets.
The tax depends on two things: how long you held the asset, and how much other income you have in the year you sell.
Hold an asset for more than a year and the gain is long-term. Long-term gains have their own, lower rates: 0%, 15% or 20%. Hold it for a year or less and the gain is short-term, which is taxed exactly like wages, in the ordinary brackets of 10% to 37%.
Long-term capital gains rates for 2026
The rate depends on your taxable income, which is your income after the standard deduction, with the gain stacked on top. A gain can straddle two rates: the part that fits under a limit gets the lower rate.
| Rate | Single filer, taxable income |
|---|---|
| 0% | Up to $49,450 |
| 15% | $49,450 to $545,500 |
| 20% | Over $545,500 |
The 3.8% net investment income tax
On top of those rates, a single filer whose income passes $200,000 pays an extra 3.8% on investment income above that line ($250,000 for a married couple filing jointly). A large gain can push you over the limit by itself, so the top federal rate on a long-term gain is 23.8%.
What a $50,000 gain costs at different incomes
Single filer, state with no income tax. The long-term column is for an asset held more than a year; the short-term column is the same gain taxed as ordinary income.
| Other income | Tax if long-term | Share taxed | Tax if short-term | Saved by waiting |
|---|---|---|---|---|
| $0 | $0 | 0% | $3,820 | $3,820 |
| $30,000 | $2,168 | 4.33% | $7,350 | $5,183 |
| $60,000 | $6,668 | 13.33% | $10,350 | $3,683 |
| $100,000 | $7,500 | 15% | $11,564 | $4,064 |
| $200,000 | $9,400 | 18.8% | $16,470 | $7,070 |
| $400,000 | $9,400 | 18.8% | $19,400 | $10,000 |
| $600,000 | $11,900 | 23.8% | $19,400 | $7,500 |
Capital gains tax by state
A $100,000 long-term gain on top of $80,000 of other income, in every state. Open a state for its own page.
| State | Federal tax | State tax | Total tax | You keep |
|---|---|---|---|---|
| Alaska | $15,000 | None | $15,000 | $85,000 |
| Florida | $15,000 | None | $15,000 | $85,000 |
| Nevada | $15,000 | None | $15,000 | $85,000 |
| New Hampshire | $15,000 | None | $15,000 | $85,000 |
| South Dakota | $15,000 | None | $15,000 | $85,000 |
| Tennessee | $15,000 | None | $15,000 | $85,000 |
| Texas | $15,000 | None | $15,000 | $85,000 |
| Washington | $15,000 | None | $15,000 | $85,000 |
| Wyoming | $15,000 | None | $15,000 | $85,000 |
| North Dakota | $15,000 | $1,950 | $16,950 | $83,050 |
| Arizona | $15,000 | $2,500 | $17,500 | $82,500 |
| Ohio | $15,000 | $2,750 | $17,750 | $82,250 |
| Indiana | $15,000 | $2,950 | $17,950 | $82,050 |
| Louisiana | $15,000 | $3,000 | $18,000 | $82,000 |
| Pennsylvania | $15,000 | $3,070 | $18,070 | $81,930 |
| Kentucky | $15,000 | $3,500 | $18,500 | $81,500 |
| Iowa | $15,000 | $3,800 | $18,800 | $81,200 |
| Arkansas | $15,000 | $3,900 | $18,900 | $81,100 |
| North Carolina | $15,000 | $3,990 | $18,990 | $81,010 |
| Mississippi | $15,000 | $4,000 | $19,000 | $81,000 |
| Michigan | $15,000 | $4,250 | $19,250 | $80,750 |
| Colorado | $15,000 | $4,400 | $19,400 | $80,600 |
| Oklahoma | $15,000 | $4,500 | $19,500 | $80,500 |
| Utah | $15,000 | $4,500 | $19,500 | $80,500 |
| Nebraska | $15,000 | $4,550 | $19,550 | $80,450 |
| Rhode Island | $15,000 | $4,565 | $19,565 | $80,435 |
| Missouri | $15,000 | $4,700 | $19,700 | $80,300 |
| West Virginia | $15,000 | $4,820 | $19,820 | $80,180 |
| New Mexico | $15,000 | $4,895 | $19,895 | $80,105 |
| Illinois | $15,000 | $4,950 | $19,950 | $80,050 |
| Alabama | $15,000 | $5,000 | $20,000 | $80,000 |
| Massachusetts | $15,000 | $5,000 | $20,000 | $80,000 |
| Maryland | $15,000 | $5,113 | $20,113 | $79,887 |
| Georgia | $15,000 | $5,190 | $20,190 | $79,810 |
| Idaho | $15,000 | $5,300 | $20,300 | $79,700 |
| Wisconsin | $15,000 | $5,300 | $20,300 | $79,700 |
| Kansas | $15,000 | $5,580 | $20,580 | $79,420 |
| Montana | $15,000 | $5,650 | $20,650 | $79,350 |
| Virginia | $15,000 | $5,750 | $20,750 | $79,250 |
| Connecticut | $15,000 | $5,825 | $20,825 | $79,175 |
| New York | $15,000 | $5,857 | $20,857 | $79,143 |
| South Carolina | $15,000 | $6,000 | $21,000 | $79,000 |
| New Jersey | $15,000 | $6,370 | $21,370 | $78,630 |
| Delaware | $15,000 | $6,600 | $21,600 | $78,400 |
| Vermont | $15,000 | $7,074 | $22,074 | $77,927 |
| Maine | $15,000 | $7,150 | $22,150 | $77,850 |
| Minnesota | $15,000 | $7,380 | $22,380 | $77,620 |
| Hawaii | $15,000 | $7,748 | $22,748 | $77,252 |
| District of Columbia | $15,000 | $8,500 | $23,500 | $76,500 |
| California | $15,000 | $9,300 | $24,300 | $75,700 |
| Oregon | $15,000 | $9,349 | $24,349 | $75,651 |
Ways to lower the tax
Wait until you have held the asset for more than a year. Sell in a year when your other income is low, since the first part of a gain may then fall in the 0% rate.
Set losses against gains: losses on other sales in the same year reduce the gain that is taxed, and up to $3,000 of extra loss can be set against ordinary income. Gains inside a 401(k), an IRA or a Roth account are not taxed when you sell.
How to use this calculator
- Capital gain. What you sold the asset for, less what it cost you and the fees for buying and selling. Add up all your sales for the year and take off any losses.
- Your other income per year. Wages, business profit, pensions and interest for the year of the sale, before tax. It decides which rate the gain falls in.
- How long you held it. More than a year gives the long-term rates. A year or less is taxed like wages.
- State. The state you live in when you sell. For land or a building, use the state where it stands.
A worked example
You earn $55,000 in Texas and sell shares you have held for three years. They cost $19,450 with commission and sell for $50,000, so the gain is $30,550.
| Step | Amount |
|---|---|
| Taxable income before the gain: salary less the $16,100 standard deduction | $38,900 |
| Room left in the 0% band, which ends at $49,450 | $10,550 |
| Tax on the first $10,550 of the gain at 0% | $0 |
| Tax on the other $20,000 at 15% | $3,000 |
| Net investment income tax | None |
| Texas tax | None |
| Total tax | $3,000 |
| Left from the gain | $27,550 |
The gain is stacked on top of your salary. The first $10,550 fills what is left of the 0% band and the rest is taxed at 15%, so 9.8% of the gain goes to tax.
Sold a year or less after you bought, the same gain would be taxed like wages, partly at 12% and partly at 22%: $5,571, which is $2,571 more. In California the long-term sale would also cost $2,377 in state tax.
How much gain fits in the 0% band
A long-term gain pays no federal tax until your taxable income reaches $49,450. The more you earn, the less of that band is left for the gain. The table shows the largest long-term gain that stays at 0% for each level of other income.
| Other income | Largest gain taxed at 0% |
|---|---|
| $0 | $65,550 |
| $20,000 | $45,550 |
| $30,000 | $35,550 |
| $40,000 | $25,550 |
| $50,000 | $15,550 |
| $60,000 | $5,550 |
With no other income, the first $65,550 of gain is free of federal tax, because the $16,100 standard deduction comes off before the band starts. From $65,550 of other income the band is full and the whole gain starts at 15%. Worked out for a single filer who takes the standard deduction, at 2026 rates. State tax is separate.
Working out the gain on shares and funds
Your cost is the price you paid plus any commission. Dividends that were reinvested bought more shares, and what they bought is part of your cost. Leave them out and you pay tax twice on the same money.
If you bought the same share at different times and sell only part, the oldest shares count as sold first unless you tell your broker which ones to sell. Choosing the shares with the highest cost gives the smallest gain.
A loss is not allowed if you buy the same share again within 30 days before or after the sale; the loss is added to the cost of the new shares instead.
What this calculator leaves out
The sums are for a single filer who takes the standard deduction, at 2026 rates. Losses carried over from earlier years, the alternative minimum tax and city or county income taxes are not included.
State tax is worked out as if the state taxed the gain like any other income, which most do. Gold, art and other collectibles have their own top rate of 28%, which is not modelled.
A home, a rental and a flip each have rules of their own; use the calculators listed at the foot of the page.
Common questions
How much is capital gains tax?
For an asset held more than a year, the federal rate is 0%, 15% or 20% depending on your income, plus 3.8% once income passes $200,000. Most states add their own income tax.
What counts as long-term?
An asset held for more than one year. The count starts the day after you buy and includes the day you sell.
Do I pay capital gains tax if I reinvest?
Yes. Buying another investment with the money does not cancel the tax. The exceptions are sales inside retirement accounts and like-kind exchanges of investment real estate.
Which states have no capital gains tax?
Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas and Wyoming tax neither wages nor gains. Washington has no income tax but taxes large long-term gains.