How this capital gains tax calculator works
Enter your purchase price, sale price, the two dates, your filing status, and your taxable income before the gain. The calculator subtracts your cost basis from the sale proceeds to find the capital gain, uses the dates to classify it as short-term or long-term, then stacks the gain on top of your other taxable income to estimate the federal tax owed under the 2026 brackets from IRS Revenue Procedure 2025-32. The stacked bar chart shows both treatments side by side for the same gain — the visual version of the one-year-and-a-day cliff, and usually the most persuasive argument for patience an investor will see all year.
Two things the headline number deliberately excludes: state and local income tax, which in high-tax states can add double digits to the bill, and the 3.8% Net Investment Income Tax, which is flagged separately when your numbers suggest it applies. Both are covered below.
Short-term vs. long-term: the one-year-and-a-day rule
Federal law splits capital gains into two regimes based on how long you held the asset. Hold for one year or less and the gain is short-term, taxed as ordinary income at your regular bracket rate — anywhere from 10% to 37% in 2026. Hold for more than one year and the gain is long-term, taxed at the preferential 0%, 15%, or 20% rates. There is no sliding scale between them: at one year the gain is fully ordinary, at one year and a day it's fully preferential. That's the cliff this calculator is built around.
The counting rule trips people up every year. The IRS starts the holding-period clock the day after you acquire the asset, which means selling on the exact one-year anniversary of your purchase is still a short-term sale. Buy shares on March 1, 2025, and March 2, 2026 is the first day a sale qualifies for long-term treatment — hence "one year and a day." For a taxpayer in the 24% bracket sitting on a $50,000 gain, mistiming that single day costs roughly $4,500 in extra federal tax. When a position is approaching its anniversary, the calendar is worth checking twice.
2026 long-term capital gains brackets
For sales in 2026, long-term gains are taxed at three rates depending on your total taxable income — ordinary income plus the gain itself:
| Rate | Single | Married filing jointly | Head of household | Married filing separately |
|---|---|---|---|---|
| 0% | up to $49,450 | up to $98,900 | up to $66,200 | up to $49,450 |
| 15% | $49,450–$545,500 | $98,900–$613,700 | $66,200–$579,600 | $49,450–$306,850 |
| 20% | over $545,500 | over $613,700 | over $579,600 | over $306,850 |
The mechanics matter: long-term gains stack on top of your ordinary income, and each slice of the gain is taxed at the rate of the band it lands in. A single filer with $40,000 of taxable income and a $20,000 long-term gain pays 0% on the first $9,450 of the gain (the room left under $49,450) and 15% on the remaining $10,550 — about $1,583, not 15% of the whole thing. This is also why the 0% bracket is one of the most underused planning tools in the code: retirees and low-income years can absorb substantial long-term gains completely free of federal tax.
Short-term gains get no special table. They're simply added to your ordinary income and taxed through the regular 2026 brackets — 10%, 12%, 22%, 24%, 32%, 35%, and 37% — exactly as if you'd earned the money as salary.
The NIIT: high earners pay 3.8% more
If your modified adjusted gross income exceeds $200,000 (single or head of household), $250,000 (married filing jointly), or $125,000 (married filing separately), the Net Investment Income Tax adds 3.8% on net investment income — capital gains included — above the threshold. Those thresholds have never been indexed for inflation, so each year they quietly capture more taxpayers. NIIT applies on top of both regimes: a top-bracket earner's real federal rate is 23.8% on long-term gains and up to 40.8% on short-term ones. Because NIIT runs on MAGI rather than the taxable income figure this calculator uses, it's flagged here as a warning rather than folded into the headline estimate.
What this calculator doesn't model
Real tax returns have edges this estimate rounds off. State and local taxes aren't included — California taxes gains as ordinary income at up to 13.3%, while Texas, Florida, and Nevada take nothing. Collectibles held long-term are taxed at up to 28%, unrecaptured depreciation on rental real estate at up to 25%, and Qualified Small Business Stock may be partly excluded. Capital losses, loss carryforwards, the wash-sale rule, the $250,000/$500,000 home-sale exclusion, and the interaction of gains with credits and phase-outs are all out of scope. Treat the output as a well-informed estimate for ordinary stock, fund, and crypto sales — not a filing.
Once you know the tax cost of trading, the natural next question is what patient money does instead: the multi-phase compound interest calculator shows what an unsold, compounding position grows into, and the dollar-cost averaging calculator shows what steady buying does to your cost basis — which is, after all, the other half of every capital gains equation.
Frequently asked questions
How is capital gains tax calculated in 2026?
Sale price minus cost basis equals the gain. Held one year or less, it's taxed at your ordinary 2026 bracket rate (10–37%); held more than one year, at 0%, 15%, or 20% depending on total taxable income. The gain stacks on top of your other income to find the rate.
What's the difference between short-term and long-term gains?
Holding period. One year or less is short-term (ordinary rates, up to 37%); more than one year is long-term (0/15/20%). For most earners it's the difference between ~22–24% and 15% on the same profit.
What is the one-year-and-a-day rule?
The IRS starts counting the day after purchase, so selling on the exact one-year anniversary is still short-term. You need at least one year and one day. Buy March 1, 2025 → first long-term sale date is March 2, 2026.
What are the 2026 long-term capital gains brackets?
0% up to $49,450 single / $98,900 joint / $66,200 head of household; 15% up to $545,500 / $613,700 / $579,600; 20% above that (per IRS Rev. Proc. 2025-32). Thresholds count total taxable income including the gain.
Who qualifies for the 0% rate?
Anyone whose total taxable income — ordinary income plus the gain — stays under the 0% threshold. A married couple with $60,000 of taxable income can realize nearly $38,900 of long-term gains federally tax-free in 2026.
What is the NIIT?
An extra 3.8% federal tax on investment income (gains included) once MAGI exceeds $200,000 single / $250,000 joint / $125,000 married filing separately. Not indexed for inflation; applies on top of the capital gains rates.
Are state taxes included here?
No — this is federal only. Most states tax gains as ordinary income (California up to 13.3%); a handful, like Texas and Florida, don't tax them at all. Your real total can be meaningfully higher than the number shown.
Is the 3.8% NIIT included in the estimate?
Not in the headline number. The calculator flags when NIIT likely applies and indicates the rough extra cost, but NIIT runs on MAGI, which differs from the taxable income used here, so it can't be modeled exactly.
What income do I enter?
Taxable income excluding this gain — roughly Form 1040 line 15: income after your standard or itemized deduction. A single filer with an $80,000 salary and the $16,100 standard deduction enters about $63,900.
How do capital losses work?
Losses offset gains of the same type first, then the other type. Up to $3,000 of net losses per year deducts against ordinary income; the rest carries forward. Repurchasing within 30 days triggers the wash-sale rule and disallows the loss.
Do any assets get special rates?
Yes — collectibles up to 28%, unrecaptured real-estate depreciation up to 25%, Qualified Small Business Stock partly excludable, and a $250,000/$500,000 exclusion on a primary home. This tool models the standard 0/15/20% and ordinary treatment only.
Can waiting to sell reduce my tax?
Often dramatically — crossing the one-year-and-a-day line converts ordinary rates into 0/15/20%. Other levers: realize gains in low-income years, harvest losses, spread sales across years. But don't let a tax tail wag a falling investment.
This calculator is an estimate for education, not tax advice. It models 2026 federal rates only — state and local taxes and the 3.8% NIIT are not fully modeled, and special-rate assets, losses, and exclusions are out of scope. Confirm your actual liability with a CPA or tax professional before acting.