Capital Gains Tax: 2026 and 2027 Rates and How to Calculate It

Learn how short- and long-term capital gains are taxed, the 2026 and 2027 brackets, the 3.8% net investment income tax and how losses lower the bill.

Published

Free tool: Capital Gains Tax Calculator

When you sell an investment for more than you paid, the profit is a capital gain, and the tax on it depends mostly on how long you held the investment. This guide explains the federal rules, the 2026 and 2027 brackets and the net investment income tax, using the free Capital Gains Tax Calculator.

Short-term and long-term gains

  • Short-term: held one year or less. Taxed as ordinary income, at your regular rate of up to 37%.
  • Long-term: held more than one year. Taxed at 0%, 15% or 20%, depending on your taxable income.

Your gain is the sale price minus your cost basis: what you paid, including fees.

Long-term capital gains brackets

The rate depends on your total taxable income, including the gain.

2026:

Filing status0% up to15% up to20% above
Single$49,450$545,500$545,500
Married filing jointly$98,900$613,700$613,700
Head of household$66,200$579,600$579,600
Married filing separately$49,450$306,850$306,850

2027:

Filing status0% up to15% up to20% above
Single$51,050$563,200$563,200
Married filing jointly$102,100$633,600$633,600
Head of household$68,350$598,400$598,400
Married filing separately$51,050$316,800$316,800

These limits come from IRS Revenue Procedures 2025-32 and 2026-35.

Example

You're single and sell stock for $25,000 that you bought for $10,000, a $15,000 gain. Your other income in 2026 is $85,000, and you take the $16,100 standard deduction:

  • Taxable income without the gain: $85,000 − $16,100 = $68,900
  • The gain stacks on top, from $68,900 to $83,900, all within the 15% bracket.
  • Long-term tax: $2,250 (15% of $15,000)
  • Short-term tax: $3,300 (22%, your ordinary rate)

Holding the stock for more than a year saves $1,050.

The 0% bracket

If your taxable income including the gain stays under the 0% limit, long-term gains are tax-free. With $50,000 of other income, taxable income before the gain is $33,900, so the same $15,000 gain brings it to $48,900, under the $49,450 limit for 2026, and you'd owe $0 of federal tax on it.

The net investment income tax

Higher earners pay an extra 3.8% on investment income, including capital gains, when modified adjusted gross income is over $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). These thresholds are set by law and don't rise with inflation.

A married couple with $180,000 of other income who sell for a $600,000 long-term gain in 2027:

  • Capital gains tax: $95,660 (15% on $486,800 and 20% on $113,200)
  • Net investment income tax: 3.8% × ($780,000 − $250,000) = $20,140
  • Total: $115,800, or 19.3% of the gain

Capital losses

Losses offset gains first. If you still have a net loss, up to $3,000 a year ($1,500 if married filing separately) can reduce your other income, and the rest carries forward to later years until it's used up.

Selling for $10,000 an investment that cost $25,000 gives a $15,000 loss. With $85,000 of other income, you deduct $3,000 this year, saving about $660 at the 22% rate, and carry $12,000 forward.

Selling at a loss and buying the same investment back within 30 days is a wash sale, and the loss can't be claimed for now.

What this doesn't cover

  • Collectibles such as coins and art are taxed at up to 28%.
  • Depreciation recapture on property (unrecaptured section 1250 gain) is taxed at up to 25%.
  • State taxes vary: many states tax capital gains as ordinary income, and some have no income tax.
  • Home sales may qualify to exclude up to $250,000 of gain ($500,000 for married couples).

How to use the Capital Gains Tax Calculator

  1. Open the Capital Gains Tax Calculator.
  2. Choose the tax year and whether you held the investment for more than a year.
  3. Enter your filing status, the purchase price including fees and the sale price.
  4. Enter your other income for the year, and take the standard deduction or enter itemized deductions, plus your state's tax rate if you want to include it.
  5. Read the results: the tax on your gain and the effective rate, split into federal tax, the net investment income tax and state tax, with the tax if you'd held for the other period, a chart of how the gain fills the brackets and a long- versus short-term comparison. For a loss, it shows the deduction, the tax saved and the carryforward.

For the profit on a trade before tax, see How to Calculate Stock Profit.

Frequently asked questions

How long do I have to hold a stock for long-term capital gains?

More than one year. The holding period starts the day after you buy, so selling on the one-year anniversary is still short-term.

Do capital gains push me into a higher tax bracket?

They're added to your income, so they can push part of the gain into a higher capital gains bracket and affect other things that depend on income. But long-term gains don't raise the rate on your wages.

Are dividends taxed like capital gains?

Qualified dividends are taxed at the same 0%, 15% and 20% rates as long-term gains. Other dividends are taxed as ordinary income.

Share this post :