Capital Gains Tax Calculator 2026
Calculate your federal capital gains tax, NIIT surcharge, and state tax — with a full bracket breakdown
Last reviewed:
Data sources: IRS Topic No. 409 (Capital Gains and Losses), IRS Publication 550 (Investment Income and Expenses), IRC §1(h) — Maximum Capital Gains Rate, IRC §1411 — Imposition of Tax (Net Investment Income), IRS Revenue Procedure 2024-40 (2025 Inflation Adjustments)
What Is Capital Gains Tax?
When you sell an asset — a stock, bond, mutual fund, real estate, or business — for more than you paid, the profit is a capital gain. Capital gains are taxable income, but they get special treatment under the tax code: long-term gains (from assets held more than one year) are taxed at significantly lower rates than ordinary income. Short-term gains receive no preferential treatment and are taxed at whatever marginal rate applies to your other income.
Understanding capital gains taxes is essential for every investor. The difference between a short-term and long-term gain on a $100,000 profit can represent $10,000 to $25,000 in additional taxes — a meaningful figure that smart timing can avoid.
How Capital Gains Tax Works
Step 1: Classify the gain — short-term or long-term
The holding period determines the tax treatment. Hold an asset for 366 days or more (more than one year) and it qualifies for long-term rates. Hold it 365 days or fewer and it’s short-term. The clock starts the day after purchase and ends on the sale date.
Step 2: Determine your long-term capital gains rate (LTCG)
LTCG rates depend on your total taxable income, including the gain. The 2026 estimated brackets for single filers:
| Rate | Income Threshold (Single, 2026 est.) |
|---|---|
| 0% | Up to $49,550 |
| 15% | $49,550 – $546,700 |
| 20% | Above $546,700 |
For married filing jointly, the thresholds are approximately double: 0% up to $99,100, then 15% up to $615,050.
Step 3: Stack the gain on top of ordinary income
Capital gains don’t replace ordinary income — they sit on top of it. If you have $60,000 of ordinary income (after deductions) and $40,000 of long-term gains, the gains are taxed at whatever LTCG rate applies starting from $60,000 upward. In this example, the 0% bracket for a single filer ends at $49,550, so:
- $0 of the gain is in the 0% bracket (ordinary income already above the threshold)
- All $40,000 is in the 15% bracket
- Tax: $40,000 × 15% = $6,000
Step 4: Check for the Net Investment Income Tax (NIIT)
A 3.8% surcharge applies if your modified AGI exceeds $200,000 (single) or $250,000 (MFJ). It applies to the lesser of your investment income or your MAGI above the threshold.
Step 5: Add state capital gains tax
Most states tax capital gains as ordinary income. Add your state’s rate to get the total effective rate.
A Worked Example
Sarah is single, earns $85,000 in wages, and sells stock for a $60,000 long-term capital gain. Her taxable income (after deductions) is $73,200. She lives in Texas (no state income tax).
Ordinary income: $73,200 (already above the $49,550 0% LTCG threshold)
All $60,000 falls in the 15% bracket ($73,200 + $60,000 = $133,200, well below the 20% threshold of $546,700)
NIIT: Total income $133,200, below the $200,000 single threshold — $0 NIIT
Federal tax: $60,000 × 15% = $9,000
Effective rate: 15%
After-tax gain: $60,000 − $9,000 = $51,000
If Sarah had sold after holding only 11 months (short-term), at her 22% marginal rate the tax would be $13,200 — a $4,200 difference for waiting two more months.
The Complete Capital Gains Tax Guide
The 0% Rate: The Most Underused Tax Benefit in Investing
The 0% long-term capital gains rate is one of the most valuable planning opportunities in the tax code — and one of the least utilized. Most investors assume that gains mean tax. But if your total taxable income (including the gain) stays below the 0% threshold, you can realize significant gains completely tax-free.
Who qualifies: Early retirees, FIRE practitioners, and low-income years are the primary candidates. A married couple withdrawing $60,000 from taxable investments in an early retirement year with no other income has $99,100 of 0% LTCG capacity. They can realize up to $39,100 of long-term gains ($99,100 − $60,000) at a 0% federal rate — selling appreciated positions, resetting their cost basis, and paying no federal capital gains tax whatsoever.
Strategic harvesting: Even if you don’t need the money, realizing gains in low-income years (“tax gain harvesting”) resets your cost basis higher. You immediately buy back the same position at the new price. When you eventually sell in a higher-income year, your taxable gain is smaller because your basis is higher. This is the mirror image of tax-loss harvesting — and equally powerful in the right circumstances.
Short-Term Gains: The Rate That Hurts
Short-term capital gains are taxed at ordinary income rates — the same brackets that apply to wages and salary. For investors in the 22%, 24%, or higher brackets, short-term gains are expensive.
Common short-term gain scenarios:
- Active traders who buy and sell within a year (the holding period clock resets on every position)
- Options traders whose short options expire worthless after less than a year
- Stock compensation — RSUs vest as ordinary income, and shares sold within a year of vesting generate short-term gains on price appreciation since vesting
The practical implication: whenever possible, wait until the 366-day mark before selling a profitable position. A few weeks of additional holding can mean thousands in tax savings at higher income levels.
NIIT: The Hidden Surcharge on Investment Income
The Net Investment Income Tax (NIIT) is a 3.8% federal surtax that applies to investment income — capital gains, dividends, interest, rental income, royalties — for taxpayers above the MAGI thresholds ($200,000 single, $250,000 MFJ). It was enacted as part of the Affordable Care Act and operates independently of the regular capital gains rates.
The NIIT is calculated on the lesser of:
- Your net investment income, or
- The excess of your MAGI above the threshold
This means a single filer with $220,000 MAGI, $50,000 of which is long-term gains, pays NIIT on min($50,000, $20,000) = $20,000. NIIT = $20,000 × 3.8% = $760.
For taxpayers well above the threshold, the NIIT effectively adds 3.8% to whatever capital gains rate applies — pushing the all-in federal rate to 18.8% (15% + 3.8%) or 23.8% (20% + 3.8%) for long-term gains.
State Capital Gains Taxes
Federal rates get most of the attention, but state taxes can add 5–13% to your capital gains bill. Key state situations for investors:
No income tax states (0% capital gains): Florida, Texas, Nevada, Wyoming, Alaska, South Dakota, Tennessee, New Hampshire. Moving to one of these states before a major liquidity event (business sale, large stock sale) is a legitimate — and substantial — tax strategy.
California (up to 13.3%): California taxes all capital gains, short and long-term, as ordinary income at regular California rates. The top rate of 13.3% applies above $1 million. Unlike federal law, California provides no preferential LTCG treatment.
Washington (7% on gains above $262,000): Washington has no income tax but enacted a 7% excise tax on capital gains exceeding $262,000 per year, starting in 2023. Real estate gains are excluded.
New York (up to 10.9% + NYC): New York taxes capital gains as ordinary income. New York City residents pay an additional local tax.
Installment Sales: Spreading a Large Gain
If you’re selling a business, property, or large asset and have control over payment terms, an installment sale allows you to spread the gain — and the taxes — over multiple years. You receive payment over time, recognizing income as each payment arrives.
Benefits: spreading a large gain avoids pushing into higher brackets in a single year; may keep income below NIIT thresholds; provides flexibility around other income fluctuations.
Drawbacks: you take credit risk on the buyer; if tax rates rise, deferring income may not help. Not available for publicly traded stock.
Qualified Opportunity Zones
A Qualified Opportunity Zone Fund investment allows you to defer, and potentially reduce, capital gains taxes by reinvesting gains within 180 days into a Qualified Opportunity Fund (QOF). The capital gain is deferred until the investment is sold or December 31, 2026 (whichever comes first), and gains from the QOF itself may be tax-free if held 10 years.
The 2026 deadline for the gain deferral benefit means the window on this strategy is closing. The 10-year holding period for tax-free appreciation on the QOF gain itself remains available for new investments — only the upfront deferral benefit sunset is approaching.
Key Assumptions and Limitations
Brackets are 2026 estimates. The calculator uses 2026 estimated thresholds based on 2025 IRS figures with approximate inflation adjustment. Final 2026 IRS tables should be verified at IRS.gov before filing.
Single-sale calculation. The calculator evaluates one capital gain against all ordinary income. Multiple gains in a year — some short-term, some long-term — should be netted by asset class before using the calculator.
State taxes are a manual input. State rules vary widely; some states have graduated capital gains rates, deductions, or exemptions not captured by a flat rate. Consult your state tax authority for precise rates.
AMT is not modeled. The Alternative Minimum Tax can interact with large capital gains in certain situations. This is uncommon for investment gains but may be relevant for incentive stock option exercises.
Cost basis tracking is not verified. The calculator accepts any gain amount. In practice, your gain is your proceeds minus your adjusted cost basis. Use your brokerage’s 1099-B or cost basis records for accurate gain figures.
Frequently Asked Questions
What is the capital gains tax rate for 2026?
Long-term capital gains (assets held more than one year) are taxed at 0%, 15%, or 20% depending on your taxable income and filing status. For 2026, single filers pay 0% on gains when total income stays below approximately $49,550; 15% up to about $546,700; and 20% above that. Married filing jointly thresholds are roughly double the single thresholds. Short-term gains — from assets held one year or less — are taxed as ordinary income at your marginal rate, which ranges from 10% to 37%.
What is the Net Investment Income Tax (NIIT)?
The NIIT is a 3.8% surcharge on investment income — including capital gains — for higher-income taxpayers. It applies to the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). The NIIT is not reduced by the preferential LTCG rates — if you're above the threshold, you pay 3.8% on top of whatever capital gains rate applies. This pushes the effective top rate on long-term gains to 23.8% (20% + 3.8%).
What's the difference between short-term and long-term capital gains?
The holding period — how long you owned the asset before selling — determines which rate applies. Hold an asset for more than one year (one year and one day) and any profit is a long-term capital gain, taxed at the preferential 0/15/20% rates. Hold it for one year or less and any profit is a short-term capital gain, taxed as ordinary income at your marginal rate (up to 37%). The difference can be enormous: a $50,000 gain at 22% short-term costs $11,000; at 15% long-term, just $7,500.
Do states tax capital gains?
Most states tax capital gains as ordinary income at the state's income tax rate. California taxes long-term gains at the same rate as regular income (up to 13.3% at the top bracket) — the highest state capital gains tax in the nation. New York taxes gains at up to 10.9% plus NYC local tax if applicable. Nine states have no income tax: Florida, Texas, Nevada, Washington (with some exceptions), Wyoming, Alaska, South Dakota, Tennessee, and New Hampshire. Washington state enacted a 7% excise tax on capital gains above $262,000 starting in 2023.
How can I reduce my capital gains tax?
Key strategies: (1) Hold assets more than one year to qualify for LTCG rates. (2) Harvest losses to offset gains — selling losing positions reduces net taxable gain. (3) Time gains to lower-income years when you may qualify for the 0% rate. (4) Use tax-advantaged accounts (IRA, 401k) for high-turnover investments where gains would otherwise be short-term. (5) Donate appreciated assets to charity — you avoid the capital gains tax entirely and get a deduction at full fair market value. (6) Use a Qualified Opportunity Zone Fund to defer and potentially reduce gains.
What qualifies for the 0% long-term capital gains rate?
Any long-term capital gain qualifies for the 0% rate — there is no special asset class requirement. What matters is your total taxable income (ordinary income plus gains combined). If that total stays below approximately $49,550 for single filers or $99,100 for married filing jointly in 2026, the long-term gain is taxed at 0%. This creates a major planning opportunity: retirees and early retirees with low ordinary income can realize substantial capital gains completely tax-free each year by managing income below the 0% threshold.