Capital Gains Tax Calculator

Estimate your federal capital gains tax on stocks, real estate, and other assets, including the 3.8% Net Investment Income Tax.

Purchase Price (Cost Basis)

Include purchase price plus any improvements or acquisition costs.

$
$0 $2M+

Sale Price

The gross proceeds from the sale before taxes.

$
$0 $2M+

Holding Period

Filing Status

Other Taxable Income

Your taxable income from wages, salary, etc. (excluding the gain above).

$
$0 $500K+
See your full federal bracket breakdown with our Tax Bracket Calculator
Total Estimated Tax
$0.00
on your capital gain
Capital Gain $0.00
Tax Rate 0%
Federal Capital Gains Tax $0.00
NIIT (3.8%) $0.00
Effective Tax Rate 0.0%
Net Proceeds After Tax $0.00

Estimates only. Does not include state capital gains taxes. Not tax or legal advice.

Get a Complete Tax Estimate

Tax Calculator US handles federal income tax, capital gains, deductions, and refund estimates all in one place.

How Capital Gains Tax Works

When you sell a capital asset (stocks, bonds, real estate, or other investments) for more than you paid, the profit is called a capital gain. The federal government taxes that profit, and the rate depends on two things: how long you held the asset and your total taxable income.

Your cost basis is typically the original purchase price plus any improvements or acquisition costs, like broker commissions. The gain is the sale price minus the cost basis. If you sell for less than you paid, you have a capital loss, and no tax is owed on the loss.

Short-term vs. long-term gains

The holding period is what determines your rate. Assets held for one year or less produce short-term capital gains, which are taxed at your ordinary income rate (10% to 37%). Hold for more than one year, and the gain qualifies for long-term rates: 0%, 15%, or 20%.

That rate gap can be as large as 17 percentage points, so waiting just one extra day past the one-year mark is one of the easiest ways to cut your tax bill.

How bracket stacking works

Capital gains are "stacked" on top of your ordinary income. Your wages, salary, and other income fill the lower tax brackets first. Then your gain is taxed starting wherever your ordinary income left off. In practice, this means a gain can span two brackets: part taxed at one rate, part at a higher rate.

2026 Capital Gains Tax Rates and Brackets

Long-Term Capital Gains Brackets

Tax RateSingleMarried Filing JointlyHead of HouseholdMarried Filing Separately
0%Up to $49,450Up to $98,900Up to $66,200Up to $49,450
15%$49,451 – $545,500$98,901 – $613,700$66,201 – $579,600$49,451 – $306,850
20%Over $545,500Over $613,700Over $579,600Over $306,850

2026 ordinary income tax brackets (short-term gains)

Short-term gains are added to your ordinary income and taxed at these rates:

RateSingleMarried Filing JointlyHead of HouseholdMarried Filing Separately
10%$0 – $12,400$0 – $24,800$0 – $17,700$0 – $12,400
12%$12,401 – $50,400$24,801 – $100,800$17,701 – $67,450$12,401 – $50,400
22%$50,401 – $105,700$100,801 – $211,400$67,451 – $105,700$50,401 – $105,700
24%$105,701 – $201,775$211,401 – $403,550$105,701 – $201,750$105,701 – $201,775
32%$201,776 – $256,225$403,551 – $512,450$201,751 – $256,200$201,776 – $256,225
35%$256,226 – $640,600$512,451 – $768,700$256,201 – $640,600$256,226 – $384,350
37%Over $640,600Over $768,700Over $640,600Over $384,350

Source: IRS Rev. Proc. 2025-32 (IR-2025-103), OBBB Sec. 70101 (P.L. 119-21).

The 3.8% Net Investment Income Tax (NIIT)

On top of the capital gains rate, high earners may owe an extra 3.8% surtax on investment income. Created by the Affordable Care Act (IRC Sec. 1411), the NIIT kicks in when your modified adjusted gross income (MAGI) exceeds these thresholds, which are not adjusted for inflation:

  • Single: $200,000
  • Married Filing Jointly: $250,000
  • Married Filing Separately: $125,000
  • Head of Household: $200,000

The tax applies to the lesser of your net investment income (here, the capital gain) or the amount your MAGI exceeds the threshold. So a high-income taxpayer with a long-term gain could face a combined top rate of 23.8% (20% + 3.8%).

Strategies to Reduce Capital Gains Tax

  1. Hold for more than one year to qualify for the lower long-term rates (0%, 15%, or 20%) instead of ordinary income rates (up to 37%).
  2. Tax-loss harvesting: Sell losing investments to offset gains dollar for dollar. Net losses above your gains can offset up to $3,000 of ordinary income per year.
  3. Primary residence exclusion: Under IRC Sec. 121, you can exclude up to $250,000 of gain ($500,000 for married filing jointly) on the sale of your primary home if you lived in it for at least 2 of the last 5 years.
  4. Tax-advantaged accounts: Hold investments in 401(k), IRA, or Roth IRA accounts where gains grow tax-deferred or tax-free.
  5. Donate appreciated stock: Donating appreciated securities to charity avoids the capital gain entirely and may give you a fair-market-value deduction.
  6. Time your sales: Realize gains in low-income years (like early retirement) to stay in the 0% long-term bracket.
  7. Qualified Opportunity Zones: Reinvest gains into QOZ funds for tax deferral and potential exclusion (made permanent under OBBB Sec. 70418).
  8. Step-up in basis at death: Under IRC Sec. 1014, inherited assets get a stepped-up basis, which wipes out unrealized gains for heirs.

This calculator covers standard capital gains on stocks, bonds, and real estate. Collectibles are taxed at a 28% max rate, and unrecaptured Section 1250 depreciation recapture tops out at 25%. For a full federal and state estimate, download Tax Calculator US.

Frequently Asked Questions

Common questions about capital gains tax in 2026

What is the capital gains tax rate for 2026?

Long-term gains are taxed at 0%, 15%, or 20% based on your taxable income and filing status. Short-term gains are taxed as ordinary income, so rates range from 10% to 37%.

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

It comes down to how long you held the asset. One year or less means short-term, taxed at ordinary income rates. More than one year means long-term, taxed at lower preferential rates.

How do I calculate capital gains tax on stocks?

Subtract your cost basis (what you paid, including commissions) from the sale price. That gives you the gain. Whether it's taxed at short-term or long-term rates depends on how long you held the stock.

What is the Net Investment Income Tax (NIIT)?

It's an extra 3.8% tax on investment income, including capital gains. It hits individuals whose modified adjusted gross income tops $200,000 (single) or $250,000 (married filing jointly).

Can I offset capital gains with capital losses?

Yes. Losses cancel out gains dollar for dollar. If your losses are bigger than your gains, you can deduct up to $3,000 of the net loss against ordinary income each year and carry the rest forward.

Do I pay capital gains tax on my primary residence?

You may be able to exclude up to $250,000 of gain ($500,000 if married filing jointly) when you sell your primary home, as long as you owned and lived in it for at least 2 of the last 5 years (IRC Sec. 121).

What is the maximum capital gains tax rate in 2026?

For long-term gains, the top federal rate is 20%. Add the 3.8% NIIT and that's 23.8%. Short-term gains can go as high as 37% plus the 3.8% NIIT, for a combined 40.8%.

Are capital gains taxed differently at the state level?

They are. Most states tax capital gains as ordinary income. Nine states have no income tax at all, and a few offer lower rates or exclusions for certain gains.

Need More Than a Quick Calculation?

Tax Calculator US estimates your refund, compares tax years side-by-side, and covers federal + state taxes in one place.

Estimate your refund Compare tax years Federal + state taxes Free to download