Capital Gains Tax Calculator (Federal, 2026)
Work out US federal tax on a capital gain for tax year 2026 — short-term vs long-term rates, the 0%/15%/20% bands, and the 3.8% Net Investment Income Tax. Free, no sign-up.
Total Federal Tax on This Gain
How It Works
When you sell an asset for more than you paid, the profit is a capital gain — and the federal tax on it depends on two things: how long you held the asset, and how much other taxable income you have. Hold it for one year or less and the gain is short-term, taxed at your ordinary income-tax rates (10% to 37% for 2026). Hold it for more than a year and it is long-term, taxed at the preferential rates of 0%, 15% or 20%.
That stacking is the key idea. Your long-term gain is added on top of your other taxable income, and each slice is taxed at the rate for its band. For 2026 the 0% band runs up to $49,450 of taxable income for single filers ($98,900 married filing jointly), the 15% band runs up to $545,500 ($613,700 jointly), and anything above that is taxed at 20%. So a gain can straddle two bands: part taxed at 0% and part at 15%, for example. This calculator slices the gain exactly that way.
On top of the capital gains tax, high earners also owe the Net Investment Income Tax (NIIT): a 3.8% surtax on the smaller of your net investment income and the amount by which your modified adjusted gross income (MAGI) exceeds $200,000 (single) or $250,000 (married filing jointly). Unlike the income-tax brackets, those NIIT thresholds are not indexed to inflation, so more people cross them every year. The calculator applies the NIIT to your gain when your MAGI is above the threshold.
Worked Example
Take a single filer with $60,000 of other taxable income who sells stock for a $20,000 long-term gain. The gain stacks on top of the $60,000, taking taxable income to $80,000 — entirely inside the 15% band (which runs from $49,450 to $545,500). The tax is simply $20,000 × 15% = $3,000. If the same gain were short-term, it would be taxed at ordinary rates: tax on $80,000 is $12,312 and tax on $60,000 is $7,912, so the gain costs $4,400. Holding for more than a year saves $1,400 on a $20,000 gain.
A straddling example shows the slicing. A single filer with $40,000 of other taxable income and a $20,000 long-term gain has total taxable income of $60,000. The first $9,450 of the gain (up to the $49,450 threshold) is taxed at 0%, and the remaining $10,550 at 15%, giving $1,582.50. And a high-income example: a single filer with $250,000 of other taxable income and a $100,000 long-term gain owes $15,000 of capital gains tax (all at 15%) plus NIIT of 3.8% × $100,000 = $3,800, because estimated MAGI of $366,100 clears the $200,000 threshold — a total of $18,800.
Assumptions
- Tax year 2026 only, federal tax only. All thresholds are from IRS Revenue Procedure 2025-32: the 0%/15% thresholds of $49,450 (single) and $98,900 (married filing jointly), and the 15%/20% thresholds of $545,500 (single) and $613,700 (jointly).
- Short-term gains are taxed at the 2026 ordinary rates: 10% to $12,400, 12% to $50,400, 22% to $105,700, 24% to $201,775, 32% to $256,225, 35% to $640,600 and 37% above (single); the married-filing-jointly bands are $24,800, $100,800, $211,400, $403,550, $512,450 and $768,700.
- Only single and married-filing-jointly statuses are supported, matching our federal income tax calculator. Head of household ($66,200 0% threshold) and married filing separately are not included.
- The NIIT is 3.8% on the smaller of the gain and the amount by which MAGI exceeds $200,000 (single) or $250,000 (jointly). If you leave MAGI blank, it is estimated as your other taxable income + the gain + the 2026 standard deduction ($16,100 single, $32,200 jointly) — a reasonable estimate, but enter your real MAGI for an exact result.
- Not included: state tax (most states tax gains as ordinary income), the 28% collectibles rate, the 25% rate on unrecaptured Section 1250 gain, the primary-home exclusion (up to $250,000 single / $500,000 jointly under Section 121), and any capital losses. Enter your net gain after losses.
The table below shows how the total tax on a $20,000 long-term gain changes with your other taxable income (single filer). The figures include the 3.8% NIIT where the estimated MAGI — other income plus the gain plus the $16,100 standard deduction — exceeds $200,000:
| Other taxable income | Total tax on a $20,000 gain | Effective rate |
|---|---|---|
| $0 | $0.00 | 0.0% |
| $30,000 | $82.50 | 0.4% |
| $49,450 | $3,000.00 | 15.0% |
| $100,000 | $3,000.00 | 15.0% |
| $300,000 | $3,760.00 | 18.8% |
| $545,500 | $4,760.00 | 23.8% |
| $600,000 | $4,760.00 | 23.8% |
The shape is striking: the tax jumps from $82.50 to $3,000 between $30,000 and $49,450 of other income, then stays flat at $3,000 all the way to $100,000 — the 15% band is very wide. At $300,000 it steps up to $3,760, because the 3.8% NIIT now adds $760 on top of the $3,000, and at $545,500 the 20% rate takes it to $4,760. That flat middle is why timing a sale around the band edges — and around the $200,000 NIIT threshold — can matter far more than the size of the gain itself.
How to Use This Calculator
Enter the gain (sale price minus cost basis), choose whether you held the asset for more than a year, pick your filing status, and enter your other taxable income — your taxable income excluding this gain, after deductions. If your income is near or above $200,000 (single) or $250,000 (jointly), enter your MAGI too, so the NIIT is calculated exactly; otherwise the estimate is close enough for planning.
The headline result is the total federal tax on the gain, including any NIIT. The table breaks it down by band, shows your effective rate and your after-tax proceeds, and the note underneath compares the two holding periods — so you can see exactly what waiting past the one-year mark is worth. Use the CSV download to keep the breakdown for your records.
Tips and Practical Advice
The single most valuable move is usually patience: holding an asset for more than a year before selling can cut the tax rate from your ordinary rate (often 22% or 24%) to 15% — or to 0% if your taxable income stays under $49,450 single or $98,900 jointly. If you are close to the one-year mark, a few extra weeks can be worth thousands of dollars.
Consider timing across tax years: if a large gain would push you over a band edge or the NIIT threshold, selling part in December and part in January splits the gain across two years and can keep more of it in the 0% or 15% band. The same logic applies to harvesting losses: selling a losing investment in the same year offsets gains dollar for dollar, and up to $3,000 of net losses a year can offset ordinary income. And remember that this calculator covers federal tax only — check your state's treatment too, since most states tax capital gains as ordinary income.
Sources: IRS Revenue Procedure 2025-32, sections 3.03 and 4.03 (2026 capital gains thresholds and ordinary brackets); IRS Topic No. 559 (Net Investment Income Tax, $200,000/$250,000 thresholds, not indexed); IRS Topic No. 409 (capital gains and losses). Last reviewed: 13 November 2026.
Built and tested by SumKitTool — see how we check our numbers.
Frequently Asked Questions
What counts as a long-term capital gain?
Any gain on an asset you held for more than one year before selling. One year exactly is short-term — the sale date must be more than a year after the purchase date. Long-term gains get the preferential 0%/15%/20% rates; short-term gains are taxed at ordinary income-tax rates.
How does the 0% capital gains rate work?
If your total taxable income — including the gain — stays under $49,450 for single filers or $98,900 for married couples filing jointly in 2026, your long-term gains are taxed at 0%. The gain stacks on top of your other income, so part of a gain can be taxed at 0% and the rest at 15%.
What is the 3.8% Net Investment Income Tax?
A surtax on net investment income — including capital gains, dividends and interest — that applies when your modified AGI exceeds $200,000 (single) or $250,000 (married filing jointly). It is charged on the smaller of your net investment income and the amount over the threshold. The thresholds are not indexed to inflation.
Do I pay state tax on capital gains too?
Usually yes. Most states tax capital gains as ordinary income, at your state's income-tax rate, and a few states have no income tax at all. This calculator covers federal tax only, so add your state's share when planning the total cost of a sale.
What about selling my home?
If you owned and lived in your home for at least two of the five years before the sale, you can exclude up to $250,000 of the gain ($500,000 for married couples filing jointly) under Section 121 of the tax code. This calculator does not apply the exclusion — enter your gain after subtracting any exclusion you qualify for.
Last updated: