Capital Gains Tax Calculator
Federal and state tax on an investment gain: the 0/15/20% rates, the 3.8% surtax, and each state's own rule — including the nine where a gain is untaxed.
Capital Gains Tax Calculator: with the default inputs, total tax on the gain is $9,000.00.
More than one year is long-term and gets the lower rates. Exactly one year is short-term — the clock starts the day after you bought.
Wages, self-employment, interest — everything but this gain. It decides which capital gains bracket the gain lands in.
Adds that state's own treatment of the gain, which is not always its income tax rate.
- You keep
- $51,000.00The gain after every tax below.
- Capital gain
- $60,000.00
- Federal capital gains tax
- $9,000.00
- Federal rate on the last dollar
- 15%
- Net investment income tax
- $0.00The 3.8% surtax on investment income above $200,000 single or $250,000 joint.
- State tax on the gain
- $0.00
- Effective rate on the gain
- 15%
Assumptions
- One sale of a straightforward capital asset — shares, funds, crypto or investment property — by an individual US resident.
- The gain is stacked on your other taxable income, which is what decides the federal band.
- No main-home exclusion, depreciation recapture, collectibles rate, qualified small business stock, opportunity zone or 1031 exchange.
- State tax uses that state's rule for a gain allocated to it; a gain sourced to another state, or a part-year move, is not modelled.
- No local income tax: county in Maryland and Indiana, municipal in Ohio and Pennsylvania, city in New York.
| Band | Rate | Gain in this band | Tax |
|---|---|---|---|
| 0% band (to $49,450 of taxable income) | 0% | $0 | $0 |
| 15% band (to $545,500) | 15% | $60,000 | $9,000 |
| 20% band (above $545,500) | 20% | $0 | $0 |
| Holding period | Total tax | You keep |
|---|---|---|
| Sold within a year — short-term | $13,564 | $46,436 |
| Held more than a year — long-term | $9,000 | $51,000 |
You have held this more than a year, so the long-term rates apply. The other row is what the same sale would have cost inside a year.
How this is worked out
The formula
Capital gain = sale price − (purchase price + selling costs + improvements) − losses used Long-term (held more than one year), federal: the gain is stacked on top of your other taxable income, and each slice takes the rate of the band it lands in 2026 single: 0% to $49,450 · 15% to $545,500 · 20% above 2026 married filing jointly: 0% to $98,900 · 15% to $613,700 · 20% above 2026 head of household: 0% to $66,200 · 15% to $579,600 · 20% above Short-term (a year or less): the gain is ordinary income, taxed at your income tax brackets Net investment income tax = 3.8% × the lesser of (net investment income) and (modified AGI − threshold) threshold: $200,000 single and head of household · $250,000 joint · $125,000 separately — never indexed State tax = that state's own rule: ordinary income in 38 jurisdictions, an exclusion in six, a rate of its own in three, a separate excise in Washington, and nothing at all in nine
Open How it’s calculated above to see this worked through with your own numbers.
What you enter
- Tax year
- Choose one of 2 options.2026 (return filed in 2027) · 2025 (return filed in 2026)
- How long did you hold it?
- More than one year is long-term and gets the lower rates. Exactly one year is short-term — the clock starts the day after you bought.More than a year — long-term · A year or less — short-term
- What you paid (cost basis)
- A number.in dollars · 0 or more · defaults to 40000
- What you sold it for
- A number.in dollars · 0 or more · defaults to 100000
- Filing status
- Choose one of 4 options.Single · Married filing jointly / surviving spouse · Married filing separately · Head of household
- Your other income
- Wages, self-employment, interest — everything but this gain. It decides which capital gains bracket the gain lands in.in dollars · 0 or more · defaults to 80000
- State
- Adds that state's own treatment of the gain, which is not always its income tax rate.Alabama · Alaska — no income tax · Arizona · Arkansas · California · Colorado · Connecticut · Delaware · District of Columbia · Florida — no income tax · Georgia · Hawaii · Idaho · Illinois · Indiana · Iowa · Kansas · Kentucky · Louisiana · Maine · Maryland · Massachusetts · Michigan · Minnesota · Mississippi · Missouri · Montana · Nebraska · Nevada — no income tax · New Hampshire — no income tax · New Jersey · New Mexico · New York · North Carolina · North Dakota · Ohio · Oklahoma · Oregon · Pennsylvania · Rhode Island · South Carolina · South Dakota — no income tax · Tennessee — no income tax · Texas — no income tax · Utah · Vermont · Virginia · Washington — no income tax · West Virginia · Wisconsin · Wyoming — no income tax · No state tax / not listed
- Selling costs and improvements(under More options)
- Commissions, legal fees, and money spent improving the asset. These add to your basis and shrink the gain.in dollars · 0 or more · defaults to 0
- Capital losses to offset(under More options)
- Losses realised this year on other sales, plus any loss carried forward from previous years.in dollars · 0 or more · defaults to 0
- The other income I entered is…(under More options)
- Choose one of 2 options.Gross (subtract the standard deduction) · Taxable income, already after deductions
What you get back
- Total tax on the gainmain answer
- You keep
- The gain after every tax below.
- Capital gain
- Federal capital gains tax
- Federal rate on the last dollar
- Net investment income tax
- The 3.8% surtax on investment income above $200,000 single or $250,000 joint.
- State tax on the gain
- Effective rate on the gain
What this assumes
- One sale of a straightforward capital asset — shares, funds, crypto or investment property — by an individual US resident.
- The gain is stacked on your other taxable income, which is what decides the federal band.
- No main-home exclusion, depreciation recapture, collectibles rate, qualified small business stock, opportunity zone or 1031 exchange.
- State tax uses that state's rule for a gain allocated to it; a gain sourced to another state, or a part-year move, is not modelled.
- No local income tax: county in Maryland and Indiana, municipal in Ohio and Pennsylvania, city in New York.
About this calculator
Sell an asset for more than you paid and the profit is a capital gain. What it costs you turns almost entirely on one thing: whether you held it for more than a year.
Hold it longer than a year and the gain is long-term, taxed at 0%, 15% or 20% — rates that exist nowhere else in the tax code. Sell within a year and it is short-term, which is not really a capital gains rate at all: the gain is added to your salary and taxed at your ordinary bracket, which for most people is 22% or 24%. On a $60,000 gain, that gap is often more than $10,000.
Why your other income matters
The capital gains bands are not measured against the gain. They are measured against your total taxable income, with the gain stacked on top of everything else. A single filer in 2026 with $30,000 of taxable income and a $30,000 gain pays nothing on the first $19,450 of it, because that much of the 0% band was still unused — and 15% on the rest. The same gain for someone earning $200,000 is taxed at 15% from the first dollar.
This is why the calculator asks for your other income. Without it, any figure it produced would be a guess.
The 3.8% nobody budgets for
Above $200,000 of modified AGI ($250,000 filing jointly) the net investment income tax adds 3.8% on top. It is charged on the lesser of your investment income and the amount by which your income passes the threshold. Those thresholds were written into the statute in 2013 and have never been adjusted for inflation, so the tax reaches further every year.
Your state may not follow the federal rules at all
Most states simply treat a gain as income and tax it at their ordinary rates — so a Californian pays up to 13.3% on top of the federal bill. But twelve jurisdictions do something else, and the differences are large:
- Missouri deducts 100% of capital gains for individuals from tax year 2025, so it taxes gains at nothing while still taxing wages.
- Washington has no income tax but levies a 7% excise on long-term gains above a $278,000 standard deduction, rising to 9.9% on gains above $1m.
- Arkansas taxes half of a long-term gain, South Carolina deducts 44%, Wisconsin 30%, North Dakota 40% — every one of those for long-term gains only.
- Montana gives long-term gains their own 3.0%/4.1% schedule; Hawaii caps them at 7.25%.
- New Mexico's deduction is $2,500 for an ordinary investor — the 40% figure still quoted everywhere was repealed for 2024 and now only covers the sale of a New Mexico business.
- Massachusetts taxes short-term gains at 8.5% against 5% for long-term; Minnesota adds 1% on investment income above $1m.
Pick your state and the calculator applies its actual rule, prints the source it came from, and says what it has deliberately left out.
What this does not cover
The exclusion on selling your main home ($250,000, or $500,000 for a couple) is the big one — if this is your home, that exclusion usually comes off the gain before any of this applies. Depreciation recapture on a rental is taxed at up to 25%, collectibles at 28%, and qualified small business stock can be exempt entirely. None of those are modelled here.
Frequently asked questions
▸What is the capital gains tax rate for 2026?
For assets held more than a year: 0%, 15% or 20%, decided by your total taxable income with the gain stacked on top. A single filer pays 0% up to $49,450 of taxable income, 15% to $545,500, and 20% above. Joint filers: 0% to $98,900, 15% to $613,700. Above $200,000 single or $250,000 joint the 3.8% net investment income tax is added. Assets held a year or less are taxed as ordinary income instead.
▸How do I avoid capital gains tax?
Legitimately: hold for more than a year to reach the lower rates; realise gains in a year when your income is low enough to use the 0% band; offset gains with losses on other holdings, including losses carried forward; hold the asset in an IRA or 401(k), where no gain is taxed on sale; or, for a main home you have lived in for two of the last five years, use the $250,000/$500,000 exclusion. Donating appreciated stock to charity avoids the gain entirely and gives a deduction for the full value.
▸Do I pay capital gains tax if I reinvest?
Yes. Reinvesting the proceeds — into more shares, another property, anything — does not defer the tax. The gain is realised when you sell. The exception is a 1031 like-kind exchange, which applies to investment real estate only and has strict deadlines.
▸Which states have no capital gains tax?
Eight levy no income tax at all and so no tax on gains: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Wyoming and New Hampshire. Missouri taxes wages but from 2025 deducts 100% of capital gains, so it is the ninth state where a gain is untaxed. Washington is the odd one out — no income tax, but a 7% excise on large long-term gains.
▸Is the capital gain added to my income?
For working out the rate, yes — the gain counts towards the taxable income that decides which band it falls in, and towards the modified AGI that triggers the 3.8% surtax. But a long-term gain does not get taxed at your ordinary bracket; it keeps its own 0/15/20% rate. A short-term gain genuinely is ordinary income and is taxed at your bracket.
▸How long do I have to hold something to get the long-term rate?
More than one year. The holding period starts the day after you acquire the asset and ends on the day you dispose of it, so an asset bought on 10 March is long-term only if sold on 11 March the following year or later. Selling one day early can cost you the difference between 15% and 24%.
▸What if I sold at a loss?
Losses offset gains of the same kind first, then the other kind. If losses still remain you can deduct up to $3,000 against ordinary income each year ($1,500 filing separately), and carry the rest forward indefinitely. Watch the wash-sale rule: buying substantially the same security within 30 days either side of the sale disallows the loss.
Put this calculator on your own site
A working capital gains tax, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.
Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.
Capital Gains Tax Calculator by CalculateItNow
The page's own title. The clearest description of what the link leads to.
The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.
Browse every calculator widget·How to add it to WordPress, Squarespace or Wix
Related calculators
The questions people ask next to a capital gains tax.
Estimate 2026 or 2025 federal and state income tax from gross or taxable income and filing status — real brackets for all 50 states and DC, with sources.
Estimate your federal and state tax refund — or what you'll owe — by comparing the tax on your income with what was withheld from your paychecks.
Project investment growth with monthly contributions, annual raises, fund expense ratios and inflation — with a yearly split of what you invested vs. earned.
Project a Roth IRA's tax-free balance and compare it, for the same take-home cost, with a traditional IRA taxed on withdrawal at your rates now and later.
Monthly cash flow, cap rate, cash-on-cash return, gross rent multiplier and the 1% rule on a rental — with vacancy, management and maintenance priced in.
Average cost basis across up to five purchases, in shares or dollars, with the current gain or loss, the break-even price and what averaging down really does.