Long-Term Capital Gains Tax Calculator
One date decides most of what you owe. A gain held a year or less is ordinary income at up to 37%; held one day longer it drops to the 0/15/20% schedule. Enter your sale, your basis and your income to see both numbers, the exact day the gain crosses over, the 3.8% surtax if it catches you, your state on top, and what actually reaches your account.
2026 tax year · Brackets and breakpoints per IRS Rev. Proc. 2025-32 · NIIT thresholds per IRC section 1411 · State rates current for 2026 · Not tax advice
Where the tax comes from
How the gain stacks on your income
2026 bandsWhat actually reaches you
net-proceeds bridgeSale report card
CWork backwards
What if…
Compare two sales
Your session trail
Share and export
Estimates for the 2026 tax year using the federal long-term capital gains brackets, the 3.8% net investment income tax, and state rates. Not tax advice — check your own situation with a CPA. It does not model the alternative minimum tax, the additional Medicare tax on wages, installment sales, section 1031 exchanges, carryforward losses from prior years, or every state's local add-ons.
How This Capital Gains Tax Calculator Works in 2026
Six inputs settle the bill: what you sold, what you sold it for, what it cost you, when you bought and sold, your other taxable income, and where you live. From those, the engine works out your adjusted basis, splits the gain into the pieces that are taxed differently, stacks the long-term portion on top of your ordinary income to find which rate bands it lands in, and then layers the net investment income tax and your state on top. Whether you are running the numbers on stocks, an ETF position, crypto, a collectible or a rental, the arithmetic follows the same order.
Most free tools ask for a gain and a rate and multiply the two. That skips the part that decides the answer. Your rate is not a setting you choose — it falls out of your holding period and where the gain lands on your income. The default scenario here is a $200,000 sale of stock bought for $80,000, held 332 days, by a single filer with $120,000 of other taxable income in Texas. That is $31,858 of federal tax today and $18,000 if the sale waits until 16 October 2026, plus $1,520 of surtax either way. The whole tool exists to make that $13,858 visible before you place the order.
Short-Term vs Long-Term Capital Gains: The One-Year Cliff
Hold an asset one year or less and the profit is ordinary income, stacked on your salary and taxed at whatever bracket it reaches — 22%, 24%, 32%, up to 37%. Hold it longer and it moves to an entirely separate schedule that tops out at 20%. There is no sliding scale between the two and no partial credit: the cliff is a single day. A common question, and a fair one, is how long to hold a stock to avoid the higher rate. The answer is one year and one day, because the holding period starts the day after you buy. Stock bought on 15 October 2025 turns long-term on 16 October 2026, not 15 October.
What the wait is worth depends entirely on your income, because that is what sets the ordinary rate the gain escapes. Here is the same $120,000 gain, sold by a single filer in a no-tax state, at five income levels:
| Other taxable income | Sold short-term | Sold long-term | The wait is worth |
|---|---|---|---|
| $40,000 | $26,446 | $16,583 | $9,864 |
| $60,000 | $27,886 | $18,000 | $9,886 |
| $120,000 | $31,858 | $18,000 | $13,858 |
| $250,000 | $41,813 | $18,000 | $23,813 |
| $600,000 | $43,588 | $24,000 | $19,588 |
The prize peaks in the middle and upper-middle of the income range, where the ordinary rate is already high but the long-term rate is still 15%. At $250,000 of other income the gap is $23,813. At $600,000 it narrows again to $19,588, because part of the gain has reached the 20% band. At $40,000 the long-term figure drops below 15% to $16,583, since some of the gain still fits inside the 0% band. Drag the marker on the timeline to move your sale date and watch the number move with it.
The 0% Capital Gains Bracket and Tax-Gain Harvesting
Long-term gains have a rate below 15%, and it is zero. For 2026 it applies while your total taxable income including the gain stays under $49,450 as a single filer or $98,900 filing jointly. A couple with $40,000 of taxable income who realize a $30,000 long-term gain pay no federal tax on it at all. Sold inside a year, the same gain would have cost $3,600.
The room this creates is usable on purpose. Selling into the 0% band and buying the position straight back resets your cost basis higher at no tax cost, which shrinks every future gain — the mirror image of loss harvesting, and the reason it is called tax-gain harvesting. The wash-sale rule does not interfere, because it disallows repurchased losses, not gains. The gap years worth watching for are the ones where income dips: a sabbatical, a first year of retirement before Social Security and required distributions begin, or a year between jobs. The reverse calculator reports your remaining room to the dollar, and the figure shrinks as other income rises, so it is worth checking in December rather than assuming January's estimate held.
How the 0/15/20% Brackets Stack on Your Income
A gain does not get its own bracket. It sits on top of your ordinary taxable income, and only the part that pokes above each breakpoint is taxed at the higher rate — so a single sale can be taxed at two rates at once. A married couple with $80,000 of taxable income realizing a $50,000 long-term gain fills the $18,900 still available below the $98,900 breakpoint at 0%, and the remaining $31,100 at 15%. The tax is $4,665 and the blended rate 9.33%, which is neither of the two rates in the table. Anyone searching for a capital gains tax bracket calculator is usually trying to resolve exactly this, and the stacked bar in the tool draws it.
| Filing status | 0% band | 15% band | 20% band |
|---|---|---|---|
| Single | up to $49,450 | to $545,500 | above $545,500 |
| Married filing jointly | up to $98,900 | to $613,700 | above $613,700 |
| Married filing separately | up to $49,450 | to $306,850 | above $306,850 |
| Head of household | up to $66,200 | to $579,600 | above $579,600 |
Two consequences follow. A large gain can push part of itself into the 20% band even though your salary alone never comes close to $545,500 — the gain is what lifts the stack. And ordinary income eats the cheap bands first, so a bonus or a Roth conversion in the same year quietly raises the rate on a gain you had already planned. Spreading a big sale across two tax years is the usual fix, and the A/B compare exists to price it.
The Net Investment Income Tax: a 3.8% Surtax Most Calculators Skip
Above certain income levels a further 3.8% lands on investment income, and it is the line item sellers are most often blindsided by, because a calculator that stops at the 0/15/20% schedule never mentions it. It applies to the smaller of two amounts: your net investment income, or the amount your modified AGI exceeds $200,000 single, $250,000 married filing jointly, or $125,000 married filing separately. A couple with $430,000 of MAGI and a $150,000 gain clears the threshold by $180,000 but only has $150,000 of investment income, so the surtax applies to $150,000 and costs $5,700.
The detail that matters over time is that these thresholds were written into the statute in 2013 and carry no inflation adjustment, unlike almost every other number on this page. The 0% breakpoint has drifted up year after year; $250,000 has not moved in over a decade, so each year of ordinary wage growth pulls more households across it. The other trap is that the sale itself counts toward MAGI, so a seller comfortably below the line in a normal year can be pushed over by one transaction — the decoder says so explicitly when that is what happened, and the reverse calculator reports how much room is left before it does.
Capital Gains Tax on Crypto
Digital assets are property in the eyes of the IRS, which means the rate rules you already know apply unchanged: more than a year gets the 0/15/20% bands, a year or less is ordinary income. Selling $40,000 of crypto bought for $10,000 after 441 days costs a single filer on $90,000 of income $4,500 at the 15% rate, against $6,886 had the sale come a few months sooner. Anyone reaching for a crypto capital gains tax calculator expecting a separate schedule will not find one.
Two things genuinely differ. The wash-sale rule in section 1091 is written for stock and securities, which is why crypto loss harvesting has been treated differently from equities — worth confirming against current guidance before you rely on it, since this is the area most likely to change. And basis tracking is far harder: transfers between wallets and exchanges frequently arrive without cost basis attached, and a taxable event fires on every swap, not just on a sale to dollars. Select the crypto asset type and the tool flags both. Keeping per-lot records as you go is the difference between a clean return and a reconstruction exercise in April.
Home Sales, Rentals, and Depreciation Recapture
Selling a main home is the one case where a very large gain often produces no tax at all. Own it and live in it for at least 2 of the 5 years before the sale and you exclude $250,000 of gain, or $500,000 filing jointly. A couple selling for $700,000 with $35,000 of selling costs against a $240,000 basis — $200,000 paid plus $40,000 of improvements — has a $425,000 gain that disappears entirely inside the $500,000 cap. The same sale by a single filer runs past the $250,000 cap and leaves $175,000 taxable. Those caps have been fixed since 1997 and do not track house prices, which is why long-tenured owners in expensive markets increasingly exceed them.
Rentals carry a second bill that catches owners out. Depreciation lowered your basis while you held the property, so it comes back on sale as unrecaptured section 1250 gain, taxed at a rate capped at 25%, and it is settled before the rest of the gain reaches the long-term schedule. On a $520,000 sale with $31,000 of costs and $78,000 of depreciation taken against a $325,000 cost-plus-improvements figure, the basis is $247,000 and the gain $242,000. The $78,000 of recapture is carved out first, and at $150,000 of joint income it stacks through the 22% and 24% brackets for $17,492 — below the $19,500 a flat 25% implies, because the 25% is a ceiling and not a rate. The remaining $164,000 is taxed at 15% for $24,600.
The two rules meet on a house that was once rented or carried a home office. Depreciation claimed after May 1997 is specifically excluded from the main-home exclusion, so it stays taxable even when the exclusion wipes out everything else — a result that surprises sellers who assumed the $500,000 covered the whole sale. Set the depreciation figure in the property panel and the calculator splits the two automatically rather than folding them together.
Collectibles, QSBS, and the Assets That Break the 20% Ceiling
Art, coins, antiques, stamps and precious metals — physical gold and most bullion ETFs included — miss the favorable schedule. The collectibles capital gains tax rate is your ordinary rate with a 28% ceiling rather than a 20% one, which costs real money at the top. A $69,000 long-term gain for a single filer on $210,000 of income comes to $19,320 as a collectible against $10,350 as stock: $8,970 more for the same profit. The ceiling cuts both ways, though. A seller whose stack sits in the 12% bracket pays 12%, not 28%, because 28% is a maximum and not a flat rate.
Qualified small business stock runs the opposite way and changed recently. Under the 2025 legislation, stock acquired after 4 July 2025 excludes 50% of the gain at three years held, 75% at four and 100% at five, against a $15 million per-issuer cap. Stock acquired before that date follows the older rule, where nothing is excluded until the full five years are up, with a $10 million cap. Since the tiers hinge on an acquisition date rather than a tax year, the calculator reads the purchase date you entered and applies whichever regime the stock actually falls under. Qualifying separately requires an eligible C-corporation issuer and original-issue stock, which no calculator can verify for you.
State Capital Gains Tax: Where the Second Bill Comes From
Most states tax gains as ordinary income with no long-term discount, so the federal saving you just engineered does not repeat at the state level. On a $200,000 long-term gain with $200,000 of other income, the federal tax is $30,000 and the surtax $7,600 wherever you live. What changes is everything after that. Anyone running a California capital gains tax calculator finds 13.3% and $26,600 — closing on the federal bill itself — while eight states take nothing.
| State | Effective | State tax | Total bill | Treatment |
|---|---|---|---|---|
| California | 13.30% | $26,600 | $64,200 | Ordinary income, including the 1% surcharge above $1M |
| New York | 10.90% | $21,800 | $59,400 | Ordinary income; NYC residents owe local tax on top |
| Hawaii | 7.25% | $14,500 | $52,100 | Long-term gains capped at 7.25% against an 11% ordinary rate |
| Wisconsin | 5.35% | $10,710 | $48,310 | 30% of a long-term gain excluded |
| South Carolina | 3.36% | $6,720 | $44,320 | 44% of a long-term gain excluded |
| Arkansas | 1.95% | $3,900 | $41,500 | 50% of a long-term gain excluded |
| North Dakota | 1.50% | $3,000 | $40,600 | 40% of a long-term gain excluded |
| Texas / Florida | 0% | $0 | $37,600 | No state income tax on gains |
The middle of that table is the part generic tools get wrong. Ten states give long-term gains their own treatment rather than taxing them as wages: Arkansas, North Dakota, South Carolina, Wisconsin and Vermont exclude a fixed share of the gain, while Hawaii and Montana cap the rate outright. Applying a state's top marginal rate to a long-term gain in any of them overstates the bill by half or more. Washington is its own case — no income tax, but a 7% excise tax on large long-term gains above a roughly $278,000 standard deduction, rising to 9.9% past $1 million, with real estate exempt. New Hampshire finished repealing its interest-and-dividends tax in 2025 and now taxes gains at nothing. Residency is determined by where you live when the sale closes, not where you lived when you bought, which is why the what-if state selector is worth a look before a move.
Getting Your Cost Basis Right
Everything above prices the gain. Basis decides how big the gain is in the first place, and it is where most avoidable overpayment happens. Taxable gain is the sale price minus selling costs minus your adjusted basis, so a dollar of basis you cannot document is a dollar taxed at up to 37%. Beyond the purchase price, basis takes in purchase commissions, capital improvements on property — a new roof, not a repaired one — reinvested dividends in a fund, and any loss a wash sale disallowed, which rolls into the basis of the replacement shares rather than vanishing.
Two inherited-or-gifted cases invert the answer and are worth knowing before the transfer, not after. Assets inherited at death step up to their value on that date, so decades of appreciation are wiped out and a sale shortly afterwards can produce almost no taxable gain. A gift made during the donor's lifetime does the opposite: the recipient takes the donor's original basis, so shares bought for $5,000 and worth $200,000 hand the recipient a $195,000 latent gain along with the present. Switching the basis type in the tool applies the right rule rather than treating every entry as a purchase price.
How the Sale Report Card Grades Your Timing
Six weighted measures produce one letter, so a sale that is cheap federally but expensive at the state level cannot hide behind the federal number.
| Dimension | Weight | How it scores |
|---|---|---|
| Holding-Period Efficiency | 25% | A once long-term; short-term is marked down by what the wait is worth and how close the crossover is |
| Rate-Bracket Optimization | 20% | A in the 0% band, B at 15%, C at 20%, D or F at ordinary rates |
| NIIT Exposure | 15% | A under the threshold; marked down by the surtax as a share of your total tax |
| Cost-Basis Accuracy | 15% | A with adjustments captured; property sold on purchase price alone scores 45 |
| State-Tax Impact | 15% | A at 0%, B in the mid single digits, F in the 10%+ states |
| Net-Keep Ratio | 10% | Net proceeds as a share of the sale after every tax: A above 95% kept, C around 75%, F below 55% |
The default scenario grades C: an A for state impact in Texas, but a C on holding-period efficiency for selling 34 days early and a D on rate for paying 26.55% where 15% was available. The couple harvesting a $30,000 gain into the 0% band in Florida grades A at 97.8. The $200,000 California gain grades C, because 13.3% at the state level and the surtax on top take the effective rate to 32.10% and leave only 74.32% of the proceeds. Press E for the summary deck if you want the whole thing on one screen.
Frequently Asked Questions
How is long-term capital gains tax calculated?
The gain stacks on top of your other taxable income, and the stack is then sliced across the 0%, 15% and 20% bands — which is why your rate is rarely one number. For 2026 the 0% band runs to $49,450 of total taxable income for a single filer and $98,900 for a married couple filing jointly; the 15% band runs to $545,500 and $613,700. A married couple with $80,000 of taxable income realizing a $50,000 long-term gain has $18,900 of room left in the 0% band, so $18,900 is free and the remaining $31,100 is taxed at 15%: $4,665 in total, a blended 9.33%. Filling the bands in order is what this calculator does instead of applying a single flat rate.
What is the difference between short-term and long-term capital gains tax?
Short-term gains, on anything held one year or less, are ordinary income taxed at your marginal bracket, up to 37%. Long-term gains get the separate 0/15/20% schedule. On a $120,000 gain with $120,000 of other income, a single filer owes $31,858 short-term — the gain pushes through the 24% and 32% brackets — against $18,000 long-term, a flat 15%. That is $13,858 for the same sale, decided only by the date. The short-term capital gains tax calculator view shows both figures side by side so the gap is never hidden.
How long do I have to hold a stock to avoid the higher tax rate?
More than one year. The holding period starts the day after you buy, so stock bought on 15 October 2025 becomes long-term on 16 October 2026 — one year and one day, not 365 days. Sell on 15 October and you are still short-term. The capital gains holding period calculator here marks the exact crossover date, counts the days left, and prices the wait: at 332 days held, the default scenario is 34 days from turning a $31,858 bill into an $18,000 one.
What is the 0% capital gains bracket and how do I use it?
If your total taxable income including the gain stays under $49,450 single or $98,900 married filing jointly in 2026, your long-term gains are taxed at 0% federally. A couple with $40,000 of taxable income realizing a $30,000 long-term gain pays nothing on it, where the same gain sold short-term would have cost $3,600. Deliberately realizing gains into that room and rebuying resets your basis higher at no tax cost — tax-gain harvesting. The wash-sale rule does not block the rebuy, because it applies to losses, not gains. The reverse calculator reports exactly how much room you have left this year.
What is the Net Investment Income Tax and when does it apply?
The NIIT adds 3.8% on the smaller of your net investment income or the amount your modified AGI exceeds $200,000 single, $250,000 married filing jointly, or $125,000 married filing separately. A couple with $430,000 of MAGI and a $150,000 gain is $180,000 over the line but has only $150,000 of investment income, so the surtax lands on $150,000: $5,700. The thresholds were set by statute in 2013 and are not indexed for inflation, so each year of wage growth pulls more sellers over them. The decoder also flags when the sale itself is what pushed you across.
How is capital gains tax calculated on crypto?
Identically to stocks. The IRS treats digital assets as property, so a sale held more than a year gets the 0/15/20% bands and anything shorter is ordinary income. Selling $40,000 of crypto bought for $10,000 after 441 days costs $4,500 at the 15% rate against $6,886 if it had been sold inside the year. The one real difference is the wash-sale rule in section 1091, which is written for stock and securities — that is why crypto loss-harvesting has been treated differently, and why per-lot basis records matter when coins move between exchanges that do not carry basis with them.
How much capital gains tax do I pay when I sell my house?
Often nothing. If it was your main home and you owned and lived in it for at least 2 of the 5 years before the sale, you can exclude $250,000 of gain, or $500,000 filing jointly. A couple selling for $700,000 with $35,000 of selling costs and a $240,000 basis after $40,000 of improvements has a $425,000 gain, entirely inside the $500,000 exclusion, so the bill is zero. The same sale by a single filer exceeds the $250,000 cap and leaves $175,000 taxable. The exclusion has been fixed at those amounts since 1997 and does not rise with house prices.
What is depreciation recapture and how is it taxed?
Every dollar of depreciation you deducted on a rental lowered your basis, so it comes back as unrecaptured section 1250 gain when you sell, taxed at a rate capped at 25% before the rest of the gain reaches the long-term schedule. On a $520,000 rental sale with $78,000 of depreciation taken, that $78,000 is carved out first: at $150,000 of joint income it stacks through the 22% and 24% brackets for $17,492, not the $19,500 a flat 25% would suggest. The remaining $164,000 is then taxed at 15%. Recapture also survives the main-home exclusion, so depreciation from a home office or rental period is taxable even when the rest of the gain is excluded.
Which states tax capital gains, and how much?
Most tax them as ordinary income, and for a large sale the state line can rival the federal one. On a $200,000 long-term gain with $200,000 of other income, the federal tax is $30,000 and the surtax $7,600 everywhere — but California adds $26,600 at 13.3% and New York $21,800 at 10.9%, while Texas, Florida and six other states add nothing. Ten states are neither: Hawaii caps long-term gains at 7.25%, South Carolina excludes 44% of them and North Dakota 40%, so the same gain costs $14,500, $6,720 and $3,000 respectively. Washington charges no income tax but levies a 7% excise tax on long-term gains above a roughly $278,000 standard deduction, with real estate exempt.
How does cost basis change my capital gains tax?
Your taxable gain is the sale price minus selling costs minus your adjusted basis, so every dollar of basis you fail to claim is a dollar taxed at up to 37%. Basis includes the purchase price plus commissions, capital improvements on property, reinvested dividends in a fund, and any loss disallowed by a wash sale. Two situations flip the answer entirely: inherited assets step up to their value at the owner’s death, so a long-held stock can pass with almost no taxable gain, while a gifted asset carries over the donor’s original basis, which is how a well-meant gift produces a far larger gain than the recipient expects.