Capital Gains Tax Calculator 2026: Complete Guide to Short-Term & Long-Term Gain Taxes
Understand exactly how capital gains are taxed in 2026 โ including the 0%/15%/20% long-term brackets, the 3.8% NIIT surcharge, state-level taxes, and proven strategies to minimize your tax bill. Includes real-world examples with step-by-step math.
Introduction
Capital gains taxes are one of the most significant costs of investing โ but they're also one of the most manageable if you understand the rules. Whether you're selling stocks, cryptocurrency, real estate, or business assets, the tax treatment depends on how long you held the asset, your filing status, your total income, and what state you live in.
In 2026, the structure of capital gains taxation remains largely unchanged from recent years, but inflation adjustments have shifted the bracket thresholds upward. The long-term capital gains rates (0%, 15%, 20%) remain intact, and the 3.8% Net Investment Income Tax (NIIT) continues to apply for high-income earners. This guide covers everything you need to know, from basic definitions to advanced tax optimization strategies.
Try the Capital Gains Tax Calculator Now
Calculate your exact 2026 capital gains tax in seconds โ includes federal brackets, NIIT, and state tax adjustments.
Open Capital Gains Tax CalculatorWhat Are Capital Gains?
A capital gain is the profit you make when you sell a capital asset for more than you paid for it. Capital assets include stocks, bonds, mutual funds, ETFs, real estate, cryptocurrency, collectibles (art, antiques, coins), and business assets. The gain is calculated as:
Capital Gain = Sale Price โ (Purchase Price + Cost Basis Adjustments)
Cost basis adjustments include brokerage commissions, closing costs on real estate, capital improvements to property, legal fees, and transfer taxes. If you sell an asset for less than your adjusted cost basis, you have a capital loss, which can offset gains and reduce your tax bill.
Short-Term vs. Long-Term Capital Gains (2026 Rules)
The single most important factor in determining your capital gains tax rate is your holding period:
- Short-Term: Assets held for 1 year or less. Taxed as ordinary income at your marginal tax rate (10% to 37% for 2026).
- Long-Term: Assets held for more than 1 year. Taxed at preferential rates (0%, 15%, or 20% for 2026).
The holding period is measured from the day after acquisition to the day of sale. If you buy a stock on June 1, 2025, and sell it on June 2, 2026, it qualifies as long-term. If you sell on May 31, 2026, it's short-term. For tax purposes, the holding period matters by the day, not the month.
2026 Long-Term Capital Gains Tax Brackets
The following table shows the 2026 long-term capital gains tax brackets. Note that these thresholds are adjusted for inflation each year by the IRS:
| Rate | Single | Married Filing Jointly | Head of Household |
|---|---|---|---|
| 0% | Up to $49,450 | Up to $98,900 | Up to $66,200 |
| 15% | $49,451 โ $545,500 | $98,901 โ $613,700 | $66,201 โ $579,600 |
| 20% | Over $545,500 | Over $613,700 | Over $579,600 |
Net Investment Income Tax (NIIT) โ The 3.8% Surcharge
The NIIT applies an additional 3.8% tax on the lesser of your net investment income (including capital gains) or the amount by which your modified adjusted gross income (MAGI) exceeds:
- $200,000 โ Single, Head of Household, Qualifying Widow(er)
- $250,000 โ Married Filing Jointly
- $125,000 โ Married Filing Separately
Example: A single filer with $180,000 in wages and $50,000 in long-term capital gains has a MAGI of $230,000. NIIT applies to $30,000 ($230,000 โ $200,000 threshold) at 3.8% = $1,140 additional tax. This brings the effective federal rate on the $50,000 gain from 15% ($7,500) to 17.28% ($8,640).
State Capital Gains Taxes
Most states tax capital gains as ordinary income at your state's marginal income tax rate. The treatment varies significantly by state:
- No income tax (0%): Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming
- Flat rate: Colorado (4.4%), Illinois (4.95%), Indiana (3.15%), Massachusetts (5%), Michigan (4.25%), North Carolina (4.5%), Pennsylvania (3.07%), Utah (4.65%)
- Highest rates: California (up to 13.3%), Hawaii (up to 11%), New Jersey (up to 10.75%), Oregon (up to 9.9%), Minnesota (up to 9.85%), New York (up to 10.9%)
Some states offer preferential rates or deductions for long-term capital gains. For example, New Mexico allows a deduction for certain capital gains, and some states exempt gains on small business stock. Always check your state's specific rules โ the tax difference between California (13.3%) and Texas (0%) on a $100,000 gain is $13,300.
Real-World Calculation Examples
Example 1: The 0% Bracket Win (Moderate Earner, Long-Term)
Profile: Single filer, $47,000 ordinary income. Sold Amazon stock held for 4 years. Purchased at $10,000, sold at $25,000.
Gain: $15,000 (long-term).
Total Income: $62,000 ($47,000 + $15,000).
Long-Term Bracket: Her ordinary income of $47,000 uses most of the 0% bracket ($49,450 for single filers). The remaining 0% space is $2,450. Her $15,000 gain fills this space, then spills into the 15% bracket for the remaining $12,550.
Tax: ($2,450 ร 0%) + ($12,550 ร 15%) = $1,882.50.
NIIT: $62,000 is below $200,000 โ $0.
Effective Rate: 12.55%.
Example 2: Crypto Short-Term (High Earner, California)
Profile: Married Filing Jointly, $350,000 ordinary income. Sold Ethereum held for 6 months. Purchased at $30,000, sold at $95,000. California resident.
Gain: $65,000 (short-term).
Total Income: $415,000.
Short-Term Tax: Tax on $350,000 alone is ~$89,177. Tax on $415,000 is ~$113,017. Marginal tax on gain: $23,840 โ ~36.7% (32% bracket + phaseouts).
NIIT: $415,000 โ $250,000 = $165,000 โ $165,000 ร 3.8% = $6,270 allocated to gain.
CA State Tax (13.3%): $65,000 ร 13.3% = $8,645.
Total Tax on Gain: $23,840 + $6,270 + $8,645 = $38,755.
Net Gain After Tax: $26,245 โ effective combined rate of 59.6%. A painful reminder of why long-term holding matters, especially in high-tax states.
Tax-Loss Harvesting: Turn Losses Into Tax Savings
Tax-loss harvesting is the practice of selling investments at a loss to offset capital gains from other investments. It's one of the most powerful tools available to investors for reducing their tax liability.
Key rules to understand:
- Short-term losses offset short-term gains first; long-term losses offset long-term gains first.
- If net losses exceed net gains, you can deduct up to $3,000 per year ($1,500 if MFS) against ordinary income.
- Remaining losses carry forward indefinitely to future tax years (no expiration).
- The wash sale rule disallows losses if you buy substantially identical securities within 30 days before or after the sale โ but this rule does not apply to cryptocurrency (as of 2026).
Example: You have $20,000 in realized gains from selling Tesla stock. You also hold Nvidia stock with $12,000 in unrealized losses. By selling Nvidia (tax-loss harvesting), you reduce your net gain to $8,000. If you're in the 15% long-term bracket, this saves you $1,800 in federal tax ($12,000 ร 15%). You can then reinvest the proceeds immediately in a different fund (e.g., AMD instead of Nvidia) to maintain market exposure.
Other Capital Gains Tax Strategies
- Primary Residence Exclusion: If you've lived in your home for at least 2 of the last 5 years, you can exclude up to $250,000 of capital gains ($500,000 for married couples) from taxation. This is one of the most valuable tax breaks available.
- 1031 Like-Kind Exchange (Real Estate): For investment real estate (not personal residences), you can defer capital gains taxes indefinitely by reinvesting proceeds into a qualifying replacement property through a qualified intermediary.
- Opportunity Zones: Investing capital gains into Qualified Opportunity Funds allows you to defer and potentially reduce taxes on the original gain, plus exclude appreciation on the QOF investment held for 10+ years.
- Retirement Accounts: Capital gains within 401(k)s, IRAs, and other tax-advantaged accounts are not taxed at the time of sale. You only pay tax on withdrawals (traditional accounts) or pay no tax at all (Roth accounts).
Frequently Asked Questions (FAQs)
What are the 2026 long-term capital gains tax brackets?
For 2026, the 0% bracket applies up to $49,450 (single), $98,900 (MFJ), and $66,200 (HOH). The 15% bracket applies to income up to $545,500 (single), $613,700 (MFJ), and $579,600 (HOH). The 20% bracket applies above those thresholds. Short-term gains are taxed as ordinary income at rates from 10% to 37%.
How can I avoid paying capital gains tax legally?
Legal strategies include: holding assets for more than 1 year to qualify for lower long-term rates, keeping taxable income below the 0% bracket threshold, using tax-loss harvesting to offset gains, investing through tax-advantaged retirement accounts (401k, IRA), using the primary residence exclusion ($250K/$500K), and investing in Qualified Opportunity Zones for deferred gains.
Do I pay capital gains tax if I reinvest the proceeds?
Generally yes โ reinvesting proceeds from a sale does not exempt you from capital gains tax. The tax is triggered at the time of sale, regardless of what you do with the proceeds. The exception is a 1031 like-kind exchange for real estate, which allows tax deferral if you reinvest in a qualifying property through the proper channels.
What is the wash sale rule and does it apply to crypto?
The wash sale rule prohibits claiming a loss if you repurchase a substantially identical security within 30 days before or after the sale. This applies to stocks, ETFs, mutual funds, and options. As of 2026, the wash sale rule does not apply to cryptocurrency, making crypto uniquely flexible for tax-loss harvesting strategies. However, proposed legislation could change this in future years.
How are collectibles (art, antiques, coins) taxed?
Collectibles are taxed at a maximum rate of 28% for long-term gains, which is higher than the standard 20% maximum for other assets. Short-term collectibles gains are taxed as ordinary income at your marginal rate (up to 37%). Collectibles also do not qualify for the 0% long-term bracket โ the 28% rate is a flat maximum, not a bracket structure. Gains on collectibles are also subject to the 3.8% NIIT if applicable, pushing the top rate to 31.8%.
๐ Calculate Your 2026 Capital Gains Tax
Use our free Capital Gains Tax Calculator to estimate your exact tax liability in seconds. Includes federal brackets, NIIT surcharge, and state tax adjustments for stocks, crypto, and real estate.
Open Capital Gains Tax Calculator โRelated Calculators
- California 1099 Tax Calculator โ Calculate self-employment, federal, and California state taxes for 1099 contractors.
- Side Hustle Tax Calculator โ Estimate taxes on freelance and gig economy income.
- Solo 401k Contribution Calculator โ Maximize retirement tax savings.
- Rental Property ROI Calculator โ Analyze real estate investment returns and tax implications.