About the US Capital Gains Tax Calculator
Federal tax on the profit from selling an asset — shares, a second property, a business, crypto.
Two beliefs about it are extremely common, and both make the 0% rate sound more generous than it is:
"I'm in the 0% bracket, so my gain is tax free."
"Selling will push my salary into a higher bracket."
The first is usually wrong. The second is always wrong. This US capital gains tax calculator works both out by stacking the gain the way the rules actually stack it, rather than applying a single rate to the whole thing.
How to Use the US Capital Gains Tax Calculator
Enter the gain — the sale price less what you paid and the costs of buying and selling.
Enter your other taxable income, after deductions. This is the input people skip, and it is the one that decides everything: the bands are thresholds on total taxable income, so what you already earn determines which bands the gain reaches.
Set how long you held it. More than a year gets the 0/15/20 rates; a year or less is taxed as ordinary income.
The band thresholds and the surtax default to 2025 figures and are editable, because they move every year.
Step-by-Step Example
A $50,000 long-term gain, on top of $40,000 of other taxable income, single.
Ordinary taxable income: 40,000
Room left under the 48,350 threshold: 8,350
8,350 of the gain at 0% = 0
41,650 of the gain at 15% = 6,247.50
──────────
Tax: 6,247.50
Kept: 43,752.50
Effective rate on the gain: 12.5%. Marginal rate: 15%.
Not 0%, despite $40,000 of income sitting inside what people call the 0% bracket. And not 15% either.
The Gain Is Stacked On Top
This is the whole mechanic, and it explains both misconceptions at once.
Ordinary income fills the bands from the bottom. The capital gain sits on top of it. So:
The gain moves itself through the bands as you realise it. Only the part that lands below the 0% threshold is free. A large gain cannot sit entirely in the 0% band however low your other income is, because the gain itself counts toward the threshold.
But the gain never changes the tax on the income underneath. Ordinary income was stacked first and is already settled. Selling an asset cannot raise the tax on your salary — the stacking runs the other way, and the fear has it backwards.
How Much Can You Realise at 0%?
This is the number worth acting on, and the calculator reports it directly.
The room left is the top of the 0% band, less your other taxable income, less any gain you have already realised. With $20,000 of income and a $10,000 gain realised, there is $18,350 of room remaining.
Realising a gain inside that room costs nothing. Letting it accumulate into a later year, when your income may be higher or the position larger, can mean paying 15% on the very same gain. For anyone with a low-income year — a career break, early retirement before pensions start, a business loss — this is genuinely free money, and it expires annually.
The 3.8% Surtax Is a Separate Layer
Once modified adjusted gross income passes $200,000 single or $250,000 married, investment income picks up an extra 3.8%.
| Headline rate | With the surtax |
|---|---|
| 15% | 18.8% |
| 20% | 23.8% |
One detail that is routinely got wrong: the surtax is charged on the lesser of your investment income and the amount your MAGI exceeds the threshold. A $100,000 gain that takes MAGI to $280,000 is only surtaxed on $80,000, not on the full gain. Near the boundary, only part of the gain is exposed — which is why the effective rate in that example is 18.04% rather than 18.8%.
Short-Term Gains Are Just Income
Hold for a year or less and there is no capital gains rate at all. The gain is added to ordinary income and taxed at your ordinary brackets.
On $100,000 of other taxable income, a $50,000 gain costs $11,933 as a short-term gain against $7,500 at the long-term rate. A difference of $4,433, decided entirely by the calendar.
The holding period runs from the day after you bought to the day you sold. On a position close to the line, that distinction is worth checking against the trade confirmations rather than from memory.
Nothing Here Is a Cliff
Worth stating plainly, because tax systems do contain cliffs and people reasonably worry about them.
Every band in the capital gains rules is marginal. More gain always leaves more after tax. The calculator sweeps every gain up to $900,000 at four different income levels in its own test suite and confirms after-tax proceeds never fall, and that the marginal rate never exceeds 23.8%.
So there is no threshold you should avoid crossing. There are only thresholds worth timing — which is a different decision, and the one the 0% headroom figure is for.
Understanding Your Result
After tax is what you keep from the gain.
Tax due separates the capital gains tax from any surtax.
How the gain was taxed shows the amount falling into each band, which is what makes the stacking visible.
Effective and marginal gives the rate across the whole gain and the rate on the next dollar of it. They differ, and the marginal one governs any decision about selling more.
Worth knowing flags the 0% headroom, the band the gain pushed itself out of, or the surtax.
When Should You Use This Calculator?
Before selling. Particularly to see how much falls at 0%.
In a low-income year. The 0% headroom is largest exactly when your income is smallest, and it does not carry forward.
Deciding whether to wait for the one-year mark. The difference is often thousands.
Planning a large sale. Splitting a sale across two tax years can keep more of it in lower bands.
Common Mistakes
Assuming the 0% bracket covers the whole gain. The gain counts toward the threshold that decides its own rate.
Fearing that a sale will raise the tax on your salary. It cannot. Ordinary income is stacked first.
Applying one rate to the whole gain. A gain that straddles a threshold is taxed in parts.
Forgetting the 3.8% surtax. It turns 15% into 18.8% and 20% into 23.8%.
Charging the surtax on the whole gain. It applies to the lesser of the gain and the MAGI excess.
Ignoring state tax. Several states tax capital gains as ordinary income, and none of that is included here.
Letting the 0% room expire. It resets annually and cannot be carried forward.
Thresholds change every tax year, state tax is not included, and the treatment of losses, wash sales, inherited assets and primary residences all sit outside this calculation. Every figure here is an estimate for planning, not tax advice.