Capital Gains Tax Calculator 2026

Calculate your 2026 capital gains tax on stocks, real estate, and other investments. See short-term vs long-term rates and how much you save by holding longer.

📋 2026 Updated⚡ Instant🔒 Private✓ Free

Capital gains tax in 2026

Capital gains tax is one of the most impactful and misunderstood parts of the tax code for investors. In 2026, long-term capital gains on investments held over one year are taxed at preferential 0%, 15%, or 20% rates — significantly lower than ordinary income tax rates. Short-term gains on assets held less than one year are taxed at your ordinary income rate, which can be as high as 37%. High-income investors also owe the 3.8% Net Investment Income Tax (NIIT) on investment income. For home sellers, the Section 121 exclusion allows up to $250,000 (single) or $500,000 (married) of primary residence gains to be tax-free. Strategic tax-loss harvesting — selling losing positions to offset gains — is a key year-end tax planning tool.

How Capital Gains Tax Is Calculated

Capital gains tax uses a "stacking" method where your ordinary income fills the lower tax tiers first, and your capital gains sit on top. This determines which capital gains rate applies. For short-term capital gains (assets held one year or less), the gain is added directly to ordinary income and taxed at your marginal bracket rate — the same as wages. If you are in the 22% income bracket, your short-term gains are taxed at 22%, not at preferential rates.

For long-term capital gains (assets held more than one year), the IRS uses separate preferential rate thresholds. Your ordinary income fills the stack first, and the long-term gain sits above it. The 2026 long-term capital gains thresholds for single filers: 0% on total income up to $48,350; 15% on income up to $533,400; 20% above $533,400. An investor with $40,000 ordinary income has "room" for $8,350 of long-term gains at the 0% rate before the 15% rate kicks in. High-income investors (above $200,000 single / $250,000 MFJ) also owe the 3.8% Net Investment Income Tax on investment income.

Total CG Tax = (Short-term gains × Ordinary rate) + (Long-term gains × LT rate) + NIIT if applicable

Capital losses offset gains dollar-for-dollar in the same year. Short-term losses first offset short-term gains; long-term losses first offset long-term gains. Any remaining net losses can offset the opposite type, and up to $3,000 of net capital losses can be deducted against ordinary income annually, with unlimited carryforward to future years.

Worked Example: Stock Sale with Mixed Gains

David, a single filer with $60,000 ordinary income, sells two stock positions: 500 shares of Company A held for 14 months at a $25,000 long-term gain, and 200 shares of Company B held for 8 months at a $5,000 short-term gain. He also harvests $8,000 in losses from an underperforming fund.

Short-term gain: $5,000
Long-term gain: $25,000
Capital losses harvested: −$8,000
Net: $5,000 STCG + $17,000 LTCG
Short-term tax ($5,000 at 22%): $1,100
Long-term tax ($17,000 at 15%): $2,550
NIIT (income under $200K): $0
Total capital gains tax: $3,650

If David had sold Company A after only 11 months (short-term), his $25,000 gain would be taxed at 22% = $5,500 — $2,950 more. Waiting three additional months saved him nearly $3,000 in tax. This is the single most powerful lever in capital gains planning.

The $8,000 in harvested losses saved David approximately $1,200 in taxes ($1,100 on STCG + $2,550 LTCG offset). Without the tax-loss harvest, his total capital gains tax would have been $5,500 — $1,850 more. Combined, the holding period choice and tax-loss harvest together saved $4,800 on the same underlying investments.

Key Factors That Affect Your Capital Gains Tax

  • Holding period (the most critical factor)

    Selling after one year and one day qualifies a gain for long-term preferential rates (0%, 15%, or 20%) instead of ordinary income rates (up to 37%). For an investor in the 22% ordinary income bracket, the difference between short-term and long-term treatment on a $50,000 gain is $3,500 ($7,500 vs. $11,000). Even for investors in lower brackets, the 0% long-term rate on gains when total income is below $48,350 can eliminate capital gains tax entirely.

  • Total taxable income (determines which LT rate applies)

    Long-term capital gains rates are not determined by the gain alone — they depend on where your total income (ordinary + LT gains) falls relative to the preferential rate thresholds. A retiree with low ordinary income may pay 0% on substantial long-term stock gains. A tech executive with $400,000 in W-2 income pays 20% on all long-term gains plus 3.8% NIIT, for an effective 23.8% rate.

  • Tax-loss harvesting

    Strategically selling positions at a loss to offset gains is one of the most effective tax reduction strategies available to investors. Losses carry forward indefinitely and can offset gains in future years with no time limit. The $3,000 annual ordinary income offset limit is modest, but the ability to carry forward large loss banks from a market downturn to offset future gains is extremely valuable over a long investment horizon.

  • Net Investment Income Tax (NIIT)

    The 3.8% NIIT applies to the lesser of net investment income or the amount by which MAGI exceeds $200,000 (single) / $250,000 (MFJ). This raises the effective top long-term rate to 23.8% and the top short-term rate to 40.8% for affected high earners. The NIIT threshold is not inflation-adjusted, so more taxpayers cross it each year. Strategies like Roth conversions in lower-income years can reduce future NIIT exposure.

  • State capital gains treatment

    Most states tax capital gains as ordinary income at full state rates. California taxes all gains at up to 13.3%; Oregon at up to 9.9%; Minnesota at up to 9.85%. These state taxes stack on top of federal rates, meaning California investors can face effective rates above 37% on short-term gains. A handful of states — including Washington (7% excise tax on gains over $262,000) — have targeted capital gains levies rather than treating them as ordinary income.

Sponsored

File Your Federal & State Taxes Online

E-file.com offers the same features as TurboTax and H&R Block at half the price. Free federal filing available if you qualify. 40% cheaper than the big names.

File Your Taxes Now →

We earn a commission if you file through this link at no extra cost to you.

Frequently Asked Questions

What is the capital gains tax rate for 2026?

The 2026 long-term capital gains tax rates for single filers are: 0% on gains when total income is up to $48,350; 15% on gains when income is $48,351–$533,400; and 20% on gains when income exceeds $533,400. For married filing jointly: 0% up to $96,700; 15% up to $600,050; 20% above that. Short-term capital gains (assets held under one year) are taxed as ordinary income at your marginal tax bracket rate, which can be as high as 37%. High-income taxpayers also owe the 3.8% Net Investment Income Tax (NIIT).

What is the difference between short-term and long-term capital gains?

Short-term capital gains are profits from assets held for one year or less. These are taxed as ordinary income at your regular federal income tax bracket rates (10%–37%). Long-term capital gains come from assets held longer than one year and qualify for preferential tax rates of 0%, 15%, or 20% depending on your taxable income. The tax savings from holding an investment longer than one year can be substantial — for a taxpayer in the 22% bracket, long-term gains are taxed at just 15%, a savings of 7 percentage points.

How do I avoid capital gains tax on home sale?

Under Section 121 of the tax code, you can exclude up to $250,000 of capital gains from selling your primary residence ($500,000 for married filing jointly). To qualify, you must have owned the home and lived in it as your primary residence for at least 2 of the 5 years before the sale. This exclusion can be used once every 2 years. Any gain above the exclusion amount is taxed as long-term capital gains if you owned the home for more than one year.

What is net investment income tax?

The Net Investment Income Tax (NIIT) is an additional 3.8% tax on investment income for higher earners. It applies to the lesser of: your net investment income (capital gains, dividends, interest, rental income) or the amount by which your modified AGI exceeds the threshold ($200,000 for single filers, $250,000 for married filing jointly in 2026). This means high-income investors may effectively pay 23.8% on long-term capital gains (20% + 3.8% NIIT) or up to 40.8% on short-term gains (37% + 3.8% NIIT).

Can capital losses offset capital gains?

Yes. Capital losses can offset capital gains dollar-for-dollar. Short-term losses first offset short-term gains; long-term losses first offset long-term gains. Net remaining losses can offset the other type. If total capital losses exceed capital gains, you can deduct up to $3,000 of net capital losses against ordinary income per year. Any remaining losses carry forward to future tax years indefinitely. This strategy — called tax-loss harvesting — is commonly used to reduce capital gains tax liability.