Why the Same Gain Can Owe Two Very Different Bills
Two investors with $52,000 of other income each sell the same $25,000 of profit in 2026, and both file as single. One waited 13 months, the other sold at 11 months. The first owes $1,717.50 of federal tax on the gain; the second owes $4,050.00. Nothing about the investment changed except which section of the tax code applies. Long-term capital gains ride a 0%, 15%, 20% staircase measured in taxable income, while short-term gains are stacked on top of your salary and taxed at 10% through 37%.
This calculator prices both paths on your own numbers, adds the 3.8% Net Investment Income Tax and your state's rate, and reports the total that actually leaves your account — plus how much waiting past the one-year mark is worth in dollars.
The 2026 Rules This Calculator Uses
Every threshold below comes from IRS Revenue Procedure 2025-32, the inflation adjustments that govern tax year 2026, together with the statutory NIIT thresholds that Congress has never indexed.
- 2026 standard deduction: $16,100 for single and married filing separately, $32,200 for married filing jointly, $24,150 for head of household. Ordinary income above that amount becomes ordinary taxable income, which is the floor your gain is stacked on.
- Long-term brackets (0% / 15% / 20%): the ceilings are stated in taxable income, so wages, interest, and short-term gains fill the low bands first. Only the room left above them is available to a long-term gain.
- Short-term gains are ordinary income: they are added to the top of your other income and taxed at marginal rates of 10%, 12%, 22%, 24%, 32%, 35% or 37%.
- Net Investment Income Tax (3.8%): charged on the lesser of your net investment income or the amount by which modified AGI exceeds $200,000 (single and head of household), $250,000 (joint) or $125,000 (married filing separately).
- State tax: one flat rate you enter, applied to the gain, with a 5% default.
The Formulas Behind the Result
The short-term formula is a difference of two tax bills rather than a single multiplication. That matters because a gain pushes you through several brackets at once: a $25,000 short-term gain on top of $35,900 of ordinary taxable income is taxed partly at 12% and partly at 22%, never at a single rate.
2026 Long-Term Capital Gains Brackets (Rev. Proc. 2025-32, section 4.03)
| Filing Status | 0% up to | 15% up to | 20% above | NIIT threshold (MAGI) |
|---|---|---|---|---|
| Single | $49,450 | $545,500 | $545,500 | $200,000 |
| Married Filing Jointly | $98,900 | $613,700 | $613,700 | $250,000 |
| Married Filing Separately | $49,450 | $306,850 | $306,850 | $125,000 |
| Head of Household | $66,200 | $579,600 | $579,600 | $200,000 |
These amounts are taxable income, not gross income. A single filer earning $52,000 who takes the $16,100 standard deduction has $35,900 of ordinary taxable income, so $13,550 of the 0% band ($49,450 − $35,900) remains for a gain. In the default scenario that first $13,550 is taxed at 0% and the remaining $11,450 at 15%.
Short-Term vs Long-Term: Four Profiles Priced Both Ways
Each row below holds the same gain, the same 5% state rate and the same filing status under both holding periods, so the only variable is the rate schedule. The last column isolates the 3.8% NIIT inside the long-term bill.
| Profile | Long-Term Total Tax | Short-Term Total Tax | Long-Term Saves | of which NIIT |
|---|---|---|---|---|
| Single · $52,000 income · $25,000 gain | $2,967.50 | $5,300.00 | $2,332.50 | $0.00 |
| Joint · $60,000 income · $60,000 gain | $3,000.00 | $10,200.00 | $7,200.00 | $0.00 |
| Single · $250,000 income · $100,000 gain | $23,800.00 | $43,130.25 | $19,330.25 | $3,800.00 |
| Head of household · $85,000 income · $40,000 gain | $7,197.50 | $10,140.00 | $2,942.50 | $0.00 |
A joint filer with $60,000 of income and a $60,000 gain pays nothing in federal capital gains tax at all: the $32,200 standard deduction leaves $27,800 of ordinary taxable income, and the whole gain still fits under the $98,900 zero-rate ceiling. Sell the same position short-term and the federal bill is $7,200, because the gain lands in the 12% and 22% ordinary brackets. For middle-income households with large embedded gains, that is the single largest lever on this tax.
When the 3.8% NIIT Quietly Adds a Fourth Bracket
The NIIT is the reason a high earner's effective rate on a long-term gain lands near 24% rather than 20%. A single filer with $250,000 of ordinary income and a $100,000 gain is above the $200,000 MAGI threshold by $150,000, which covers the entire gain, so the surtax is 3.8% × $100,000 = $3,800.00. Add 15% federal ($15,000.00) and 5% state ($5,000.00) and the bill reaches $23,800.00, or 23.8% of the gain.
Because the thresholds are fixed dollars, the surtax catches more people every year without a single vote: a married couple whose wages and brokerage gains total $250,000 is fully exposed even though that income is ordinary for their neighborhood. Two design choices keep the exposure down — recognizing gains in a year when MAGI sits below the threshold, and spreading a large sale across two tax years rather than realizing it all in one December.
The Wash-Sale Rule and Other Traps
The wash-sale rule disallows a loss when you buy a substantially identical security within 30 days before or after the sale, and adds the disallowed loss to the basis of the replacement shares. It applies to losses only — it cannot erase a gain, and it does not care whether you sold at a short-term or long-term loss. Three related traps deserve attention:
- The holding clock is not the purchase month. Trades settle one business day after execution, but the one-year test uses the trade date. A position bought on March 3, 2025 sold on March 3, 2026 is still short-term; March 4 qualifies.
- Reinvested dividends raise your basis. Every reinvested distribution added shares at a new cost. Funds and brokers report this on Form 1099-B, but older lots transferred from another broker often arrive with missing basis, and the IRS assumes zero unless you document it.
- Mutual fund capital gains distributions are taxed even if you never sold. A fund that rebalances internally can hand you a long-term gain in a year the fund itself lost money, which is why taxable accounts and high-turnover funds mix badly.
Four Moves That Change the Bill Before You Sell
- Harvest gains inside the 0% band. If your ordinary taxable income sits below the zero-rate ceiling, selling appreciated shares up to that ceiling costs 0% federal tax and resets your basis higher, reducing future gains. The window closes as soon as a raise, a bonus, or a Roth conversion fills the band.
- Split the sale across two calendar years. Halving a $100,000 gain can keep each half under a bracket ceiling and, for filers near a NIIT threshold, keep one year entirely below it.
- Check the calendar before you sell the last lot. If a position is 11 months old, the difference between selling today and selling in 60 days is often 10 to 17 percentage points of the gain. Model both in the calculator rather than guessing.
- Use the charitable route for concentrated positions. Donating appreciated shares to a donor-advised fund avoids recognizing the gain entirely and still produces a deduction at fair market value, which usually beats selling, paying the tax, and donating cash.
None of this is tax advice for your specific return. The value of the calculator is that it turns a vague worry about capital gains into a dollar figure you can compare against the cost of waiting, the risk of holding, or the price of a tax-planning hour with a CPA.
Frequently Asked Questions
Is one year exactly 365 days for the long-term rate?
The long-term rate applies only when the asset was held for more than one year. In practice the sale must happen after the one-year anniversary of the purchase date, so the earliest qualifying sale is the 366th day. Sell one day earlier and the entire gain is short-term, taxed at your ordinary 10%-37% rates.
Does the 0% capital gains bracket mean I pay nothing?
No — only the slice of your gain that fits inside the remaining 0% room after your ordinary taxable income is filled is free of federal tax. A single filer with $52,000 of wages has $35,900 of ordinary taxable income in 2026, which leaves only $13,550 of the $49,450 zero-rate ceiling for the gain. Everything above that is taxed at 15%.
Why is NIIT added on top of the capital gains rate?
The 3.8% Net Investment Income Tax is a separate surtax under Internal Revenue Code section 1411. Congress set the thresholds in 2013 ($200,000 single, $250,000 joint, $125,000 married filing separately) and never indexed them for inflation, so more filers cross them every year. It applies to the lesser of net investment income or MAGI above the threshold, which is why a large gain at a high income is fully exposed while the same gain at $120,000 of income is not.
How accurate is the state tax figure?
This calculator applies one flat rate that you enter to the whole gain, with a 5% default that approximates the middle of the 3%-9% range most states use. States with graduated brackets, preferential rates on long-term gains, or add-on taxes on investment income (California, Minnesota, New Jersey, and Washington's 7% excise tax on long-term gains above its annual standard deduction) need a blended rate you supply, while states with no income tax on wages (Texas, Florida, Nevada, South Dakota, Wyoming, Alaska, Tennessee, New Hampshire) can be entered as 0%. Confirm with a CPA before filing.