Capital Gains Tax Calculator
Estimate federal and state capital gains tax on stocks, real estate, cryptocurrency, and other investments. Enter your cost basis, sale price, holding period, and income to see your tax rate, total tax owed, and net gain after tax. Covers 2026 long-term and short-term rates, NIIT, and the Section 121 home sale exclusion.
Capital Gains Tax Calculator · 2026
Federal LT rates 0%/15%/20% · NIIT 3.8% · Section 121 exclusion · State tax estimates
Enter your investment details to estimate capital gains tax for 2026.
* Federal rates per IRS Rev. Proc. 2025-32. State rates are estimates only; verify with your state tax authority. NIIT applies when MAGI exceeds $200K (single) or $250K (MFJ). Section 121 requires 2-of-5-year ownership and use. Does not include depreciation recapture (25% max on rental property). Consult a tax professional for your complete tax liability.
What Are Capital Gains Taxes?
Capital gains taxes are federal (and usually state) taxes on the profit earned when you sell a capital asset for more than you paid for it. Capital assets include stocks, bonds, ETFs, mutual funds, real estate, cryptocurrency, and collectibles. The tax applies only to the gain, the difference between what you paid (cost basis) and what you received (proceeds), minus any selling costs.
The federal rate depends on two factors: how long you held the asset and your total taxable income. Assets held more than one year qualify for preferential long-term rates of 0%, 15%, or 20%. Assets held one year or less are taxed as ordinary income at your marginal rate, which can run from 10% to 37%. The OBBBA (signed July 4, 2025) made these rates permanent with no expiration date.
2026 Long-Term Capital Gains Tax Rates
Long-term capital gains tax rates apply to assets held more than one year. Rates are based on taxable income, meaning your adjusted gross income after the standard deduction (or itemized deductions), rather than your gross income. The 2026 thresholds reflect a 2.7% inflation adjustment from 2025 (IRS Rev. Proc. 2025-32).
| Rate | Single Filers | Married Filing Jointly | Head of Household | MFS |
|---|---|---|---|---|
| 0% | Up to $49,450 | Up to $98,900 | Up to $66,750 | Up to $49,450 |
| 15% | $49,451 to $533,400 | $98,901 to $600,050 | $66,751 to $566,700 | $49,451 to $300,025 |
| 20% | Over $533,400 | Over $600,050 | Over $566,700 | Over $300,025 |
* Based on taxable income (after standard deduction or itemized deductions). Source: IRS Revenue Procedure 2025-32. Rates made permanent by the OBBBA (July 4, 2025).
Short-Term Capital Gains Tax Rates 2026
Assets held one year or less produce short-term capital gains taxed as ordinary income at your marginal federal bracket. These rates are significantly higher than long-term rates for most earners, which is why holding an asset even one additional day past the one-year mark can substantially reduce your tax bill.
| Taxable Income (Single) | Short-Term Rate |
|---|---|
| Up to $11,925 | 10% |
| $11,926 to $48,475 | 12% |
| $48,476 to $103,350 | 22% |
| $103,351 to $197,300 | 24% |
| $197,301 to $250,525 | 32% |
| $250,526 to $626,350 | 35% |
| Over $626,350 | 37% |
Net Investment Income Tax (NIIT): The 3.8% Surtax
High-income investors pay an additional 3.8% Net Investment Income Tax on capital gains when their modified adjusted gross income (MAGI) exceeds certain thresholds. The NIIT applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold.
| Filing Status | MAGI Threshold | Effective Federal CG Rate (LT) |
|---|---|---|
| Single / HoH | $200,000 | 15% + 3.8% = 18.8%, or 20% + 3.8% = 23.8% |
| Married Filing Jointly | $250,000 | 15% + 3.8% = 18.8%, or 20% + 3.8% = 23.8% |
| Married Filing Separately | $125,000 | Same effective rates |
* NIIT thresholds have been fixed at these levels since 2013 and are not adjusted for inflation, meaning more taxpayers hit this threshold every year. NIIT applies on top of regular capital gains rates and state taxes.
NIIT example: A single filer has $250,000 MAGI and $80,000 in long-term capital gains. Their MAGI exceeds the $200,000 threshold by $50,000. NIIT applies to the lesser of $80,000 (net investment income) or $50,000 (excess MAGI). NIIT = $50,000 × 3.8% = $1,900. Federal long-term CG tax = $80,000 × 15% = $12,000. Total federal tax on the gain = $13,900.
Real Estate Capital Gains Tax: The Section 121 Exclusion
Homeowners receive an enormous tax benefit when selling a primary residence. Under Section 121 of the Internal Revenue Code, you can exclude up to $250,000 of gain from federal tax if filing single, or up to $500,000 if married filing jointly. To qualify, you must meet two tests:
- Ownership test: You owned the home for at least 2 of the 5 years before the sale date.
- Use test: You lived in the home as your primary residence for at least 2 of the 5 years before the sale date.
The two years can be non-consecutive, and the ownership and use periods can overlap but are counted separately. You can only claim this exclusion once every two years.
Investment Property and Depreciation Recapture
Rental and investment properties are subject to the full capital gains tax with no Section 121 exclusion. Additionally, if you claimed depreciation deductions during ownership, the IRS recaptures those deductions at a maximum rate of 25% when you sell, even if the overall gain qualifies for the lower long-term rate. A 1031 exchange lets real estate investors defer all capital gains tax by reinvesting proceeds into another qualifying investment property within strict time limits (45 days to identify, 180 days to close).
Special Capital Gains Tax Rates in 2026
| Asset Type | Rate | Notes |
|---|---|---|
| Stocks, ETFs, Funds (LT) | 0%, 15%, or 20% | Standard long-term rates based on income bracket |
| Stocks, ETFs, Funds (ST) | 10%–37% | Ordinary income rates apply |
| Cryptocurrency | Same as stocks | LT or ST depending on holding period; each transaction is a taxable event |
| Collectibles (art, coins, metals) | Max 28% LT | 25% and 28% brackets cap at this rate; ST taxed as ordinary income |
| Unrecaptured §1250 gain (real estate) | Max 25% | Depreciation recapture on real estate; applies to the portion previously depreciated |
| QSBS (§1202 qualified small business stock) | 0% (up to $10M) | 100% exclusion for qualifying stock held more than 5 years; state treatment varies |
| Inherited assets | LT rates apply | Step-up in cost basis to fair market value at date of death; gain measured from that point |
How to Reduce Capital Gains Tax Legally
Hold Investments More Than One Year
The single most powerful lever on capital gains tax is the holding period. Selling one day too soon can push a gain from a 15% rate to a 22% or 24% rate for a middle-income earner. On a $50,000 gain, the difference between a 15% long-term rate and a 22% short-term rate is $3,500 in additional federal tax. Set a calendar alert for the one-year date on any significant position you're considering selling.
Tax-Loss Harvesting
Capital losses offset capital gains dollar for dollar. If you sell a losing position, the loss reduces your taxable gain for the year. Losses in excess of gains can offset up to $3,000 of ordinary income per year, with any remaining balance carried forward to future years. The wash-sale rule prevents you from repurchasing the same or substantially identical security within 30 days before or after the sale and still claiming the loss.
Use Tax-Advantaged Accounts
Stocks and funds held inside a 401(k), traditional IRA, or Roth IRA are completely sheltered from capital gains tax while in the account. Roth IRA gains are tax-free at qualified withdrawal, the best possible outcome for long-term investors. Selling high-appreciation assets inside these accounts produces zero immediate capital gains tax.
Manage Taxable Income to Stay in a Lower Bracket
Strategic retirement contributions (401k, SEP-IRA, solo 401k), deductible IRA contributions, and charitable giving can all reduce your taxable income. Dropping below the 0% capital gains threshold (e.g., $49,450 for single filers in 2026) means long-term gains are completely tax-free at the federal level. This strategy is most powerful for retirees and people in transition years.
